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

Exercise 7.5 · Q8: ∫x(x−1)2(x+2) dx\int\frac{x}{(x-1)^2(x+2)}\,dx

Exercise 7.5Integration by partial fractions · Section 7.5
The question

Integrate the rational function:

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

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

Let

x(x−1)2(x+2)=Ax−1+B(x−1)2+Cx+2\begin{aligned} &\frac{x}{(x - 1)^2(x + 2)} \\ &= \frac{A}{x - 1} + \frac{B}{(x - 1)^2} + \frac{C}{x + 2} \end{aligned} ⇒ x=A(x−1)(x+2)+B(x+2)+C(x−1)2\begin{aligned} \Rightarrow\ x &= A(x - 1)(x + 2) \\ &\quad + B(x + 2) + C(x - 1)^2 \end{aligned}

Putting x=1x = 1⁠: 1=3B1 = 3B⁠, so B=13B = \frac13⁠.

Putting x=−2x = -2⁠: −2=9C-2 = 9C⁠, so C=−29C = -\frac29⁠.

Comparing coefficients of x2x^2⁠: A+C=0A + C = 0⁠, so A=29A = \frac29⁠.

∴ I=29∫dxx−1+13∫dx(x−1)2−29∫dxx+2=29log⁡∣x−1∣−13(x−1)−29log⁡∣x+2∣+c\begin{aligned} \therefore\ I &= \frac29\int\frac{dx}{x - 1} \\ &\quad + \frac13\int\frac{dx}{(x - 1)^2} \\ &\quad - \frac29\int\frac{dx}{x + 2} \\ &= \frac29\log|x - 1| - \frac{1}{3(x - 1)} \\ &\quad - \frac29\log|x + 2| + c \end{aligned}

∴ I=29log⁡∣x−1x+2∣\therefore\ I = \dfrac29\log\left|\dfrac{x - 1}{x + 2}\right| −13(x−1)+c- \dfrac{1}{3(x - 1)} + c⁠.

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

The one idea this problem is built on

The factor x−1x - 1 is repeated (squared). A repeated linear factor needs one fraction for each power: Ax−1+B(x−1)2\frac{A}{x-1} + \frac{B}{(x-1)^2}⁠, plus Cx+2\frac{C}{x+2} for the other factor (Table 7.2, row 4). The B(x−1)2\frac{B}{(x-1)^2} term integrates by the power rule, not to a logarithm.

Given, to find, and the plan
Given
f(x)=x(x−1)2(x+2)f(x) = \frac{x}{(x-1)^2(x+2)}⁠, defined for every real xx except x=1x = 1 and x=−2x = -2⁠.
To find
∫x(x−1)2(x+2) dx\displaystyle\int\frac{x}{(x-1)^2(x+2)}\,dx⁠.
Plan
(1) Check the fraction is proper. (2) Write the form (Table 7.2, row 4). (3) Clear denominators. (4) Put x=1x = 1 and x=−2x = -2 for BB and CC⁠; compare x2x^2 coefficients for AA⁠; check the rest. (5) Integrate, using the power rule for (x−1)−2(x-1)^{-2}⁠. (6) Differentiate back.

Basics you need

1Table 7.2, row 4

px2+qx+r(x−a)2(x−b)\frac{px^2+qx+r}{(x-a)^2(x-b)} =Ax−a+B(x−a)2+Cx−b= \frac{A}{x-a} + \frac{B}{(x-a)^2} + \frac{C}{x-b}⁠. Lesson: partial fractions

2Power rule for a shifted variable

∫tn dt=tn+1n+1+C\int t^n\,dt = \frac{t^{n+1}}{n+1} + C for n≠−1n \ne -1 (standard formula (i), Section 7.2). With t=x−1t = x - 1⁠, n=−2n = -2⁠: ∫dx(x−1)2=−1x−1+C\int\frac{dx}{(x-1)^2} = -\frac{1}{x-1} + C⁠. Basics: powers of x

3The logarithm integral

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

Solution

  1. Proper, with a repeated linear factor

    The numerator xx has degree 1; the denominator (x−1)2(x+2)(x-1)^2(x+2) has degree 3, so the fraction is proper. The factor x−1x - 1 appears twice and x+2x + 2 once.

    Row 4 of Table 7.2 covers exactly this: a proper fraction over (x−a)2(x−b)(x-a)^2(x-b)⁠, here with a=1a = 1⁠, b=−2b = -2⁠.
  2. Write the form of the decomposition

    x(x−1)2(x+2)=Ax−1+B(x−1)2+Cx+2(1)\begin{aligned} &\frac{x}{(x-1)^2(x+2)} \\ &\quad = \frac{A}{x-1} + \frac{B}{(x-1)^2} + \frac{C}{x+2} \qquad (1) \end{aligned}
    A repeated factor (x−1)2(x-1)^2 needs both Ax−1\frac{A}{x-1} and B(x−1)2\frac{B}{(x-1)^2}⁠. With only B(x−1)2+Cx+2\frac{B}{(x-1)^2} + \frac{C}{x+2} there would be two unknowns for three coefficients, and no solution in general.
    Table 7.2, row 4. Basics: splitting fractions
  3. Clear the denominators

    Multiply (1) by (x−1)2(x+2)(x-1)^2(x+2)⁠:

    x=A(x−1)(x+2)+B(x+2)+C(x−1)2.(2)x = A(x-1)(x+2) + B(x+2) + C(x-1)^2. \qquad (2)
    Ax−1\frac{A}{x-1} loses one factor x−1x - 1 and keeps (x−1)(x+2)(x-1)(x+2)⁠; B(x−1)2\frac{B}{(x-1)^2} keeps only x+2x + 2⁠; Cx+2\frac{C}{x+2} keeps (x−1)2(x-1)^2⁠. As before, (2) holds for every real xx because it is a polynomial identity.
    Remark after Example 11, Section 7.5.
  4. Find BB and CC by putting in the roots

    x=1x = 1⁠: the AA and CC terms vanish.

    1=B(1+2)=3B,so B=13.1 = B(1+2) = 3B, \quad\text{so } B = \tfrac13.

    x=−2x = -2⁠: the AA and BB terms vanish.

    −2=C(−2−1)2=9C,so C=−29.-2 = C(-2-1)^2 = 9C, \quad\text{so } C = -\tfrac29.
    Both the AA and CC terms contain the factor x−1x - 1⁠, so they vanish at x=1x = 1⁠. No root isolates AA⁠, so we need one more equation.
  5. Find AA by comparing x2x^2 coefficients, then check

    Expand: A(x−1)(x+2)=A(x2+x−2)A(x-1)(x+2) = A(x^2 + x - 2)⁠, B(x+2)B(x+2)⁠, C(x−1)2=C(x2−2x+1)C(x-1)^2 = C(x^2 - 2x + 1)⁠. The right side of (2) is

    (A+C)x2+(A+B−2C)x+(−2A+2B+C).(A + C)x^2 + (A + B - 2C)x + (-2A + 2B + C).

    The left side xx has no x2x^2 term, so A+C=0A + C = 0 and A=29A = \frac29⁠. Check the other two coefficients:

    x:29+39+49=1,const:−49+69−29=0.\begin{aligned} x:&\quad \tfrac29 + \tfrac39 + \tfrac49 = 1, \\ \text{const}:&\quad -\tfrac49 + \tfrac69 - \tfrac29 = 0. \end{aligned}
    These match the left side 1x+01x + 0⁠, so all three constants are confirmed.
    Equal polynomials have equal coefficients. Basics: splitting fractions
  6. Integrate the three simple fractions

    ∫f(x) dx=29∫dxx−1+13∫dx(x−1)2−29∫dxx+2.\begin{aligned} \int f(x)\,dx &= \frac29\int\frac{dx}{x-1} + \frac13\int\frac{dx}{(x-1)^2} \\ &\quad - \frac29\int\frac{dx}{x+2}. \end{aligned}

    For the middle integral put t=x−1t = x - 1⁠, dt=dxdt = dx⁠:

    ∫dx(x−1)2=∫t−2 dt=t−1−1=−1x−1.\int\frac{dx}{(x-1)^2} = \int t^{-2}\,dt = \frac{t^{-1}}{-1} = -\frac{1}{x-1}.

    So

    ∫f(x) dx=29log⁡∣x−1∣−13(x−1)−29log⁡∣x+2∣+C=29log⁡∣x−1x+2∣−13(x−1)+C.\begin{aligned} \int f(x)\,dx &= \frac29\log|x-1| - \frac{1}{3(x-1)} \\ &\quad - \frac29\log|x+2| + C \\ &= \frac29\log\left|\frac{x-1}{x+2}\right| - \frac{1}{3(x-1)} + C. \end{aligned}
    1(x−1)2\frac{1}{(x-1)^2} is a power t−2t^{-2} with n=−2≠−1n = -2 \ne -1⁠, so the power rule applies and there is no logarithm. The two logs combine because log⁡∣p∣−log⁡∣q∣=log⁡∣pq∣\log|p| - \log|q| = \log\left|\frac pq\right|⁠. The final CC is the arbitrary constant of integration, not the C=−29C = -\frac29 of the decomposition.
    Standard formulae (i) and (xii), Section 7.2; substitution, Section 7.3.1. Basics: powers of x
  7. Check: differentiate the answer

    Using ddx(−(x−1)−1)=(x−1)−2\frac{d}{dx}\big(-(x-1)^{-1}\big) = (x-1)^{-2}⁠:

    F′(x)=29(x−1)+13(x−1)2−29(x+2).F'(x) = \frac{2}{9(x-1)} + \frac{1}{3(x-1)^2} - \frac{2}{9(x+2)}.

    Over the common denominator 9(x−1)2(x+2)9(x-1)^2(x+2) the numerator is

    2(x−1)(x+2)+3(x+2)−2(x−1)2=(2x2+2x−4)+(3x+6)−(2x2−4x+2)=9x,\begin{aligned} &2(x-1)(x+2) + 3(x+2) - 2(x-1)^2 \\ &= (2x^2 + 2x - 4) + (3x + 6) \\ &\quad - (2x^2 - 4x + 2) = 9x, \end{aligned}

    so F′(x)=9x9(x−1)2(x+2)F'(x) = \frac{9x}{9(x-1)^2(x+2)} =x(x−1)2(x+2)= \frac{x}{(x-1)^2(x+2)}⁠. ✓

    The derivative returns the integrand. The answer is valid on each interval avoiding x=1x = 1 and x=−2x = -2⁠.
    Power rule and ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac1x⁠, Section 7.2. Basics: integration undoes differentiation
Result

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

∫x dx(x−1)2(x+2)=29log⁡∣x−1x+2∣−13(x−1)+C.\begin{aligned} &\int\frac{x\,dx}{(x-1)^2(x+2)} \\ &= \frac29\log\left|\frac{x-1}{x+2}\right| - \frac{1}{3(x-1)} + C. \end{aligned}

(Textbook answer: 29log⁡∣x−1x+2∣−13(x−1)+C\frac29\log\left|\frac{x-1}{x+2}\right| - \frac{1}{3(x-1)} + C⁠.)

Check it with numbers

Decomposition at x=2x = 2⁠: the integrand is 21⋅4=12\frac{2}{1\cdot 4} = \frac12⁠, and 2/91+1/31−2/94=8+12−236=12\frac{2/9}{1} + \frac{1/3}{1} - \frac{2/9}{4} = \frac{8 + 12 - 2}{36} = \frac12⁠.

Area check on [2,3][2, 3]⁠, where the integrand is continuous: with FF our answer,

F(3)−F(2)=29log⁡85+16≈0.2711119.F(3) - F(2) = \tfrac29\log\tfrac85 + \tfrac16 \approx 0.2711119.

Numerical integration from 2 to 3 also gives 0.27111190.2711119⁠.

Common mistakes
  1. Leaving out Ax−1\frac{A}{x-1}⁠. A squared factor needs a fraction for the first power and one for the square.
  2. ∫dx(x−1)2=log⁡(x−1)2\int\frac{dx}{(x-1)^2} = \log(x-1)^2⁠. Only the first power gives a logarithm; (x−1)−2(x-1)^{-2} integrates to −(x−1)−1-(x-1)^{-1}⁠.
  3. Hunting for a root that isolates AA⁠. There is none; use the x2x^2 coefficient (or any third value of xx⁠).
What to take away
  1. Repeated factor (x−a)2(x-a)^2⁠: fractions Ax−a\frac{A}{x-a} and B(x−a)2\frac{B}{(x-a)^2}⁠.
  2. The roots give BB and CC⁠; the top-power coefficient gives AA⁠.
  3. B(x−a)2\frac{B}{(x-a)^2} integrates to −Bx−a-\frac{B}{x-a}⁠.

Every fact used, and where it comes from

FactUsed inSource
Proper rational functionsStep 1Section 7.5
Form Ax−a+B(x−a)2+Cx−b\frac{A}{x-a} + \frac{B}{(x-a)^2} + \frac{C}{x-b}Step 2Table 7.2, row 4
The decomposition is an identitySteps 3, 4Remark after Example 11, Section 7.5
Equal polynomials have equal coefficientsStep 5Algebra (Basics)
∫tn dt=tn+1n+1+C\int t^n\,dt = \frac{t^{n+1}}{n+1} + C⁠, n≠−1n \ne -1Step 6Standard formula (i), Section 7.2
∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + CStep 6Standard formula (xii), Section 7.2
Substitution t=x−1t = x - 1Step 6Section 7.3.1
Derivatives of powers and of log⁡∣x∣\log|x|Step 7Section 7.2 (list items (i), (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 →