Partial Fraction Decomposition Calculator

Decompose rational expressions into partial fractions with steps.

Result

Type partial fractions and the fraction, with brackets around the top and the bottom: partial fractions (x^2 + 1)/(x^3 - x).

Enter a rational expression to split it into partial fractions, the step before integrating: (5x − 4)/(x² − x − 2) = 2/(x − 2) + 3/(x + 1) by the cover-up method. Repeated linear factors and irreducible quadratics are solved by comparing coefficients.

The form of the decomposition

Factor in the denominatorPartial fractions
(x - a)\frac{A}{x - a}
(x - a)^2\frac{A}{x - a} + \frac{B}{(x - a)^2}
(x^2 + bx + c) that does not factor\frac{Ax + B}{x^2 + bx + c}

If the top has the same or a higher degree than the bottom, divide first; the quotient is a polynomial and only the remainder fraction is split.

Finding the unknowns

  • Substitution (cover-up) – put in the value that makes a linear factor 0; every other term vanishes and one unknown is left.
  • Comparing coefficients – for repeated and quadratic factors, expand and match the coefficients of each power of x on both sides.

Example: \frac{3x + 5}{(x + 1)(x + 2)} = \frac{A}{x + 1} + \frac{B}{x + 2}

\begin{aligned} 3x + 5 &= A(x + 2) + B(x + 1) \\ x = -1:\ 2 &= A \\ x = -2:\ -1 &= -B \Rightarrow B = 1 \end{aligned}

So the fraction is \frac{2}{x + 1} + \frac{1}{x + 2}.

A repeated factor

A squared factor needs one fraction for each power. For \frac{2x + 3}{(x - 1)^2}:

2x + 3 = A(x - 1) + B

Putting x = 1 gives B = 5; comparing the x terms gives A = 2, so the answer is \frac{2}{x - 1} + \frac{5}{(x - 1)^2}. See it in the calculator.

A quadratic factor that doesn’t factor

x² + 1 has no real roots, so its fraction gets a linear top, Bx + C:

\frac{3x^2 + x + 2}{(x + 1)(x^2 + 1)} = \frac{A}{x + 1} + \frac{Bx + C}{x^2 + 1}

x = −1 gives 4 = 2A, so A = 2. Matching the x² terms, 3 = A + B gives B = 1, and the constants, 2 = A + C, give C = 0: the result is \frac{2}{x + 1} + \frac{x}{x^2 + 1}. See it in the calculator.

When the top is too big: divide first

In \frac{x^3}{x^2 - 1} the top has the higher degree. Long division gives x³ = x(x² − 1) + x, so the fraction is x + \frac{x}{x^2 - 1}, and only the remainder is split: x + \frac{1}{2(x - 1)} + \frac{1}{2(x + 1)}. See it in the calculator.

Why it is done: integrating

Each piece integrates on sight, which the original fraction does not:

\int \frac{3x + 5}{(x + 1)(x + 2)}\,dx = \int \left(\frac{2}{x + 1} + \frac{1}{x + 2}\right)dx = 2\ln|x + 1| + \ln|x + 2| + C

A repeated factor gives a power instead of a log (\int \frac{5}{(x - 1)^2}\,dx = -\frac{5}{x - 1}) and an x² + 1 factor gives ln and arctan terms. To check any decomposition, add the pieces back over the common denominator – the original fraction must come back.

Partial fractions are the usual first step for integrating rational functions and for inverse Laplace transforms. To simplify a fraction instead, use the simplify calculator.

Frequently asked questions

When do I need to divide first?

When the degree of the top is greater than or equal to the degree of the bottom (an improper fraction). Divide, then decompose the remainder.

What is the cover-up method?

For a linear factor (x − a), put x = a into everything except that factor; the result is the constant above it. The calculator shows this as substituting the root.

What about a quadratic factor like x² + 1?

A quadratic that does not factor over the rationals gets a linear numerator, (Ax + B)/(x² + 1). Its unknowns are found by comparing coefficients.