Math Lab
Home/Class XII/Ch 7/Integration by partial fractions

Integration by partial fractions

A rational function P(x)Q(x)\dfrac{P(x)}{Q(x)} can be integrated, but the techniques depend on its shape. Partial fractions is the algorithm for transforming the integrand into a sum of fractions whose denominators are linear or irreducible quadratic , each of which has a known antiderivative.

When does partial fractions apply?

The integrand must be a proper rational function: degP<degQ\deg P < \deg Q. If the integrand is improper, perform polynomial division first to write P(x)Q(x)=S(x)+R(x)Q(x),degR<degQ.\frac{P(x)}{Q(x)} = S(x) + \frac{R(x)}{Q(x)}, \qquad \deg R < \deg Q. Then S\int S is a polynomial integral (trivial), and we apply partial fractions to RQ\dfrac{R}{Q}.

The four cases

After factoring Q(x)Q(x) over the reals into linear and irreducible-quadratic factors, the decomposition depends on the shapes of the factors.

Case 1: Distinct linear factors. If Q(x)=(xa1)(xa2)(xan)Q(x) = (x - a_1)(x - a_2)\cdots(x - a_n) with distinct aia_i, then P(x)Q(x)=A1xa1+A2xa2++Anxan.\frac{P(x)}{Q(x)} = \frac{A_1}{x - a_1} + \frac{A_2}{x - a_2} + \cdots + \frac{A_n}{x - a_n}.

Case 2: Repeated linear factor. If (xa)k(x - a)^k divides QQ, the decomposition includes A1xa+A2(xa)2++Ak(xa)k.\frac{A_1}{x - a} + \frac{A_2}{(x-a)^2} + \cdots + \frac{A_k}{(x - a)^k}.

Case 3: Distinct irreducible quadratic factor. For each (x2+bx+c)(x^2 + bx + c) factor of QQ with b24c<0b^2 - 4c < 0, include Bx+Cx2+bx+c.\frac{Bx + C}{x^2 + bx + c}.

Case 4: Repeated irreducible quadratic. For (x2+bx+c)k(x^2 + bx + c)^k, include B1x+C1x2+bx+c+B2x+C2(x2+bx+c)2++Bkx+Ck(x2+bx+c)k.\frac{B_1 x + C_1}{x^2 + bx + c} + \frac{B_2 x + C_2}{(x^2 + bx + c)^2} + \cdots + \frac{B_k x + C_k}{(x^2 + bx + c)^k}.

Finding the unknowns

Two methods. Method 1 , clear denominators and compare coefficients. Multiply both sides by Q(x)Q(x), expand, and equate coefficients of like powers of xx. This always works but can be slow.

Method 2 , Heaviside cover-up. For a distinct linear factor xax - a, the coefficient AA satisfies A=limxa(xa)P(x)Q(x)=P(a)Q(a)  (when convenient).A = \lim_{x \to a} (x - a) \cdot \frac{P(x)}{Q(x)} = \frac{P(a)}{Q'(a)} \;\text{(when convenient)}. In practice, "cover up" the (xa)(x - a) in the denominator and substitute x=ax = a into what remains.

For repeated factors and quadratic factors, you typically need Method 1 or a hybrid.

Integrating each piece

Once decomposed, each piece is one of:

  • Axadx=Alnxa+C\int \dfrac{A}{x - a}\,dx = A\ln|x - a| + C
  • A(xa)kdx=A(k1)(xa)k1+C\int \dfrac{A}{(x-a)^k}\,dx = -\dfrac{A}{(k-1)(x-a)^{k-1}} + C for k2k \ge 2
  • Bx+Cx2+bx+cdx\int \dfrac{Bx + C}{x^2 + bx + c}\,dx: split into B22x+bx2+bx+c\dfrac{B}{2}\cdot\dfrac{2x+b}{x^2+bx+c} (a log) plus CBb/2x2+bx+c\dfrac{C - Bb/2}{x^2+bx+c} (complete the square, tan1\tan^{-1}).

Worked examples

Example 1. 1(x1)(x2)dx\int \dfrac{1}{(x-1)(x-2)}\,dx.

Decompose: 1(x1)(x2)=Ax1+Bx2\dfrac{1}{(x-1)(x-2)} = \dfrac{A}{x-1} + \dfrac{B}{x-2}. Cover-up: A=112=1A = \dfrac{1}{1-2} = -1, B=121=1B = \dfrac{1}{2-1} = 1. So dx(x1)(x2)=lnx1+lnx2+C=lnx2x1+C.\int \dfrac{dx}{(x-1)(x-2)} = -\ln|x-1| + \ln|x-2| + C = \ln\left|\dfrac{x-2}{x-1}\right| + C.

Example 2. x+1x24dx\int \dfrac{x+1}{x^2 - 4}\,dx.

x24=(x2)(x+2)x^2 - 4 = (x-2)(x+2). Decompose: x+1(x2)(x+2)=Ax2+Bx+2\dfrac{x+1}{(x-2)(x+2)} = \dfrac{A}{x-2} + \dfrac{B}{x+2}. Cover-up: A=34A = \dfrac{3}{4}, B=14=14B = \dfrac{-1}{-4} = \dfrac{1}{4}. Integral =34lnx2+14lnx+2+C= \dfrac{3}{4}\ln|x-2| + \dfrac{1}{4}\ln|x+2| + C.

Example 3. 1x(x1)2dx\int \dfrac{1}{x(x-1)^2}\,dx.

Decompose: 1x(x1)2=Ax+Bx1+C(x1)2\dfrac{1}{x(x-1)^2} = \dfrac{A}{x} + \dfrac{B}{x-1} + \dfrac{C}{(x-1)^2}. Multiply by x(x1)2x(x-1)^2: 1=A(x1)2+Bx(x1)+Cx1 = A(x-1)^2 + Bx(x-1) + Cx. Set x=0x = 0: 1=A1 = A. Set x=1x = 1: 1=C1 = C. Compare coefficients of x2x^2: 0=A+B0 = A + B, so B=1B = -1. Integral =lnxlnx11x1+C= \ln|x| - \ln|x-1| - \dfrac{1}{x-1} + C.

Example 4. x2(x1)(x+1)2dx\int \dfrac{x^2}{(x-1)(x+1)^2}\,dx.

Decompose: x2(x1)(x+1)2=Ax1+Bx+1+C(x+1)2\dfrac{x^2}{(x-1)(x+1)^2} = \dfrac{A}{x-1} + \dfrac{B}{x+1} + \dfrac{C}{(x+1)^2}. Multiply through: x2=A(x+1)2+B(x1)(x+1)+C(x1)x^2 = A(x+1)^2 + B(x-1)(x+1) + C(x-1). Set x=1x = 1: 1=4A1 = 4A, so A=1/4A = 1/4. Set x=1x = -1: 1=2C1 = -2C, so C=1/2C = -1/2. Compare coefficients of x2x^2: 1=A+B1 = A + B, so B=3/4B = 3/4. Integral =14lnx1+34lnx+1+12(x+1)+C= \dfrac{1}{4}\ln|x-1| + \dfrac{3}{4}\ln|x+1| + \dfrac{1}{2(x+1)} + C.

Example 5. x(x2+1)(x1)dx\int \dfrac{x}{(x^2+1)(x-1)}\,dx.

Decompose: x(x2+1)(x1)=Ax+Bx2+1+Cx1\dfrac{x}{(x^2+1)(x-1)} = \dfrac{Ax+B}{x^2+1} + \dfrac{C}{x-1}. Multiply: x=(Ax+B)(x1)+C(x2+1)x = (Ax+B)(x-1) + C(x^2+1). Set x=1x = 1: 1=2C1 = 2C, so C=1/2C = 1/2. Expand: x=Ax2Ax+BxB+Cx2+Cx = Ax^2 - Ax + Bx - B + Cx^2 + C. Coefficient of x2x^2: 0=A+C0 = A + C, so A=1/2A = -1/2. Coefficient of x0x^0: 0=B+C0 = -B + C, so B=1/2B = 1/2. Integral splits as 14ln(x2+1)+12tan1x+12lnx1+C-\dfrac{1}{4}\ln(x^2+1) + \dfrac{1}{2}\tan^{-1}x + \dfrac{1}{2}\ln|x-1| + C.

Example 6. x3+1x21dx\int \dfrac{x^3 + 1}{x^2 - 1}\,dx.

Improper , divide first: x3+1x21=x+x+1x21=x+1x1\dfrac{x^3+1}{x^2-1} = x + \dfrac{x+1}{x^2-1} = x + \dfrac{1}{x-1} (since x+1(x1)(x+1)=1x1\dfrac{x+1}{(x-1)(x+1)} = \dfrac{1}{x-1}). Integral =x22+lnx1+C= \dfrac{x^2}{2} + \ln|x-1| + C.

Try it yourself

  1. 1x29dx\int \dfrac{1}{x^2 - 9}\,dx
  2. 5(x1)(x+4)dx\int \dfrac{5}{(x-1)(x+4)}\,dx
  3. 2x+3x2+3x+2dx\int \dfrac{2x+3}{x^2 + 3x + 2}\,dx
  4. 1x25x+6dx\int \dfrac{1}{x^2 - 5x + 6}\,dx
  5. x2+1(x+1)2(x2)dx\int \dfrac{x^2+1}{(x+1)^2(x-2)}\,dx
  6. 1x(x2+1)dx\int \dfrac{1}{x(x^2+1)}\,dx
  7. 3x+1(x1)(x2+1)dx\int \dfrac{3x+1}{(x-1)(x^2+1)}\,dx
  8. x2x21dx\int \dfrac{x^2}{x^2 - 1}\,dx (improper)
  9. 2x3+1x2+xdx\int \dfrac{2x^3 + 1}{x^2 + x}\,dx
  10. x(x1)3dx\int \dfrac{x}{(x-1)^3}\,dx
  11. dxx(x4+1)\int \dfrac{dx}{x(x^4 + 1)} (substitute u=x4u = x^4 and then partial fractions)
  12. dxsinx(1cosx)\int \dfrac{dx}{\sin x(1 - \cos x)} (Weierstrass substitution t=tan(x/2)t = \tan(x/2))
  13. ex(ex1)(ex+2)dx\int \dfrac{e^x}{(e^x - 1)(e^x + 2)}\,dx (substitute u=exu = e^x)
  14. x4(x1)(x2+1)dx\int \dfrac{x^4}{(x-1)(x^2+1)}\,dx

Pitfalls and tricks

  • Always check degree before decomposing. Improper fractions need division first.
  • Factor the denominator completely over the reals. Linear or irreducible-quadratic , those are the only legal pieces.
  • For repeated factors, include every power up to the maximum, not just the highest.
  • Heaviside cover-up is fast for distinct linear factors. Use it whenever you can.
  • Watch the signs when integrating each piece , a misplaced minus is the most common error.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Partial fractions
6 questions · pick the best answer
Q1

Decompose 1x(x+1)=\frac{1}{x(x+1)}=

Q2

Before decomposing x2x21dx\int \frac{x^2}{x^2 - 1}\,dx you should

Q3

For 1(x1)2(x+2)dx\int \frac{1}{(x-1)^2(x+2)}\,dx, the decomposition needs

Q4

dxx24=\int \frac{dx}{x^2 - 4}=

Q5

For a factor (x2+1)(x^2 + 1) (irreducible quadratic), the numerator in its term is

Q6

In x+5(x1)(x+2)=Ax1+Bx+2\frac{x+5}{(x-1)(x+2)} = \frac{A}{x-1} + \frac{B}{x+2}, by cover-up A=A=