Skip to content
K Knidox Search…
Math · Calculus

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.

Coefficient of x on top; use 0 for a constant numerator.
Constant term of the numerator.
First denominator factor is (x − r₁).
Second denominator factor is (x − r₂). Must differ from r₁.
Try an example
Partial fraction decomposition
(1/3)/(x − 1) − (1/3)/(x + 2)

1/((x − 1)(x + 2)) = (1/3)/(x − 1) − (1/3)/(x + 2)

A
1/3
over (x − r₁)
B
−1/3
over (x − r₂)

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.

N(x)/((x − r₁)(x − r₂)) = A/(x − r₁) + B/(x − r₂)

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. 1
    Write the target form. 1/((x − 1)(x + 2)) = A/(x − 1) + B/(x + 2), with A and B unknown.
  2. 2
    Cover up (x − r₁) for A. A = N(r₁) ÷ (r₁ − r₂) = 1 ÷ (1 − (−2)) = 1 ÷ 3 = 1/3.
  3. 3
    Cover up (x − r₂) for B. B = N(r₂) ÷ (r₂ − r₁) = 1 ÷ (−2 − 1) = 1 ÷ (−3) = −1/3.
  4. 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.

ConstantFormulaMeaning
AN(r₁) ÷ (r₁ − r₂)Numerator at r₁, over r₁ minus the other root
BN(r₂) ÷ (r₂ − r₁)Numerator at r₂, over r₂ minus the other root
CheckA + B = leading behaviourRecombine 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.

What is the cover-up method?
A shortcut for distinct linear factors: to find the constant over (x − r), evaluate the rest of the expression at x = r. Here A = N(r₁) ÷ (r₁ − r₂) and B = N(r₂) ÷ (r₂ − r₁), avoiding a full system of equations.
What if the factors repeat?
A squared factor (x − r)² needs two terms, A/(x − r) + B/(x − r)², and higher powers add more. The plain cover-up formula only gives the top-power constant, so repeated factors need the extra terms solved separately — outside this tool’s scope.
What about an irreducible quadratic factor?
A quadratic with no real roots, like x² + 1, gets a term (Ax + B)/(x² + 1) with a linear numerator. This calculator only covers denominators that split into two distinct real linear factors.
Why must the numerator degree be lower?
Partial fractions require a proper fraction. If the numerator degree is at least the denominator’s, first do polynomial long division; the quotient is a polynomial and you decompose only the leftover proper remainder.
Why do r₁ and r₂ have to be different?
The formulas divide by (r₁ − r₂). If the roots are equal that difference is zero, the division is undefined, and the denominator is really a repeated factor (x − r)² needing a different form.
How do I check my decomposition?
Recombine the pieces over the common denominator (x − r₁)(x − r₂). The numerator should simplify back to N(x). For example (1/3)/(x − 1) − (1/3)/(x + 2) recombines to 1/((x − 1)(x + 2)).