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

Exercise 7.5 · Q1: ∫x(x+1)(x+2) dx\int\frac{x}{(x+1)(x+2)}\,dx

Exercise 7.5Integration by partial fractions · Section 7.5
The question

Integrate the rational function:

x(x+1)(x+2)\frac{x}{(x+1)(x+2)}
Exam answer

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

Let

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

Putting x=−1x = -1⁠: −1=A-1 = A⁠, so A=−1A = -1⁠.

Putting x=−2x = -2⁠: −2=−B-2 = -B⁠, so B=2B = 2⁠.

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

∴ I=log⁡(x+2)2∣x+1∣+C\therefore\ I = \log\dfrac{(x + 2)^2}{|x + 1|} + C⁠.

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

The one idea this problem is built on

A proper fraction whose denominator is a product of two different linear factors splits into one simple fraction per factor: Ax+1+Bx+2\frac{A}{x+1} + \frac{B}{x+2}⁠. Each simple fraction integrates to a logarithm. The whole job is finding the two numbers AA and BB⁠.

Given, to find, and the plan
Given
f(x)=x(x+1)(x+2)f(x) = \frac{x}{(x+1)(x+2)}⁠, defined for every real xx except x=−1x = -1 and x=−2x = -2⁠.
To find
∫x(x+1)(x+2) dx\displaystyle\int\frac{x}{(x+1)(x+2)}\,dx⁠.
Plan
(1) Check the fraction is proper. (2) Write the form of the decomposition (Table 7.2, row 1). (3) Clear denominators. (4) Find AA and BB by putting x=−1x = -1 and x=−2x = -2⁠. (5) Confirm by comparing coefficients. (6) Integrate. (7) 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 (Section 7.5). Only a proper fraction is split directly into the forms of Table 7.2. Basics: splitting fractions

2Table 7.2, row 1

For a≠ba \ne b⁠: 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}⁠, where AA⁠, BB are real numbers to be found. Lesson: partial fractions

3Polynomial identities

If two polynomials are equal for every xx⁠, they have the same value at any particular xx we choose, and the same coefficient of each power of xx⁠. Basics: splitting fractions

4The logarithm integral

∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + C (standard formula (xii), Section 7.2), so with t=x+kt = x + k⁠, dt=dxdt = dx⁠: ∫dxx+k=log⁡∣x+k∣+C\int\frac{dx}{x+k} = \log|x+k| + C⁠. Basics: logarithms and 1/x

Solution

  1. The fraction is proper, with two different linear factors

    The numerator xx has degree 1. The denominator (x+1)(x+2)=x2+3x+2(x+1)(x+2) = x^2 + 3x + 2 has degree 2. Since 1<21 < 2⁠, the fraction is proper. Its factors x+1=x−(−1)x + 1 = x - (-1) and x+2=x−(−2)x + 2 = x - (-2) are linear and different, so row 1 of Table 7.2 applies with a=−1a = -1⁠, b=−2b = -2⁠.

    The forms in Table 7.2 are only for proper fractions. If the numerator's degree were not smaller, a polynomial part would first have to be divided out (as in Q6 and Q12 of this exercise).
    Section 7.5 (proper and improper rational functions). Lesson: partial fractions
  2. Write the form of the decomposition

    x(x+1)(x+2)=Ax+1+Bx+2(1)\frac{x}{(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 different linear factor of the denominator gets its own simple fraction with a constant on top. Adding Ax+1\frac{A}{x+1} and Bx+2\frac{B}{x+2} gives a fraction over (x+1)(x+2)(x+1)(x+2) with a numerator of degree at most 1, which is exactly the kind of numerator we have, so suitable AA⁠, BB exist.
    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)⁠:

    x=A(x+2)+B(x+1).(2)x = A(x+2) + B(x+1). \qquad (2)
    This removes every fraction. Identity (1) holds for every x≠−1,−2x \ne -1, -2⁠, so the two polynomials in (2) agree at infinitely many points. Two polynomials that agree at infinitely many points are the same polynomial, so (2) holds for every real xx⁠, including −1-1 and −2-2⁠.
    The book's Remark after Example 11 (Section 7.5): (1) is an identity. Basics: splitting fractions
  4. Find AA and BB by putting in the roots

    Put x=−1x = -1 in (2). The bracket (x+1)(x+1) becomes 0, so the BB term vanishes:

    −1=A(−1+2)+0=A,so A=−1.-1 = A(-1+2) + 0 = A, \quad\text{so } A = -1.

    Put x=−2x = -2 in (2). Now the bracket (x+2)(x+2) is 0:

    −2=0+B(−2+1)=−B,so B=2.-2 = 0 + B(-2+1) = -B, \quad\text{so } B = 2.
    Choosing xx to be a root of one factor makes that factor's term disappear and leaves a one-line equation for the other constant. This is allowed because (2) holds for every xx (Step 3).
  5. Confirm by comparing coefficients

    Expand the right side of (2): A(x+2)+B(x+1)A(x+2) + B(x+1) =(A+B)x+(2A+B)= (A+B)x + (2A+B)⁠. Compare with 1⋅x+01\cdot x + 0⁠:

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

    With A=−1A = -1⁠, B=2B = 2⁠: −1+2=1-1 + 2 = 1 and −2+2=0-2 + 2 = 0⁠. Both equations hold.

    This is the book's method (Example 11). It gives an independent check that the values from Step 4 are right. Solving the two equations directly gives the same answer: subtracting the first from the second, A=−1A = -1⁠, then B=2B = 2⁠.
    Equal polynomials have equal coefficients. Basics: splitting fractions
  6. Integrate the two simple fractions

    x(x+1)(x+2)=−1x+1+2x+2,\frac{x}{(x+1)(x+2)} = -\frac{1}{x+1} + \frac{2}{x+2}, ∫x dx(x+1)(x+2)=−∫dxx+1+2∫dxx+2=−log⁡∣x+1∣+2log⁡∣x+2∣+C.\begin{aligned} \int\frac{x\,dx}{(x+1)(x+2)} &= -\int\frac{dx}{x+1} + 2\int\frac{dx}{x+2} \\ &= -\log|x+1| + 2\log|x+2| + C. \end{aligned}
    The integral of a sum is the sum of the integrals, and constants move outside (Properties (III) and (IV), Section 7.2.1). Each piece is ∫dxx+k\int\frac{dx}{x+k}⁠: substitute t=x+kt = x+k⁠, dt=dxdt = dx⁠, and use ∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + C⁠.
    Standard formula (xii), Section 7.2. Basics: logarithms and 1/x
  7. Write it as one logarithm (the textbook's form)

    Since 2log⁡∣x+2∣=log⁡∣x+2∣22\log|x+2| = \log|x+2|^2 =log⁡(x+2)2= \log(x+2)^2⁠:

    −log⁡∣x+1∣+2log⁡∣x+2∣=log⁡(x+2)2∣x+1∣.-\log|x+1| + 2\log|x+2| = \log\frac{(x+2)^2}{|x+1|}.
    klog⁡p=log⁡pkk\log p = \log p^k and log⁡p−log⁡q=log⁡pq\log p - \log q = \log\frac pq for positive pp⁠, qq⁠. The absolute value on x+2x + 2 can be dropped because ∣x+2∣2=(x+2)2|x+2|^2 = (x+2)^2⁠.
  8. Check: differentiate the answer

    Using ddxlog⁡∣x+k∣=1x+k\frac{d}{dx}\log|x+k| = \frac{1}{x+k}⁠:

    ddx(−log⁡∣x+1∣+2log⁡∣x+2∣)=−1x+1+2x+2=−(x+2)+2(x+1)(x+1)(x+2)=x(x+1)(x+2). ✓\begin{aligned} &\frac{d}{dx}\big(-\log|x+1| + 2\log|x+2|\big) \\ &= -\frac{1}{x+1} + \frac{2}{x+2} \\ &= \frac{-(x+2) + 2(x+1)}{(x+1)(x+2)} \\ &= \frac{x}{(x+1)(x+2)}. \ \checkmark \end{aligned}
    Over the common denominator the numerator is −x−2+2x+2=x-x - 2 + 2x + 2 = x⁠, the original numerator. The answer is valid on every interval that avoids −1-1 and −2-2⁠.
    ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac1x⁠, Section 7.2, list item (xii). Basics: integration undoes differentiation
Result

For x≠−1,−2x \ne -1, -2⁠:

∫x dx(x+1)(x+2)=log⁡(x+2)2∣x+1∣+C,\int\frac{x\,dx}{(x+1)(x+2)} = \log\frac{(x+2)^2}{|x+1|} + C,

that is, 2log⁡∣x+2∣−log⁡∣x+1∣+C2\log|x+2| - \log|x+1| + C⁠. (Textbook answer: log⁡(x+2)2∣x+1∣+C\log\frac{(x+2)^2}{|x+1|} + C⁠.)

Check it with numbers

Decomposition at x=1x = 1⁠: the integrand is 12⋅3=16\frac{1}{2\cdot 3} = \frac16⁠, and −12+23=16-\frac12 + \frac23 = \frac16⁠. They agree.

Area check on [0,1][0, 1]⁠, where the integrand is continuous: with F(x)=log⁡(x+2)2∣x+1∣F(x) = \log\frac{(x+2)^2}{|x+1|}⁠,

F(1)−F(0)=log⁡92−log⁡4=log⁡98≈0.1177830.\begin{aligned} F(1) - F(0) &= \log\tfrac92 - \log 4 \\ &= \log\tfrac98 \approx 0.1177830. \end{aligned}

A computer adding very many thin strips under the curve from 0 to 1 also gets 0.11778300.1177830 (Section 7.8.3).

Common mistakes
  1. Sign slips when putting in a root. At x=−2x = -2⁠, B(x+1)=B(−1)=−BB(x+1) = B(-1) = -B⁠, so −2=−B-2 = -B gives B=2B = 2⁠, not −2-2⁠.
  2. Writing log⁡∣(x+1)(x+2)∣\log|(x+1)(x+2)|⁠. That would need the numerator to be the derivative of the denominator, 2x+32x + 3⁠; it is only xx⁠.
  3. Thinking x=−1x = -1 cannot be used. It cannot go into (1), but it can go into the cleared identity (2), which holds for all xx⁠.
What to take away
  1. Different linear factors: one constant over each factor.
  2. After clearing denominators, putting xx equal to each root gives each constant in one line.
  3. Each simple fraction Ax−a\frac{A}{x-a} integrates to Alog⁡∣x−a∣A\log|x-a|⁠.

Every fact used, and where it comes from

FactUsed inSource
Proper and improper rational functionsStep 1Section 7.5
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, 4Remark after Example 11, Section 7.5
Equal polynomials have equal coefficientsStep 5Algebra; Example 11 (Basics)
Integral of a sum; constants move outsideStep 6Properties (III), (IV), Section 7.2.1
∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + CStep 6Standard formula (xii), Section 7.2
klog⁡p=log⁡pkk\log p = \log p^k⁠; log⁡p−log⁡q=log⁡pq\log p - \log q = \log\frac pqStep 7Laws of logarithms (Basics)
ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac1xStep 8Section 7.2, list item (xii)
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 →