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

Exercise 7.5 · Q5: ∫2xx2+3x+2 dx\int\frac{2x}{x^2+3x+2}\,dx

Exercise 7.5Integration by partial fractions · Section 7.5
The question

Integrate the rational function:

2xx2+3x+2\frac{2x}{x^2+3x+2}
Exam answer

Let I=∫2xx2+3x+2 dxI = \displaystyle\int\frac{2x}{x^2 + 3x + 2}\,dx⁠.

Here x2+3x+2=(x+1)(x+2)x^2 + 3x + 2 = (x + 1)(x + 2)⁠. Let

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

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

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

∴ I=−2∫dxx+1+4∫dxx+2\therefore\ I = -2\int\frac{dx}{x + 1} + 4\int\frac{dx}{x + 2}

∴ I=4log⁡∣x+2∣−2log⁡∣x+1∣+C\therefore\ I = 4\log|x + 2| - 2\log|x + 1| + C⁠.

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

The one idea this problem is built on

First factor the quadratic denominator: x2+3x+2=(x+1)(x+2)x^2 + 3x + 2 = (x+1)(x+2)⁠. Then the fraction is proper with two different linear factors, so it splits as Ax+1+Bx+2\frac{A}{x+1} + \frac{B}{x+2} and each part integrates to a logarithm.

Given, to find, and the plan
Given
f(x)=2xx2+3x+2f(x) = \frac{2x}{x^2+3x+2}⁠, defined for every real xx except where x2+3x+2=0x^2 + 3x + 2 = 0⁠, that is x=−1x = -1 and x=−2x = -2⁠.
To find
∫2xx2+3x+2 dx\displaystyle\int\frac{2x}{x^2+3x+2}\,dx⁠.
Plan
(1) Factor the denominator; check the fraction is proper. (2) Write the form (Table 7.2, row 1). (3) Clear denominators. (4) Find AA⁠, BB by putting x=−1x = -1⁠, −2-2⁠; confirm by coefficients. (5) Integrate. (6) Differentiate back.

Basics you need

1Factorising a quadratic

x2+3x+2x^2 + 3x + 2⁠: find two numbers whose product is 2 and whose sum is 3. They are 1 and 2, so x2+3x+2=(x+1)(x+2)x^2+3x+2 = (x+1)(x+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}⁠. Lesson: partial fractions

3The logarithm integral

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

Solution

  1. Factor the denominator; the fraction is proper

    x2+3x+2=(x+1)(x+2),x^2 + 3x + 2 = (x+1)(x+2),

    since (x+1)(x+2)=x2+2x+x+2(x+1)(x+2) = x^2 + 2x + x + 2 =x2+3x+2= x^2 + 3x + 2⁠. The numerator 2x2x has degree 1, less than 2, so the fraction is proper, and the two linear factors are different.

    Partial fractions work on the factors of the denominator, so the denominator must first be factorised. Expanding the product back confirms the factorisation.
  2. Write the form of the decomposition

    2x(x+1)(x+2)=Ax+1+Bx+2(1)\frac{2x}{(x+1)(x+2)} = \frac{A}{x+1} + \frac{B}{x+2} \qquad (1)
    One unknown constant over each different linear factor.
    Table 7.2, row 1. Lesson: partial fractions
  3. Clear the denominators

    Multiply (1) by (x+1)(x+2)(x+1)(x+2)⁠:

    2x=A(x+2)+B(x+1).(2)2x = A(x+2) + B(x+1). \qquad (2)
    (1) holds for every x≠−1,−2x \ne -1, -2⁠, so the polynomials in (2) agree at infinitely many points; hence (2) holds for every real xx⁠.
    Remark after Example 11, Section 7.5.
  4. Find AA and BB

    x=−1x = -1⁠: 2(−1)=A(1)+02(-1) = A(1) + 0⁠, so A=−2A = -2⁠.

    x=−2x = -2⁠: 2(−2)=0+B(−1)2(-2) = 0 + B(-1)⁠, so −4=−B-4 = -B and B=4B = 4⁠.

    Confirm by comparing coefficients: the right side of (2) is (A+B)x+(2A+B)(A+B)x + (2A+B)⁠, and the left side is 2x+02x + 0⁠:

    coefficient of x:A+B=−2+4=2,constant term:2A+B=−4+4=0.\begin{aligned} \text{coefficient of } x:&\quad A + B = -2 + 4 = 2, \\ \text{constant term}:&\quad 2A + B = -4 + 4 = 0. \end{aligned}
    Putting in a root removes one term; the coefficient comparison is an independent check of both values.
  5. Integrate the two simple fractions

    2xx2+3x+2=−2x+1+4x+2,\frac{2x}{x^2+3x+2} = -\frac{2}{x+1} + \frac{4}{x+2}, ∫2x dxx2+3x+2=−2∫dxx+1+4∫dxx+2=4log⁡∣x+2∣−2log⁡∣x+1∣+C.\begin{aligned} \int\frac{2x\,dx}{x^2+3x+2} &= -2\int\frac{dx}{x+1} + 4\int\frac{dx}{x+2} \\ &= 4\log|x+2| - 2\log|x+1| + C. \end{aligned}
    Integral of a sum, constants outside (Properties (III), (IV), Section 7.2.1); each piece is ∫dxx+k=log⁡∣x+k∣\int\frac{dx}{x+k} = \log|x+k|⁠.
    Standard formula (xii), Section 7.2. Basics: logarithms and 1/x
  6. Check: differentiate the answer

    ddx(4log⁡∣x+2∣−2log⁡∣x+1∣)=4x+2−2x+1=4(x+1)−2(x+2)(x+1)(x+2)=2xx2+3x+2. ✓\begin{aligned} &\frac{d}{dx}\big(4\log|x+2| - 2\log|x+1|\big) \\ &= \frac{4}{x+2} - \frac{2}{x+1} \\ &= \frac{4(x+1) - 2(x+2)}{(x+1)(x+2)} \\ &= \frac{2x}{x^2+3x+2}. \ \checkmark \end{aligned}
    The numerator 4x+4−2x−4=2x4x + 4 - 2x - 4 = 2x is the original numerator. The answer is valid on every interval avoiding −1-1 and −2-2⁠.
    ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac1x⁠, Section 7.2, list item (xii). Basics: integration undoes differentiation
  7. A link with Q1

    The integrand here is exactly twice the integrand of Q1, x(x+1)(x+2)\frac{x}{(x+1)(x+2)}⁠, whose integral was 2log⁡∣x+2∣−log⁡∣x+1∣+C2\log|x+2| - \log|x+1| + C⁠. Twice that is 4log⁡∣x+2∣−2log⁡∣x+1∣4\log|x+2| - 2\log|x+1|⁠, matching our answer.

    A constant factor comes straight through an integral (Property (IV), Section 7.2.1), so the two answers must be in the ratio 2 : 1. This is a free consistency check.
    Property (IV), Section 7.2.1.
Result

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

∫2x dxx2+3x+2=4log⁡∣x+2∣−2log⁡∣x+1∣+C.\int\frac{2x\,dx}{x^2+3x+2} = 4\log|x+2| - 2\log|x+1| + C.

(Textbook answer: 4log⁡∣x+2∣−2log⁡∣x+1∣+C4\log|x+2| - 2\log|x+1| + C⁠.)

Check it with numbers

Decomposition at x=1x = 1⁠: the integrand is 26=13\frac{2}{6} = \frac13⁠, and −22+43=13-\frac22 + \frac43 = \frac13⁠.

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

F(1)−F(0)=(4log⁡3−2log⁡2)−4log⁡2=log⁡8164≈0.2355661.\begin{aligned} F(1) - F(0) &= (4\log 3 - 2\log 2) - 4\log 2 \\ &= \log\tfrac{81}{64} \approx 0.2355661. \end{aligned}

Numerical integration from 0 to 1 also gives 0.23556610.2355661⁠.

Common mistakes
  1. Treating the numerator as the derivative of the denominator. The derivative of x2+3x+2x^2+3x+2 is 2x+32x + 3⁠, not 2x2x⁠, so the answer is not log⁡∣x2+3x+2∣\log|x^2+3x+2|⁠.
  2. Sign at x=−2x = -2⁠. B(x+1)B(x+1) at x=−2x = -2 is −B-B⁠; from −4=−B-4 = -B⁠, B=4B = 4⁠.
  3. Splitting before factorising. The decomposition needs the factors (x+1)(x+2)(x+1)(x+2)⁠, not the expanded quadratic.
What to take away
  1. Factorise the denominator first; then choose the form from Table 7.2.
  2. Constant multiples of an integrand give the same multiple of its integral, a quick cross-check between questions.

Every fact used, and where it comes from

FactUsed inSource
Factorising x2+3x+2x^2 + 3x + 2Step 1Algebra (Basics)
Proper 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
The decomposition is an identitySteps 3, 4Remark after Example 11, Section 7.5
Integral of a sum; constants outsideSteps 5, 7Properties (III), (IV), Section 7.2.1
∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + CStep 5Standard formula (xii), Section 7.2
ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac1xStep 6Section 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 →