What partial fractions are
Partial fraction decomposition rewrites one complicated fraction of polynomials as a sum of simpler ones. It's the standard first step for integrating a rational function, because each simple piece has a known integral, and it's also used for inverse Laplace transforms.
How it's done
- Divide if needed. If the numerator's degree is at least the denominator's, use polynomial long division first. Only the remainder is decomposed.
- Factor the denominator into linear factors and irreducible quadratics (quadratics with no real roots).
- Write one term per factor using the rules below, with unknown constants on top.
- Clear the denominators by multiplying both sides by the original denominator, then match the coefficients of each power of x. That gives a system of linear equations.
- Solve the system and substitute the constants back in.
Repeated (x − r)ⁿ: A₁/(x − r) + A₂/(x − r)² + … + Aₙ/(x − r)ⁿ
Irreducible quadratic q(x): (Bx + C)/q(x), and one such term per power if it repeats
The calculator does all of this in exact fractions and then multiplies everything back out to confirm it gets your original fraction. If that check fails, it shows no answer.
Worked example
Decompose (3x + 5)/((x − 1)(x + 2)).
- The degree of the top (1) is less than the bottom (2), so no division is needed.
- Write (3x + 5)/((x − 1)(x + 2)) = A/(x − 1) + B/(x + 2).
- Multiply by (x − 1)(x + 2): 3x + 5 = A(x + 2) + B(x − 1).
- Match coefficients: x terms give A + B = 3; constants give 2A − B = 5. Adding them, 3A = 8, so A = 8/3 and B = 1/3.
- Answer: 8/(3(x − 1)) + 1/(3(x + 2)). The shortcut of putting x = 1 into 3x + 5 = A(x + 2) + B(x − 1) gives 8 = 3A directly (the "cover-up" method).
More examples
| Fraction | Partial fractions |
|---|---|
| 1/(x²(x + 1)) | −1/x + 1/x² + 1/(x + 1) |
| (2x² + 3)/((x − 1)(x² + 1)) | 5/(2(x − 1)) − (x + 1)/(2(x² + 1)) |
| 1/(x³ − x) | −1/x + 1/(2(x + 1)) + 1/(2(x − 1)) |
| x³/(x² − 1) | x + 1/(2(x + 1)) + 1/(2(x − 1)) |
What isn't supported
- Irrational or complex linear factors. A factor like x² − 2 has real roots ±√2, which aren't rational, so it can't be split into factors with rational coefficients. The calculator says so rather than giving decimals.
- Denominators it can't factor. Expanded denominators are factored by finding rational roots. A quartic like x⁴ + 5x² + 4 that splits only into quadratics must be typed in factored form, (x² + 1)(x² + 4).
- Decimals that aren't exact, functions other than polynomials, variables other than x, and denominators above degree 12.
To integrate the result, use the integral calculator; each A/(x − r) term integrates to A·ln|x − r|. For polynomial roots, see the polynomial roots calculator.