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

Example 16: ∫x2+x+1(x+2)(x2+1) dx\int\frac{x^2+x+1}{(x+2)(x^2+1)}\,dx

ExamplesPartial fractions · Section 7.5
The question

Find

∫x2+x+1(x+2)(x2+1) dx\int \frac{x^2+x+1}{(x+2)(x^2+1)}\,dx
Exam answer

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

Let

x2+x+1(x+2)(x2+1)=Ax+2+Bx+Cx2+1\begin{aligned} &\frac{x^2 + x + 1}{(x + 2)(x^2 + 1)} \\ &= \frac{A}{x + 2} + \frac{Bx + C}{x^2 + 1} \end{aligned} ⇒ x2+x+1=A(x2+1)+(Bx+C)(x+2)\begin{aligned} &\Rightarrow\ x^2 + x + 1 \\ &= A(x^2 + 1) \\ &\quad + (Bx + C)(x + 2) \end{aligned}

Putting x=−2x = -2⁠: 3=5A3 = 5A⁠, so A=35A = \frac35⁠.

Comparing coefficients of x2x^2⁠: A+B=1A + B = 1⁠, so B=25B = \frac25⁠.

Comparing constant terms: A+2C=1A + 2C = 1⁠, so C=15C = \frac15⁠.

∴ I=35∫dxx+2+15∫2x dxx2+1+15∫dxx2+1\begin{aligned} \therefore\ I &= \frac35\int\frac{dx}{x + 2} \\ &\quad + \frac15\int\frac{2x\,dx}{x^2 + 1} \\ &\quad + \frac15\int\frac{dx}{x^2 + 1} \end{aligned}

In the second integral put x2+1=tx^2 + 1 = t⁠. Then 2x dx=dt2x\,dx = dt⁠.

∫2x dxx2+1=∫dtt=log⁡∣t∣=log⁡(x2+1)\begin{aligned} \int\frac{2x\,dx}{x^2 + 1} &= \int\frac{dt}{t} = \log|t| \\ &= \log(x^2 + 1) \end{aligned}

∴ I=35log⁡∣x+2∣\therefore\ I = \dfrac35\log|x + 2| +15log⁡(x2+1)+ \dfrac15\log(x^2 + 1) +15tan⁡−1x+c+ \dfrac15\tan^{-1}x + c⁠.

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

The one idea this problem is built on

The factor x2+1x^2 + 1 cannot be split into real linear factors (it is never zero). Over such a quadratic the partial fraction needs a linear top, Bx+Cx2+1\frac{Bx + C}{x^2+1}⁠, not just a constant (Table 7.2, row 5). Then the piece Bx+Cx2+1\frac{Bx+C}{x^2+1} itself splits in two: the xx part is a multiple of 2xx2+1\frac{2x}{x^2+1}⁠, whose top is the derivative of its bottom (a logarithm), and the constant part is 1x2+1\frac{1}{x^2+1} (an inverse tangent).

Given, to find, and the plan
Given
x2+x+1(x+2)(x2+1)\frac{x^2+x+1}{(x+2)(x^2+1)}⁠, defined for every real xx except −2-2 (since x2+1≥1x^2 + 1 \ge 1⁠).
To find
Its indefinite integral.
Plan
(1) Check it is proper and write the form from Table 7.2, row 5. (2) Find AA⁠, BB⁠, CC⁠. (3) Split Bx+Cx2+1\frac{Bx+C}{x^2+1} into a log part and a tan⁡−1\tan^{-1} part. (4) Integrate. (5) Differentiate back.

Basics you need

1Partial fractions with an irreducible quadratic

Table 7.2, row 5: px2+qx+r(x−a)(x2+bx+c)\frac{px^2+qx+r}{(x-a)(x^2+bx+c)} is written as Ax−a+Bx+Cx2+bx+c\frac{A}{x-a} + \frac{Bx+C}{x^2+bx+c}⁠, when x2+bx+cx^2 + bx + c cannot be factorised further. Basics: splitting fractions

2Top equal to the derivative of the bottom

With t=x2+1t = x^2 + 1⁠, dt=2x dxdt = 2x\,dx⁠: ∫2xx2+1 dx=∫dtt=log⁡∣x2+1∣+C\int\frac{2x}{x^2+1}\,dx = \int\frac{dt}{t} = \log|x^2+1| + C (Section 7.3.1). Basics: substitution

3The inverse tangent integral

Standard formula (x): ∫dx1+x2=tan⁡−1x+C\int\frac{dx}{1+x^2} = \tan^{-1}x + C⁠. Basics: integration undoes differentiation

Solution

  1. Choose the form of the partial fractions

    The top has degree 2 and the bottom (x+2)(x2+1)(x+2)(x^2+1) has degree 3, so the fraction is proper. The factor x2+1x^2+1 has no real roots (its discriminant is 0−4=−4<00 - 4 = -4 < 0⁠), so it cannot be factorised further. By Table 7.2, row 5,

    x2+x+1(x+2)(x2+1)=Ax+2+Bx+Cx2+1.\frac{x^2+x+1}{(x+2)(x^2+1)} = \frac{A}{x+2} + \frac{Bx+C}{x^2+1}.

    Multiplying by (x+2)(x2+1)(x+2)(x^2+1)⁠:

    x2+x+1=A(x2+1)+(Bx+C)(x+2).x^2 + x + 1 = A(x^2+1) + (Bx+C)(x+2).
    A quadratic bottom allows a top of degree up to 1, so the general top is Bx+CBx + C⁠. Writing only Bx2+1\frac{B}{x^2+1} would leave too few constants to match a top of degree 2. (At this point the book's text cites "Table 2.2(5)". The form it then uses is row 5 of Table 7.2, the table of partial fractions in Section 7.5 of this chapter.)
    A quadratic x2+bx+cx^2 + bx + c has real factors only if b2−4c≥0b^2 - 4c \ge 0⁠. Lesson: partial fractions
  2. Find AA⁠, BB and CC

    The right side expands to (A+B)x2+(2B+C)x+(A+2C)(A+B)x^2 + (2B+C)x + (A+2C)⁠. Equating coefficients with x2+x+1x^2 + x + 1⁠:

    A+B=1,2B+C=1,A+2C=1.A + B = 1, \qquad 2B + C = 1, \qquad A + 2C = 1.

    Put x=−2x = -2 in the identity: 4−2+1=A(4+1)4 - 2 + 1 = A(4 + 1)⁠, so 5A=35A = 3 and A=35A = \frac35⁠. Then B=1−A=25B = 1 - A = \frac25 and C=1−2B=15C = 1 - 2B = \frac15⁠. The third equation checks: 35+25=1\frac35 + \frac25 = 1⁠. So

    A=35,B=25,C=15.A = \frac35, \qquad B = \frac25, \qquad C = \frac15.
    Substituting x=−2x = -2 kills the (Bx+C)(x+2)(Bx+C)(x+2) term and gives AA at once; the other two follow from the simpler equations. The unused equation A+2C=1A + 2C = 1 is a free check on all three values.
    An identity between polynomials holds for every xx⁠, so we may compare coefficients or substitute values. Basics: splitting fractions
  3. Rewrite the quadratic piece

    x2+x+1(x+2)(x2+1)=35(x+2)+25x+15x2+1=35(x+2)+15⋅2x+1x2+1=35(x+2)+15⋅2xx2+1+15⋅1x2+1.\begin{aligned} \frac{x^2+x+1}{(x+2)(x^2+1)} &= \frac{3}{5(x+2)} + \frac{\frac25 x + \frac15}{x^2+1} \\ &= \frac{3}{5(x+2)} + \frac15\cdot\frac{2x+1}{x^2+1} \\ &= \frac{3}{5(x+2)} + \frac15\cdot\frac{2x}{x^2+1} + \frac15\cdot\frac{1}{x^2+1}. \end{aligned}
    The derivative of x2+1x^2 + 1 is 2x2x⁠, and conveniently the top is 2x+12x + 1⁠. So we split it as 2xx2+1\frac{2x}{x^2+1} (top = derivative of bottom, a log) plus 1x2+1\frac{1}{x^2+1} (a standard inverse tangent).
    p+qr=pr+qr\frac{p + q}{r} = \frac pr + \frac qr⁠. Basics: splitting fractions
  4. Integrate the three pieces

    For the middle piece put t=x2+1t = x^2 + 1⁠, dt=2x dxdt = 2x\,dx⁠: ∫2x dxx2+1=∫dtt=log⁡∣x2+1∣\int\frac{2x\,dx}{x^2+1} = \int\frac{dt}{t} = \log|x^2+1|⁠. So

    ∫x2+x+1(x+2)(x2+1) dx=35∫dxx+2+15∫2x dxx2+1+15∫dxx2+1=35log⁡∣x+2∣+15log⁡∣x2+1∣+15tan⁡−1x+C.\begin{aligned} &\int\frac{x^2+x+1}{(x+2)(x^2+1)}\,dx \\ &= \frac35\int\frac{dx}{x+2} + \frac15\int\frac{2x\,dx}{x^2+1} + \frac15\int\frac{dx}{x^2+1} \\ &= \frac35\log|x+2| + \frac15\log|x^2+1| \\ &\quad + \frac15\tan^{-1}x + C. \end{aligned}

    Since x2+1>0x^2 + 1 > 0⁠, log⁡∣x2+1∣=log⁡(x2+1)\log|x^2+1| = \log(x^2+1)⁠.

    Three different standard results: a shifted 1x\frac1x (log), a top-is-derivative-of-bottom fraction (log), and 11+x2\frac{1}{1+x^2} (inverse tangent). The book keeps the bars, log⁡∣x2+1∣\log|x^2+1|⁠; they are harmless but unnecessary.
    Formulae (xii) and (x), and substitution (Section 7.3.1). Lesson: substitution
  5. Check: differentiate the answer

    ddx[35log⁡∣x+2∣+15log⁡(x2+1)+15tan⁡−1x]=35(x+2)+2x5(x2+1)+15(x2+1)=3(x2+1)+(2x+1)(x+2)5(x+2)(x2+1)=5x2+5x+55(x+2)(x2+1)=x2+x+1(x+2)(x2+1).\begin{aligned} &\frac{d}{dx}\left[\frac35\log|x+2| + \frac15\log(x^2+1) + \frac15\tan^{-1}x\right] \\ &= \frac{3}{5(x+2)} + \frac{2x}{5(x^2+1)} + \frac{1}{5(x^2+1)} \\ &= \frac{3(x^2+1) + (2x+1)(x+2)}{5(x+2)(x^2+1)} \\ &= \frac{5x^2 + 5x + 5}{5(x+2)(x^2+1)} = \frac{x^2+x+1}{(x+2)(x^2+1)}. \end{aligned}
    3x2+3+2x2+5x+2=5x2+5x+53x^2 + 3 + 2x^2 + 5x + 2 = 5x^2 + 5x + 5⁠, and the factor 5 cancels: the derivative is exactly the integrand.
    ddxlog⁡(x2+1)=2xx2+1\frac{d}{dx}\log(x^2+1) = \frac{2x}{x^2+1} (chain rule) and ddxtan⁡−1x=11+x2\frac{d}{dx}\tan^{-1}x = \frac{1}{1+x^2}⁠. Basics: integration undoes differentiation
Result ∫x2+x+1(x+2)(x2+1) dx=35log⁡∣x+2∣+15log⁡(x2+1)+15tan⁡−1x+C,\begin{aligned} &\int\frac{x^2+x+1}{(x+2)(x^2+1)}\,dx \\ &= \frac35\log|x+2| + \frac15\log(x^2+1) \\ &\quad + \frac15\tan^{-1}x + C, \end{aligned}

valid for x≠−2x \ne -2⁠. This is the book's answer (the book writes log⁡∣x2+1∣\log|x^2+1|⁠, which is the same thing because x2+1>0x^2 + 1 > 0⁠).

Check it with numbers

At a point. At x=1x = 1⁠: the integrand is 33⋅2=0.5\frac{3}{3\cdot 2} = 0.5⁠; the derivative of our answer is 315+210+110=0.5\frac{3}{15} + \frac{2}{10} + \frac{1}{10} = 0.5⁠.

Over an interval. On [0,1][0, 1]⁠:

F(1)−F(0)=35log⁡32+15log⁡2+π20=0.5389881336…\begin{aligned} F(1) - F(0) &= \frac35\log\frac32 + \frac15\log 2 + \frac{\pi}{20} \\ &= 0.5389881336\ldots \end{aligned}

Numerical integration over [0,1][0, 1] gives 0.5389881336…0.5389881336\ldots⁠, the same.

Common mistakes
  1. A constant top over the quadratic. Over x2+1x^2 + 1 the top must be Bx+CBx + C⁠.
  2. Integrating 2x+1x2+1\frac{2x+1}{x^2+1} in one go. Split it: 2xx2+1\frac{2x}{x^2+1} gives a log, 1x2+1\frac{1}{x^2+1} gives tan⁡−1x\tan^{-1}x⁠.
  3. Writing log⁡(x2+1)\log(x^2+1) for ∫dxx2+1\int\frac{dx}{x^2+1}⁠. That integral is tan⁡−1x\tan^{-1}x⁠; the log needs 2x2x on top.
What to take away
  1. Irreducible quadratic factor ⇒\Rightarrow linear top Bx+CBx + C in its partial fraction.
  2. Split Bx+Cx2+a2\frac{Bx + C}{x^2 + a^2} into a "derivative of the bottom" part (log) and a constant part (inverse tangent).
  3. Substituting the root of the linear factor gives its constant AA immediately.

Every fact used, and where it comes from

FactUsed inSource
Form Ax−a+Bx+Cx2+bx+c\frac{A}{x-a} + \frac{Bx+C}{x^2+bx+c}Steps 1, 2Table 7.2, row 5, Section 7.5 (Lesson: partial fractions)
Discriminant test for real factorsStep 1Quadratic equations (Class X/XI)
Equal polynomials have equal coefficientsStep 2Algebra (Class XI)
Substitution t=x2+1t = x^2 + 1Step 4Section 7.3.1 (Lesson: substitution)
∫dxx=log⁡∣x∣+C\int\frac{dx}{x} = \log|x| + C⁠; ∫dx1+x2=tan⁡−1x+C\int\frac{dx}{1+x^2} = \tan^{-1}x + CStep 4Standard formulae (xii) and (x), Section 7.2
Derivatives of log⁡∣u∣\log|u| and tan⁡−1x\tan^{-1}x⁠; chain ruleStep 5Section 7.2; Chapter 5
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 →