Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Integrate by Partial Fractions

A rational function with a factorable denominator splits into a sum of simple fractions, and each of those integrates to a logarithm, a power or an arctangent.

Recognize the task

A fraction of polynomials whose bottom factors: x+5x2+x−6\frac{x + 5}{x^2 + x - 6}, 3x(x−1)2\frac{3x}{(x - 1)^2}, 1x(x2+1)\frac{1}{x(x^2 + 1)}. Test: can the denominator be factored into linear and irreducible quadratic factors? If the top has degree at least that of the bottom, divide first.
Factoring the denominator follows the factoring strategy; dividing first is polynomial long division. The site has no separate lesson on the decomposition itself; this page is where it lives.

Two ways to do it

Plug in the rootsdistinct linear factors
x+5=A(x−2)+B(x+3)  ⇒  x=2: 7=5Bx + 5 = A(x - 2) + B(x + 3) \;\Rightarrow\; x = 2:\ 7 = 5B
After clearing denominators, substitute each root of the denominator; every term but one vanishes and that constant is read off at once.
Compare coefficientsrepeated or quadratic factors
1=A(x2+1)+(Bx+C) x  ⇒  x2: 0=A+B1 = A(x^2 + 1) + (Bx + C)\,x \;\Rightarrow\; x^2:\ 0 = A + B
Expand and match the coefficients of each power of xx. Needed when plugging in roots does not reach every constant.

Steps

StepOn ∫x+5x2+x−6 dx\int \frac{x + 5}{x^2 + x - 6}\,dx
1Compare degrees; divide if the top is not smaller. Partial fractions needs a proper fraction. Otherwise divide and decompose only the remainder.degree 1<21 < 2: proper, no division
2Factor the denominator completely. Into linear factors (x−r)(x - r) and irreducible quadratics.x2+x−6=(x+3)(x−2)x^2 + x - 6 = (x + 3)(x - 2)
3Write the template, one term per factor. Linear factor: Ax−r\frac{A}{x - r}. Repeated factor (x−r)2(x - r)^2: Ax−r+B(x−r)2\frac{A}{x - r} + \frac{B}{(x - r)^2}. Irreducible quadratic: Bx+Cx2+px+q\frac{Bx + C}{x^2 + px + q}.x+5(x+3)(x−2)=Ax+3+Bx−2\frac{x + 5}{(x + 3)(x - 2)} = \frac{A}{x + 3} + \frac{B}{x - 2}
4Clear the denominators and find the constants. Multiply through by the full denominator, then plug in the roots or compare coefficients.x+5=A(x−2)+B(x+3)x + 5 = A(x - 2) + B(x + 3):   x=2⇒B=75\;x = 2 \Rightarrow B = \tfrac{7}{5},   x=−3⇒A=−25\;x = -3 \Rightarrow A = -\tfrac{2}{5}
5Integrate each piece. Ax−r\frac{A}{x - r} gives Aln⁡∣x−r∣A\ln|x - r| (reciprocal antiderivative); powers give powers; a constant over x2+a2x^2 + a^2 gives an arctangent.Exponential and reciprocal antiderivatives ↗−25ln⁡∣x+3∣+75ln⁡∣x−2∣+C-\tfrac{2}{5}\ln|x + 3| + \tfrac{7}{5}\ln|x - 2| + C

Worked examples

Example 1 · two distinct linear factors

basic
∫x+5(x+3)(x−2) dx\int \frac{x + 5}{(x + 3)(x - 2)}\,dx
Ax+3+Bx−2\frac{A}{x + 3} + \frac{B}{x - 2}
A=−25,B=75A = -\tfrac{2}{5},\quad B = \tfrac{7}{5}
plug in x=−3x = -3 and x=2x = 2
=−25ln⁡∣x+3∣+75ln⁡∣x−2∣+C= -\tfrac{2}{5}\ln|x + 3| + \tfrac{7}{5}\ln|x - 2| + C

Example 2 · repeated linear factor

two terms for one factor
∫3x(x−1)2 dx\int \frac{3x}{(x - 1)^2}\,dx
Ax−1+B(x−1)2\frac{A}{x - 1} + \frac{B}{(x - 1)^2}
3x=A(x−1)+B3x = A(x - 1) + B
x=1x = 1: B=3B = 3; coefficient of xx: A=3A = 3
=3ln⁡∣x−1∣−3x−1+C= 3\ln|x - 1| - \frac{3}{x - 1} + C
∫3(x−1)2dx=−3x−1\int \frac{3}{(x-1)^2}dx = -\frac{3}{x - 1}

Example 3 · an irreducible quadratic factor

Bx + C on top
∫dxx(x2+1)\int \frac{dx}{x(x^2 + 1)}
Ax+Bx+Cx2+1\frac{A}{x} + \frac{Bx + C}{x^2 + 1}
1=A(x2+1)+(Bx+C)x1 = A(x^2 + 1) + (Bx + C)x
x=0x = 0: A=1A = 1; x2x^2: B=−1B = -1; xx: C=0C = 0
=ln⁡∣x∣−12ln⁡(x2+1)+C= \ln|x| - \tfrac{1}{2}\ln(x^2 + 1) + C
∫−xx2+1dx\int \frac{-x}{x^2 + 1}dx by u=x2+1u = x^2 + 1

Example 4 · improper fraction: divide first

degree 2 over degree 1
∫x2x−1 dx\int \frac{x^2}{x - 1}\,dx
top degree ≥\ge bottom degree
x2x−1=x+1+1x−1\frac{x^2}{x - 1} = x + 1 + \frac{1}{x - 1}
long division
=x22+x+ln⁡∣x−1∣+C= \frac{x^2}{2} + x + \ln|x - 1| + C

See it happen

Adding fractions with different denominators produces one fraction over the product; partial fractions runs that addition backwards. The template has exactly as many unknown constants as the denominator has degree, so there is always one solution and never a leftover.

Common mistakes

Taking the log of the whole denominator

✗ ∫dxx2−1=ln⁡∣x2−1∣+C\int \frac{dx}{x^2 - 1} = \ln|x^2 - 1| + C
✓ decompose first: 12ln⁡∣x−1∣−12ln⁡∣x+1∣+C\tfrac{1}{2}\ln|x - 1| - \tfrac{1}{2}\ln|x + 1| + C

Skipping the division

✗ x2x−1=Ax−1\frac{x^2}{x - 1} = \frac{A}{x - 1}
✓ divide first; the fraction is improper

One term for a repeated factor

✗ 3x(x−1)2=A(x−1)2\frac{3x}{(x - 1)^2} = \frac{A}{(x - 1)^2}
✓ Ax−1+B(x−1)2\frac{A}{x - 1} + \frac{B}{(x - 1)^2}

A bare constant over a quadratic

✗ Bx2+1\frac{B}{x^2 + 1}
✓ Bx+Cx2+1\frac{Bx + C}{x^2 + 1}