Partial Fractions Calculator
Split a proper rational function with two distinct linear factors into A/(x − r₁) + B/(x − r₂).
Splits (p·x + q) ÷ ((x − r₁)(x − r₂)) into A/(x − r₁) + B/(x − r₂) — for two distinct real roots.
1/((x − 1)(x + 2)) = (1/3)/(x − 1) − (1/3)/(x + 2)
Partial fraction decomposition splits one rational function into a sum of simpler fractions you can integrate. For distinct linear factors, N(x)/((x − r₁)(x − r₂)) = A/(x − r₁) + B/(x − r₂). So 1/((x − 1)(x + 2)) = (1/3)/(x − 1) − (1/3)/(x + 2), found with A = N(r₁) ÷ (r₁ − r₂).
What partial fractions do
A rational function is one polynomial divided by another. Many operations — above all integration — are far easier on a sum of small fractions than on one big quotient. Partial fraction decomposition rewrites the quotient as that sum. When the bottom factors into distinct linear pieces, each factor contributes one simple term with an unknown constant on top.
valid when r₁ ≠ r₂ and the numerator degree is below 2 (a proper fraction)
Worked example
Decompose 1/((x − 1)(x + 2)), so N(x) = 1, r₁ = 1 and r₂ = −2:
- 1 Write the target form. 1/((x − 1)(x + 2)) = A/(x − 1) + B/(x + 2), with A and B unknown.
- 2 Cover up (x − r₁) for A. A = N(r₁) ÷ (r₁ − r₂) = 1 ÷ (1 − (−2)) = 1 ÷ 3 = 1/3.
- 3 Cover up (x − r₂) for B. B = N(r₂) ÷ (r₂ − r₁) = 1 ÷ (−2 − 1) = 1 ÷ (−3) = −1/3.
- 4 Write and check the result. (1/3)/(x − 1) − (1/3)/(x + 2). Recombining gives (1/3)·[(x + 2) − (x − 1)] ÷ ((x − 1)(x + 2)) = 1 ÷ ((x − 1)(x + 2)). ✓
Cover-up formulas
For N(x)/((x − r₁)(x − r₂)) with distinct roots; N(x) is the numerator evaluated at the covered root.
| Constant | Formula | Meaning |
|---|---|---|
| A | N(r₁) ÷ (r₁ − r₂) | Numerator at r₁, over r₁ minus the other root |
| B | N(r₂) ÷ (r₂ − r₁) | Numerator at r₂, over r₂ minus the other root |
| Check | A + B = leading behaviour | Recombine over a common denominator to confirm |
Scope and other cases
This calculator handles the most common case: a proper fraction (numerator degree below the denominator’s) whose denominator is two distinct linear factors (x − r₁)(x − r₂). Two situations fall outside it:
Repeated factors. If a factor is squared, such as 1/((x − 1)²(x + 2)), you need extra terms A/(x − 1) + B/(x − 1)² + C/(x + 2) — one term per power of the repeated factor.
Irreducible quadratics. A factor with no real roots, like x² + 1, contributes a term of the form (Ax + B)/(x² + 1); its numerator is linear, not a single constant.
Improper fractions. If the numerator degree is not below the denominator’s, do polynomial long division first, then decompose the remainder. In practice partial fractions are used mainly to integrate rational functions, since each simple piece integrates to a logarithm or a power.