Class 12 Maths, Worked in Full Past papersGet updates
Chapter 7 · Integrals

Example 11: ∫dx(x+1)(x+2)\int\frac{dx}{(x + 1)(x + 2)} by partial fractions

ExamplesIntegration by partial fractions · Section 7.5
The question

Find ∫dx(x+1)(x+2)\displaystyle\int\frac{dx}{(x + 1)(x + 2)}⁠.

Exam answer

Let I=∫dx(x+1)(x+2)I = \displaystyle\int\frac{dx}{(x + 1)(x + 2)}⁠.

Let

1(x+1)(x+2)=Ax+1+Bx+2\frac{1}{(x + 1)(x + 2)} = \frac{A}{x + 1} + \frac{B}{x + 2} ⇒ 1=A(x+2)+B(x+1)\Rightarrow\ 1 = A(x + 2) + B(x + 1)

Putting x=−1x = -1⁠: A=1A = 1⁠. Putting x=−2x = -2⁠: B=−1B = -1⁠.

∴ I=∫dxx+1−∫dxx+2=log⁡∣x+1∣−log⁡∣x+2∣+C\begin{aligned} \therefore\ I &= \int\frac{dx}{x + 1} - \int\frac{dx}{x + 2} \\ &= \log|x + 1| - \log|x + 2| + C \end{aligned}

∴ I=log⁡∣x+1x+2∣+C\therefore\ I = \log\left|\dfrac{x + 1}{x + 2}\right| + C⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

A fraction whose denominator is a product of different linear factors can be written as a sum of simpler fractions, one per factor: 1(x+1)(x+2)=Ax+1+Bx+2\frac{1}{(x + 1)(x + 2)} = \frac{A}{x + 1} + \frac{B}{x + 2}⁠. This is partial fraction decomposition (Section 7.5). Each simple fraction 1x+k\frac{1}{x + k} integrates to log⁡∣x+k∣\log|x + k|⁠.

Given, to find, and the plan
Given
The integrand 1(x+1)(x+2)\frac{1}{(x + 1)(x + 2)}⁠, defined for x≠−1,−2x \ne -1, -2⁠.
To find
∫dx(x+1)(x+2)\int\frac{dx}{(x + 1)(x + 2)}⁠.
Plan
(1) Confirm the fraction is proper; (2) write the form Ax+1+Bx+2\frac{A}{x + 1} + \frac{B}{x + 2} (Table 7.2, row 1); (3) clear denominators and find AA⁠, BB⁠; (4) integrate; (5) differentiate back.

Basics you need

1Proper rational functions

P(x)Q(x)\frac{P(x)}{Q(x)} is proper when the degree of PP is less than the degree of QQ⁠. Only proper fractions are split directly; improper ones are first divided out. Basics: splitting fractions

2Table 7.2, row 1

px+q(x−a)(x−b)=Ax−a+Bx−b\frac{px + q}{(x - a)(x - b)} = \frac{A}{x - a} + \frac{B}{x - b} for a≠ba \ne b⁠. Lesson: partial fractions

3Polynomial identities

Two polynomials equal for all xx have equal coefficients of each power of xx⁠. Basics: splitting fractions

4Logarithms

∫dxx+k=log⁡∣x+k∣+C\int\frac{dx}{x + k} = \log|x + k| + C (put t=x+kt = x + k⁠), and log⁡∣p∣−log⁡∣q∣=log⁡∣pq∣\log|p| - \log|q| = \log\left|\frac pq\right|⁠. Basics: logarithms and 1/x

Solution

  1. The integrand is proper, with distinct linear factors

    The numerator 1 has degree 0; the denominator (x+1)(x+2)=x2+3x+2(x + 1)(x + 2) = x^2 + 3x + 2 has degree 2. So the fraction is proper. The factors x+1x + 1 and x+2x + 2 are linear and different (a=−1a = -1⁠, b=−2b = -2 in Table 7.2).

    Partial fractions in the form of Table 7.2 need a proper fraction; otherwise a polynomial part would be missing from the decomposition. Distinct linear factors mean row 1 of the table applies.
  2. Write the form of the decomposition

    1(x+1)(x+2)=Ax+1+Bx+2(1)\frac{1}{(x + 1)(x + 2)} = \frac{A}{x + 1} + \frac{B}{x + 2} \qquad (1)

    where AA and BB are real numbers still to be found.

    Each linear factor of the denominator gets its own simple fraction with a constant on top. (The book cites this row as "Table 7.2 (i)"; in the table it is printed as row 1.)
    Table 7.2, row 1. Basics: splitting fractions
  3. Clear the denominators

    Multiply both sides of (1) by (x+1)(x+2)(x + 1)(x + 2)⁠:

    1=A(x+2)+B(x+1).1 = A(x + 2) + B(x + 1).
    This removes every fraction. As the book's Remark says, (1) is an identity: it must hold for every permissible xx⁠, so this polynomial equation holds for all xx (both sides are polynomials that agree at infinitely many points).
  4. Find AA and BB by comparing coefficients

    The right side is (A+B)x+(2A+B)(A + B)x + (2A + B)⁠. Compare with 0⋅x+10\cdot x + 1⁠:

    coefficient of x:A+B=0,constant term:2A+B=1.\begin{aligned} \text{coefficient of } x: &\quad A + B = 0, \\ \text{constant term}: &\quad 2A + B = 1. \end{aligned}

    Subtracting the first from the second: A=1A = 1⁠; then B=−1B = -1⁠.

    Two equal polynomials have equal coefficients. The left side, 1, has no xx term, so the xx-coefficient on the right must be 0.
  5. A quicker cross-check: substitute the roots

    Put x=−1x = -1 in 1=A(x+2)+B(x+1)1 = A(x + 2) + B(x + 1)⁠: 1=A(1)+01 = A(1) + 0⁠, so A=1A = 1⁠. Put x=−2x = -2⁠: 1=0+B(−1)1 = 0 + B(-1)⁠, so B=−1B = -1⁠. Same values.

    Each root makes one bracket vanish and isolates the other constant. The polynomial identity of Step 3 holds for all xx⁠, including −1-1 and −2-2⁠, even though the original fraction is not defined there.
  6. Integrate the two simple fractions

    1(x+1)(x+2)=1x+1−1x+2,\frac{1}{(x + 1)(x + 2)} = \frac{1}{x + 1} - \frac{1}{x + 2}, ∫dx(x+1)(x+2)=∫dxx+1−∫dxx+2=log⁡∣x+1∣−log⁡∣x+2∣+C=log⁡∣x+1x+2∣+C.\begin{aligned} \int\frac{dx}{(x + 1)(x + 2)} &= \int\frac{dx}{x + 1} - \int\frac{dx}{x + 2} \\ &= \log|x + 1| - \log|x + 2| + C \\ &= \log\left|\frac{x + 1}{x + 2}\right| + C. \end{aligned}
    ∫dxx+k=log⁡∣x+k∣\int\frac{dx}{x + k} = \log|x + k|⁠: put t=x+kt = x + k⁠, dt=dxdt = dx⁠, and use ∫dtt=log⁡∣t∣\int\frac{dt}{t} = \log|t|⁠. The difference of two logs is the log of the quotient, and ∣x+1∣∣x+2∣=∣x+1x+2∣\frac{|x + 1|}{|x + 2|} = \left|\frac{x + 1}{x + 2}\right|⁠.
    Standard formula (xii), Section 7.2. Basics: logarithms and 1/x
  7. Check: differentiate the answer

    ddx(log⁡∣x+1∣−log⁡∣x+2∣)=1x+1−1x+2=(x+2)−(x+1)(x+1)(x+2)=1(x+1)(x+2). ✓\begin{aligned} &\frac{d}{dx}\big(\log|x + 1| - \log|x + 2|\big) \\ &= \frac{1}{x + 1} - \frac{1}{x + 2} \\ &= \frac{(x + 2) - (x + 1)}{(x + 1)(x + 2)} \\ &= \frac{1}{(x + 1)(x + 2)}. \ \checkmark \end{aligned}

    Valid for every x≠−1,−2x \ne -1, -2⁠.

    Over the common denominator the numerators give (x+2)−(x+1)=1(x + 2) - (x + 1) = 1⁠, the original numerator.
Result

∫dx(x+1)(x+2)=log⁡∣x+1x+2∣+C\displaystyle\int\frac{dx}{(x + 1)(x + 2)} = \log\left|\frac{x + 1}{x + 2}\right| + C⁠, for x≠−1,−2x \ne -1, -2⁠. This agrees with the textbook's solution.

Check it with numbers

At x=3x = 3⁠: 1(4)(5)=0.05\frac{1}{(4)(5)} = 0.05 and 14−15=0.05\frac14 - \frac15 = 0.05⁠, so the decomposition holds there.

By Section 7.8, ∫01dx(x+1)(x+2)=F(1)−F(0)\int_0^1\frac{dx}{(x + 1)(x + 2)} = F(1) - F(0)⁠, which is log⁡23−log⁡12=log⁡43\log\frac23 - \log\frac12 = \log\frac43 ≈0.2876821\approx 0.2876821⁠. A computer adding very many thin strips under the curve from 0 to 1 gets 0.28768210.2876821 too.

Common mistakes
  1. Writing ∫dx(x+1)(x+2)\int\frac{dx}{(x + 1)(x + 2)} as log⁡∣(x+1)(x+2)∣\log|(x + 1)(x + 2)|⁠. The numerator 1 is not the derivative of the denominator (2x+32x + 3⁠).
  2. Sign of BB⁠. B=−1B = -1⁠, so the second log is subtracted; the quotient is x+1x+2\frac{x + 1}{x + 2}⁠, not the reverse.
  3. Thinking x=−1x = -1 cannot be substituted. It can be substituted in the cleared identity of Step 3, which holds for all xx⁠.
What to take away
  1. Distinct linear factors: px+q(x−a)(x−b)=Ax−a+Bx−b\frac{px + q}{(x - a)(x - b)} = \frac{A}{x - a} + \frac{B}{x - b}⁠.
  2. Find the constants by comparing coefficients, or faster, by substituting the roots.
  3. Each simple fraction integrates to a logarithm; combine them with log laws.

Every fact used, and where it comes from

FactUsed inSource
Proper and improper rational functionsStep 1Section 7.5 (Lesson: partial fractions)
px+q(x−a)(x−b)=Ax−a+Bx−b\frac{px + q}{(x - a)(x - b)} = \frac{A}{x - a} + \frac{B}{x - b}Step 2Table 7.2, row 1, Section 7.5
The decomposition is an identitySteps 3 to 5Remark after Example 11
Equal polynomials have equal coefficientsStep 4Algebra (Basics: splitting fractions)
∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + CStep 6Standard formula (xii), Section 7.2
log⁡∣p∣−log⁡∣q∣=log⁡∣pq∣\log|p| - \log|q| = \log\left|\frac pq\right|Step 6Laws of logarithms (Basics: logarithms)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →