Integration by Partial Fractions

The idea

When the denominator of a rational function factors into distinct linear pieces, the whole fraction can be rewritten as a sum of simpler fractions, each of which has a known antiderivative involving a logarithm:

∫1x−a dx=ln⁡∣x−a∣+C\int \dfrac{1}{x-a}\,dx = \ln|x-a| + C

Partial-fraction forms

The form to write depends on the factors of the denominator. This only works when the fraction is proper (the numerator's degree is lower than the denominator's). If it isn't, divide first.

Which partial fractions to write for each kind of factor in the denominator
Denominator containsWrite it as
(x−a)(x−b)(x - a)(x - b), distinct linear factorsAx−a+Bx−b\dfrac{A}{x - a} + \dfrac{B}{x - b}
(x−a)2(x - a)^2, a repeated linear factorAx−a+B(x−a)2\dfrac{A}{x - a} + \dfrac{B}{(x - a)^2}
(x−a)2(x−b)(x - a)^2(x - b)Ax−a+B(x−a)2+Cx−b\dfrac{A}{x - a} + \dfrac{B}{(x - a)^2} + \dfrac{C}{x - b}
(x−a)(x2+bx+c)(x - a)(x^2 + bx + c), with an irreducible quadraticAx−a+Bx+Cx2+bx+c\dfrac{A}{x - a} + \dfrac{Bx + C}{x^2 + bx + c}

Worked example

Find ∫x(x+1)(x+2) dx\displaystyle\int \dfrac{x}{(x+1)(x+2)}\,dx.

Solution: Write x(x+1)(x+2)=Ax+1+Bx+2\dfrac{x}{(x+1)(x+2)} = \dfrac{A}{x+1} + \dfrac{B}{x+2}, so x=A(x+2)+B(x+1)x = A(x+2) + B(x+1). Setting x=−1x=-1 gives A=−1A=-1; setting x=−2x=-2 gives B=2B=2:

∫(−1x+1+2x+2)dx=−ln⁡∣x+1∣+2ln⁡∣x+2∣+C=ln⁡(x+2)2∣x+1∣+C\int \left(\dfrac{-1}{x+1} + \dfrac{2}{x+2}\right)dx = -\ln|x+1| + 2\ln|x+2| + C = \ln\dfrac{(x+2)^2}{|x+1|} + C

Worked example

Find ∫2xx2+3x+2 dx\displaystyle\int \dfrac{2x}{x^2+3x+2}\,dx.

Solution: The denominator factors as (x+1)(x+2)(x+1)(x+2). Writing 2x(x+1)(x+2)=Ax+1+Bx+2\dfrac{2x}{(x+1)(x+2)} = \dfrac{A}{x+1} + \dfrac{B}{x+2} gives 2x=A(x+2)+B(x+1)2x = A(x+2)+B(x+1). Setting x=−1x=-1: A=−2A=-2. Setting x=−2x=-2: B=4B=4:

∫(−2x+1+4x+2)dx=4ln⁡∣x+2∣−2ln⁡∣x+1∣+C\int \left(\dfrac{-2}{x+1} + \dfrac{4}{x+2}\right)dx = 4\ln|x+2| - 2\ln|x+1| + C

Worked example: a repeated factor

Find ∫1(x−1)2(x+2) dx\displaystyle\int \dfrac{1}{(x-1)^2(x+2)}\,dx.

Solution: Write 1(x−1)2(x+2)=Ax−1+B(x−1)2+Dx+2\dfrac{1}{(x-1)^2(x+2)} = \dfrac{A}{x-1} + \dfrac{B}{(x-1)^2} + \dfrac{D}{x+2}, so 1=A(x−1)(x+2)+B(x+2)+D(x−1)21 = A(x-1)(x+2) + B(x+2) + D(x-1)^2. Setting x=1x = 1 gives B=13B = \dfrac{1}{3}, and setting x=−2x = -2 gives D=19D = \dfrac{1}{9}. Comparing the x2x^2 coefficients, 0=A+D0 = A + D, so A=−19A = -\dfrac{1}{9}:

∫(−1/9x−1+1/3(x−1)2+1/9x+2)dx=19ln⁡∣x+2x−1∣−13(x−1)+C\int \left(\dfrac{-1/9}{x-1} + \dfrac{1/3}{(x-1)^2} + \dfrac{1/9}{x+2}\right)dx = \dfrac{1}{9}\ln\left|\dfrac{x+2}{x-1}\right| - \dfrac{1}{3(x-1)} + C

The repeated-factor term integrates as a power, not a logarithm: ∫(x−1)−2 dx=−(x−1)−1\int (x-1)^{-2}\,dx = -(x-1)^{-1}.

Worked example: a quadratic factor

Find ∫2x(x+1)(x2+1) dx\displaystyle\int \dfrac{2x}{(x+1)(x^2+1)}\,dx.

Solution: x2+1x^2 + 1 has no real factors, so its numerator is linear: 2x(x+1)(x2+1)=Ax+1+Bx+Dx2+1\dfrac{2x}{(x+1)(x^2+1)} = \dfrac{A}{x+1} + \dfrac{Bx + D}{x^2+1}. Then 2x=A(x2+1)+(Bx+D)(x+1)2x = A(x^2+1) + (Bx + D)(x+1). Setting x=−1x = -1 gives A=−1A = -1. Comparing x2x^2 coefficients, 0=A+B0 = A + B, so B=1B = 1. Comparing constants, 0=A+D0 = A + D, so D=1D = 1:

∫(−1x+1+xx2+1+1x2+1)dx=−ln⁡∣x+1∣+12ln⁡(x2+1)+tan⁡−1x+C\int \left(\dfrac{-1}{x+1} + \dfrac{x}{x^2+1} + \dfrac{1}{x^2+1}\right)dx = -\ln|x+1| + \dfrac{1}{2}\ln(x^2+1) + \tan^{-1}x + C

Common mistakes

  • Skipping the division step. x2(x+1)(x+2)\dfrac{x^2}{(x+1)(x+2)} is improper (degree 2 over degree 2), so divide first: it equals 1−3x+2(x+1)(x+2)1 - \dfrac{3x + 2}{(x+1)(x+2)}.
  • Writing only one term for a repeated factor. (x−1)2(x-1)^2 needs both Ax−1\dfrac{A}{x-1} and B(x−1)2\dfrac{B}{(x-1)^2}.
  • Putting a constant over an irreducible quadratic. Over x2+1x^2 + 1 the numerator must be Bx+CBx + C, not just BB.

Continue learning

Partial fractions are one technique for a rational integrand: some standard rational forms have their own ready-made formulas instead.