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

Example 37: ∫x4(x−1)(x2+1) dx\int\frac{x^4}{(x-1)(x^2+1)}\,dx

ExamplesPartial fractions · Miscellaneous Examples
The question

Find

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

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

Dividing x4x^4 by (x−1)(x2+1)(x - 1)(x^2 + 1) =x3−x2+x−1= x^3 - x^2 + x - 1⁠,

x4(x−1)(x2+1)=x+1+1(x−1)(x2+1)\begin{aligned} &\frac{x^4}{(x - 1)(x^2 + 1)} \\ &= x + 1 + \frac{1}{(x - 1)(x^2 + 1)} \end{aligned}

Let

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

Putting x=1x = 1⁠: 1=2A1 = 2A⁠, so A=12A = \frac12⁠.

Comparing coefficients of x2x^2⁠: A+B=0A + B = 0⁠, so B=−12B = -\frac12⁠.

Comparing constant terms: A−C=1A - C = 1⁠, so C=−12C = -\frac12⁠.

∴ I=∫(x+1) dx+12∫dxx−1−12∫x dxx2+1−12∫dxx2+1\begin{aligned} \therefore\ I &= \int(x + 1)\,dx + \frac12\int\frac{dx}{x - 1} \\ &\quad - \frac12\int\frac{x\,dx}{x^2 + 1} \\ &\quad - \frac12\int\frac{dx}{x^2 + 1} \end{aligned}

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

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

∴ I=x22+x+12log⁡∣x−1∣\therefore\ I = \dfrac{x^2}{2} + x + \dfrac12\log|x - 1| −14log⁡(x2+1)−12tan⁡−1x- \dfrac14\log(x^2 + 1) - \dfrac12\tan^{-1}x +c+ c⁠.

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

The one idea this problem is built on

The numerator has degree 4 and the denominator degree 3, so the fraction is improper: first divide, to get a polynomial plus a proper fraction. The proper fraction has a linear factor x−1x - 1 and a quadratic factor x2+1x^2 + 1 that cannot be factorised, so it splits as Ax−1+Bx+Cx2+1\frac{A}{x-1} + \frac{Bx + C}{x^2+1} (Table 7.2, form 5). Each piece is then a standard integral: a polynomial, a logarithm, another logarithm, and an inverse tangent.

Given, to find, and the plan
Given
The rational function x4(x−1)(x2+1)\frac{x^4}{(x-1)(x^2+1)}⁠, defined for every real x≠1x \ne 1 (since x2+1>0x^2 + 1 > 0 always).
To find
Its indefinite integral.
Plan
(1) Long division. (2) Partial fractions of the remainder. (3) Integrate term by term. (4) Check by differentiating.

Basics you need

1Proper and improper rational functions (Section 7.5)

P(x)Q(x)\frac{P(x)}{Q(x)} is proper if deg⁡P<deg⁡Q\deg P < \deg Q⁠. If not, divide: PQ=T(x)+P1(x)Q(x)\frac{P}{Q} = T(x) + \frac{P_1(x)}{Q(x)} with TT a polynomial and P1Q\frac{P_1}{Q} proper. Basics: splitting fractions

2Table 7.2, form 5

When x2+bx+cx^2 + bx + c cannot be factorised,

px2+qx+r(x−a)(x2+bx+c)=Ax−a+Bx+Cx2+bx+c.\frac{px^2 + qx + r}{(x-a)(x^2+bx+c)} = \frac{A}{x-a} + \frac{Bx+C}{x^2+bx+c} .

Lesson: partial fractions

3Standard integrals

∫dxx−1=log⁡∣x−1∣+C\int\frac{dx}{x - 1} = \log|x - 1| + C⁠; ∫2x dxx2+1=log⁡(x2+1)+C\int\frac{2x\,dx}{x^2+1} = \log(x^2+1) + C (substitute u=x2+1u = x^2+1⁠); ∫dxx2+1=tan⁡−1x+C\int\frac{dx}{x^2+1} = \tan^{-1}x + C⁠. Basics: logarithms and 1/x

Solution

  1. Divide: the fraction is improper

    Expand the denominator: (x−1)(x2+1)=x3−x2+x−1(x-1)(x^2+1) = x^3 - x^2 + x - 1⁠. Divide x4x^4 by it:

    • x4÷x3=xx^4 \div x^3 = x⁠; subtract x(x3−x2+x−1)=x4−x3+x2−xx(x^3 - x^2 + x - 1) = x^4 - x^3 + x^2 - x⁠, leaving x3−x2+xx^3 - x^2 + x⁠.
    • x3÷x3=1x^3 \div x^3 = 1⁠; subtract 1⋅(x3−x2+x−1)1\cdot(x^3 - x^2 + x - 1)⁠, leaving 11⁠.

    So the quotient is x+1x + 1 and the remainder is 1. Indeed (x+1)(x3−x2+x−1)=x4−1(x+1)(x^3 - x^2 + x - 1) = x^4 - 1⁠, so

    x4(x−1)(x2+1)=(x+1)+1(x−1)(x2+1)(1)\frac{x^4}{(x-1)(x^2+1)} = (x + 1) + \frac{1}{(x-1)(x^2+1)} \qquad (1)
    Partial fractions only work for proper fractions. Dividing first separates out the polynomial part x+1x + 1⁠, which is easy to integrate, and leaves a proper fraction with numerator 1. The quick check x4=(x4−1)+1x^4 = (x^4 - 1) + 1 confirms the division.
    Dividend = divisor × quotient + remainder: x4=(x3−x2+x−1)(x+1)+1x^4 = (x^3 - x^2 + x - 1)(x + 1) + 1⁠.
  2. Set up the partial fractions

    The factor x2+1x^2 + 1 cannot be factorised over the reals (its discriminant is 0−4=−4<00 - 4 = -4 < 0⁠). So, by Table 7.2 (form 5),

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

    Multiplying both sides by (x−1)(x2+1)(x-1)(x^2+1)⁠:

    1=A(x2+1)+(Bx+C)(x−1)=(A+B)x2+(C−B)x+(A−C).\begin{aligned}1 &= A(x^2+1) + (Bx + C)(x - 1)\\ &= (A + B)x^2 + (C - B)x + (A - C) .\end{aligned}
    Over a quadratic factor that cannot be split, the numerator must be allowed to be linear, Bx+CBx + C⁠, not just a constant: a constant alone would not give enough freedom to match every proper fraction.
  3. Find AA⁠, BB⁠, CC

    The identity holds for every xx⁠, so the coefficients on both sides match:

    x2:A+B=0x:C−B=0constant:A−C=1\begin{aligned}x^2:&\quad A + B = 0\\ x:&\quad C - B = 0\\ \text{constant}:&\quad A - C = 1\end{aligned}

    From the second, C=BC = B⁠; from the first, B=−AB = -A⁠; so C=−AC = -A and the third gives A+A=1A + A = 1⁠. Hence

    A=12,B=C=−12.A = \frac12, \qquad B = C = -\frac12 .

    A quicker check for AA⁠: put x=1x = 1 in 1=A(x2+1)+(Bx+C)(x−1)1 = A(x^2+1) + (Bx+C)(x-1) to get 1=2A1 = 2A⁠. Substituting into (2):

    1(x−1)(x2+1)=12(x−1)−x2(x2+1)−12(x2+1)(3)\begin{aligned}&\frac{1}{(x-1)(x^2+1)}\\ &= \frac{1}{2(x-1)} - \frac{x}{2(x^2+1)} - \frac{1}{2(x^2+1)} \quad (3)\end{aligned}
    Two polynomials are equal for every xx only if their coefficients agree term by term. Three unknowns need three equations, one from each power x2x^2⁠, xx⁠, x0x^0⁠. We split −12x−12x2+1\frac{-\frac12 x - \frac12}{x^2+1} into two fractions because they integrate differently: one to a logarithm, the other to an inverse tangent.
    Check (3) at x=0x = 0⁠: left side 1(−1)(1)=−1\frac{1}{(-1)(1)} = -1⁠; right side −12−0−12=−1-\frac12 - 0 - \frac12 = -1⁠.
  4. Put it all together

    Substituting (3) into (1):

    x4(x−1)(x2+1)=(x+1)+12(x−1)−x2(x2+1)−12(x2+1).\begin{aligned}&\frac{x^4}{(x-1)(x^2+1)}\\ &= (x+1) + \frac{1}{2(x-1)} - \frac{x}{2(x^2+1)} - \frac{1}{2(x^2+1)} .\end{aligned}
    Now every term is one we know how to integrate. (The textbook prints the denominator here and in its final line as (x−1)(x2+x+1)(x-1)(x^2+x+1)⁠; that is a misprint for (x−1)(x2+1)(x-1)(x^2+1)⁠, the denominator used everywhere else in the solution.)
  5. Integrate term by term

    • ∫(x+1) dx=x22+x\int (x + 1)\,dx = \frac{x^2}{2} + x (power rule).
    • 12∫dxx−1=12log⁡∣x−1∣\frac12\int\frac{dx}{x - 1} = \frac12\log|x - 1| (standard formula (xii), with x−1x - 1 in place of xx⁠).
    • 12∫x dxx2+1\frac12\int\frac{x\,dx}{x^2+1}⁠: put u=x2+1u = x^2 + 1⁠, du=2x dxdu = 2x\,dx⁠, so it equals 14∫duu=14log⁡(x2+1)\frac14\int\frac{du}{u} = \frac14\log(x^2+1)⁠; no modulus is needed since x2+1>0x^2 + 1 > 0⁠.
    • 12∫dxx2+1=12tan⁡−1x\frac12\int\frac{dx}{x^2+1} = \frac12\tan^{-1}x (standard formula (x)).

    Collecting, with the signs from (3):

    ∫x4 dx(x−1)(x2+1)=x22+x+12log⁡∣x−1∣−14log⁡(x2+1)−12tan⁡−1x+C.\begin{aligned}\int \frac{x^4\,dx}{(x-1)(x^2+1)} = {}&\frac{x^2}{2} + x + \frac12\log|x-1|\\ &- \frac14\log(x^2+1) - \frac12\tan^{-1}x + C .\end{aligned}
    Integration is linear (Property V, Section 7.2.1), so each term is integrated separately and the constants of integration are gathered into one CC⁠. The answer is valid on each of the intervals x<1x < 1 and x>1x > 1⁠.
  6. Check: ddx\frac{d}{dx} of our answer

    Differentiate term by term:

    x+1+12(x−1)−2x4(x2+1)−12(x2+1)=x+1+12(x−1)−x+12(x2+1).\begin{aligned}&x + 1 + \frac{1}{2(x-1)} - \frac{2x}{4(x^2+1)} - \frac{1}{2(x^2+1)}\\ &= x + 1 + \frac{1}{2(x-1)} - \frac{x + 1}{2(x^2+1)} .\end{aligned}

    Combine the two fractions over 2(x−1)(x2+1)2(x-1)(x^2+1)⁠:

    (x2+1)−(x+1)(x−1)2(x−1)(x2+1)=x2+1−x2+12(x−1)(x2+1)=1(x−1)(x2+1).\begin{aligned}\frac{(x^2+1) - (x+1)(x-1)}{2(x-1)(x^2+1)} &= \frac{x^2 + 1 - x^2 + 1}{2(x-1)(x^2+1)}\\ &= \frac{1}{(x-1)(x^2+1)} .\end{aligned}

    So the derivative is (x+1)+1(x−1)(x2+1)(x + 1) + \frac{1}{(x-1)(x^2+1)}⁠, which by (1) is x4(x−1)(x2+1)\frac{x^4}{(x-1)(x^2+1)}⁠.

    The derivative of log⁡∣x−1∣\log|x - 1| is 1x−1\frac{1}{x-1} on both sides of 1, and that of log⁡(x2+1)\log(x^2+1) is 2xx2+1\frac{2x}{x^2+1} by the chain rule. Getting back exactly the integrand confirms the division, the partial fractions and the integration all at once.
Result

∫x4 dx(x−1)(x2+1)=x22+x+12log⁡∣x−1∣−14log⁡(x2+1)−12tan⁡−1x+C\begin{aligned}\int \frac{x^4\,dx}{(x-1)(x^2+1)} = {}&\frac{x^2}{2} + x + \frac12\log|x-1|\\ &- \frac14\log(x^2+1) - \frac12\tan^{-1}x + C\end{aligned} for x≠1x \ne 1⁠. This is the textbook's answer.

Check it with numbers

At x=2x = 2⁠: the integrand is 161⋅5=3.2\frac{16}{1\cdot 5} = 3.2⁠, and a numerical derivative of the answer at 2 gives 3.2000003.200000⁠. At x=−1x = -1⁠: integrand 1(−2)(2)=−0.25\frac{1}{(-2)(2)} = -0.25⁠, numerical derivative −0.250000-0.250000⁠. At x=3x = 3⁠: integrand 812⋅10=4.05\frac{81}{2\cdot 10} = 4.05⁠, numerical derivative 4.0500004.050000⁠.

Common mistakes
  1. Skipping the division. Partial fractions applied to the improper fraction directly cannot work: no choice of AA⁠, BB⁠, CC makes the degrees match.
  2. Using Bx2+1\frac{B}{x^2+1} instead of Bx+Cx2+1\frac{Bx+C}{x^2+1}⁠. Over an irreducible quadratic the numerator must be linear.
  3. Integrating xx2+1\frac{x}{x^2+1} as tan⁡−1x\tan^{-1}x, or 1x2+1\frac{1}{x^2+1} as a logarithm. The xx on top is what makes the logarithm.
  4. Forgetting the 14\frac14: 12⋅12log⁡(x2+1)\frac12\cdot\frac12\log(x^2+1)⁠, one half from (3) and one from du=2x dxdu = 2x\,dx⁠.
What to take away
  1. For a rational integrand: first compare degrees and divide if needed, then factorise the denominator, then use the matching form from Table 7.2.
  2. Over x2+1x^2 + 1⁠: the BxBx part integrates to a logarithm, the CC part to an inverse tangent.
  3. The cover-up shortcut (put x=1x = 1⁠) gives the coefficient over a linear factor immediately.

Every fact used, and where it comes from

FactUsed inSource
Improper fraction = polynomial + proper fractionStep 1Section 7.5 (Lesson: partial fractions)
Form Ax−a+Bx+Cx2+bx+c\frac{A}{x-a} + \frac{Bx+C}{x^2+bx+c}Step 2Table 7.2, form 5
Equal polynomials have equal coefficientsStep 3Algebra
∫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 5Section 7.2, standard formulae (xii) and (x)
Substitution u=x2+1u = x^2 + 1Step 5Section 7.3.1
Linearity of the integralStep 5Section 7.2.1, Property V
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 →