Understanding the partial fraction decomposition calculator — concept and principle
This calculator splits a rational expression P(x)/Q(x) into a sum of simpler fractions, one group for each factor of the denominator. Partial fractions are used to integrate rational functions in calculus, to find inverse Laplace and z-transforms, and to simplify algebraic expressions.
How it is calculated
- If deg P ≥ deg Q, divide first: P/Q = polynomial + R/Q.
- Write one term per factor of Q:
- linear factor (ax + b): A/(ax + b)
- repeated factor (ax + b)ⁿ: A₁/(ax + b) + A₂/(ax + b)² + … + Aₙ/(ax + b)ⁿ
- irreducible quadratic (b² − 4ac < 0): (Ax + B)/(ax² + bx + c), and likewise for its powers
- Multiply both sides by Q, expand, and equate coefficients of each power of x. This gives a linear system for the unknowns, which the calculator solves. Simple fractions are shown exactly.
The principle
Partial fractions reverse the addition of fractions. When you add A/(x − 2) + B/(x + 1), the common denominator is (x − 2)(x + 1) and the numerator is A(x + 1) + B(x − 2). Decomposition asks which A and B produce a given numerator. Because two polynomials are equal for all x only if their coefficients match, comparing coefficients turns the problem into simple linear equations. The number of unknowns always equals the degree of Q, so the system has exactly one solution when the factors are correct.
Worked example
Default inputs: P(x) = 5x − 4, Q(x) = (x − 2)(x + 1).
- deg P = 1 < deg Q = 2, so no division is needed.
- Set up 5x − 4 = A(x + 1) + B(x − 2).
- Coefficients: x-terms A + B = 5; constants A − 2B = −4.
- Subtract: 3B = 9, so B = 3 and A = 2.
- Result: 2/(x − 2) + 3/(x + 1). The denominator multiplied out is x² − x − 2, and there were 2 unknowns.
Shortcut check: put x = 2 into 5x − 4 = A(x + 1) + …, giving 6 = 3A, so A = 2.
How to read the result
Each term corresponds to one factor of the denominator, so you can integrate or invert them one by one: here the integral is 2 ln|x − 2| + 3 ln|x + 1| + C. If a polynomial part appears, it came from long division and must be kept. Coefficients shown as decimals mean the exact values are not simple fractions.
Common mistakes
- Skipping the long division when the numerator's degree is not lower.
- Writing only one term for a repeated factor such as (x − 1)²; it needs A/(x − 1) + B/(x − 1)².
- Using a constant numerator over an irreducible quadratic; it needs Ax + B.
- Factoring the denominator incorrectly; the calculator uses the factors exactly as you type them.
Frequently asked questions
Why do partial fractions help with integration?
Each simple term has a known integral, such as a logarithm or an arctangent, while the original fraction does not.
What is the cover-up method?
For a non-repeated linear factor, cover that factor and evaluate the rest at its root. It gives the same A directly.
Can every rational function be decomposed?
Yes, over the real numbers, once the denominator is factored into linear and irreducible quadratic factors.
Sources: OpenStax, College Algebra 2e (2021), §7.4 Partial Fractions · OpenStax, Calculus Volume 2 (2016), §3.4 Partial Fractions