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

Exercise 7.6 · Q15: ∫(x2+1)log⁡x dx\int(x^2+1)\log x\,dx

Exercise 7.6Integration by parts · Section 7.6
The question

Integrate the functions in Exercises 1 to 22.

15.

(x2+1)log⁡x(x^2 + 1)\log x
Exam answer

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

Taking log⁡x\log x as the first function, by parts:

I=log⁡x(x33+x)−∫1x(x33+x)dx=(x33+x)log⁡x−∫(x23+1)dx\begin{aligned} I &= \log x\left(\frac{x^3}{3} + x\right) \\ &\quad - \int\frac1x\left(\frac{x^3}{3} + x\right)dx \\ &= \left(\frac{x^3}{3} + x\right)\log x \\ &\quad - \int\left(\frac{x^2}{3} + 1\right)dx \end{aligned}

∴ I=(x33+x)log⁡x\therefore\ I = \left(\dfrac{x^3}{3} + x\right)\log x −x39−x+C- \dfrac{x^3}{9} - x + C⁠.

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

The one idea this problem is built on

A polynomial times log⁡x\log x⁠: integrate by parts with log⁡x\log x as the first function. Its derivative 1x\frac1x divides the integrated polynomial x33+x\frac{x^3}{3} + x term by term, leaving a plain polynomial that the power rule finishes.

Given, to find, and the plan
Given
(x2+1)log⁡x(x^2+1)\log x⁠, defined for x>0x > 0⁠.
To find
∫(x2+1)log⁡x dx\int(x^2+1)\log x\,dx⁠.
Plan
(1) Choose log⁡x\log x first, x2+1x^2 + 1 second. (2) Apply parts. (3) Simplify and integrate the leftover polynomial. (4) Write the answer. (5) Differentiate back.

Basics you need

1Integration by parts

∫fg dx=f∫g dx−∫[f′∫g dx]dx\int f g\,dx = f\int g\,dx - \int\big[f'\int g\,dx\big]dx (Section 7.6). Lesson: integration by parts

2Derivative of log⁡x\log x

ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x for x>0x > 0⁠. Basics: logarithms and 1/x

3Power rule

∫xn dx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C⁠, n≠−1n \ne -1 (standard formula (i)); integrals of sums split (Section 7.2.1). Basics: powers of x

Solution

  1. Choose the first and second functions

    Take

    f(x)=log⁡x (first),g(x)=x2+1 (second).f(x) = \log x\ (\text{first}),\qquad g(x) = x^2 + 1\ (\text{second}).

    Then f′(x)=1xf'(x) = \frac1x and ∫(x2+1) dx=x33+x\int(x^2+1)\,dx = \frac{x^3}{3} + x⁠.

    Remark (iii), Section 7.6: a polynomial is usually the first function, but when the other factor is logarithmic, the logarithm is taken first. The reason is practical: log⁡x\log x has no simple integral, but its derivative 1x\frac1x is simple, while the polynomial is easy to integrate. (A common memory aid, not in the book, is ILATE: Inverse trigonometric, Logarithmic, Algebraic, Trigonometric, Exponential. L comes before A, so log⁡x\log x is uu and x2+1x^2 + 1 is dvdx\frac{dv}{dx}⁠.)
    Choice of first function: Remark (iii), Section 7.6. Lesson: integration by parts
  2. Apply the integration by parts formula

    ∫(x2+1)log⁡x dx=log⁡x(x33+x)−∫1x(x33+x)dx.\begin{aligned} &\int(x^2+1)\log x\,dx \\ &= \log x\left(\frac{x^3}{3} + x\right) - \int\frac1x\left(\frac{x^3}{3} + x\right)dx. \end{aligned}
    First function times the integral of the second, minus the integral of (derivative of the first) times (integral of the second).
  3. Simplify and integrate the leftover polynomial

    For x>0x > 0⁠, 1x(x33+x)=x23+1\frac1x\left(\frac{x^3}{3} + x\right) = \frac{x^2}{3} + 1⁠, so

    ∫(x23+1)dx=x39+x.\int\left(\frac{x^2}{3} + 1\right)dx = \frac{x^3}{9} + x.
    Divide each term by xx (allowed, x≠0x \ne 0⁠). Then integrate term by term: 13⋅x33=x39\frac13\cdot\frac{x^3}{3} = \frac{x^3}{9} and ∫1 dx=x\int 1\,dx = x⁠.
    Power rule (formula (i)) and linearity, properties (III) and (IV), Section 7.2.1. Basics: powers of x
  4. Write the answer

    ∫(x2+1)log⁡x dx=(x33+x)log⁡x−x39−x+C,\begin{aligned} &\int(x^2+1)\log x\,dx \\ &= \left(\frac{x^3}{3} + x\right)\log x - \frac{x^3}{9} - x + C, \end{aligned}

    for x>0x > 0⁠.

    The minus sign in front of the leftover integral applies to both of its terms. You could also split the question as ∫x2log⁡x dx+∫log⁡x dx\int x^2\log x\,dx + \int\log x\,dx (Exercise 7.6 Question 6 and Example 18); adding x33log⁡x−x39\frac{x^3}{3}\log x - \frac{x^3}{9} and xlog⁡x−xx\log x - x gives the same answer.
    One constant CC at the end (Section 7.2). Basics: integration undoes differentiation
  5. Check: differentiate the answer

    ddx[(x33+x)log⁡x−x39−x]=(x2+1)log⁡x+(x33+x)1x−x23−1=(x2+1)log⁡x+x23+1−x23−1=(x2+1)log⁡x.\begin{aligned} &\frac{d}{dx}\left[\left(\frac{x^3}{3} + x\right)\log x - \frac{x^3}{9} - x\right] \\ &= (x^2+1)\log x + \left(\frac{x^3}{3} + x\right)\frac1x - \frac{x^2}{3} - 1 \\ &= (x^2+1)\log x + \frac{x^2}{3} + 1 - \frac{x^2}{3} - 1 \\ &= (x^2+1)\log x. \end{aligned}
    The product rule on the first term gives (x2+1)log⁡x(x^2 + 1)\log x plus a polynomial part x23+1\frac{x^2}{3} + 1⁠, which the derivative of −x39−x-\frac{x^3}{9} - x cancels exactly. This holds for every x>0x > 0⁠.
    Product rule; ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠. Basics: integration undoes differentiation
Result ∫(x2+1)log⁡x dx=(x33+x)log⁡x−x39−x+C,\begin{aligned} &\int(x^2+1)\log x\,dx \\ &= \left(\frac{x^3}{3} + x\right)\log x - \frac{x^3}{9} - x + C, \end{aligned}

valid for x>0x > 0⁠. (Textbook answer: (x33+x)log⁡x−x39−x+C\left(\frac{x^3}{3} + x\right)\log x - \frac{x^3}{9} - x + C⁠, the same.)

Check it with numbers

On [1,e][1, e]⁠, with FF the answer without CC⁠, and log⁡e=1\log e = 1⁠, log⁡1=0\log 1 = 0⁠:

F(e)=e33+e−e39−e=2e39,F(1)=0−19−1=−109,F(e)−F(1)=2e3+109=5.5745637607…\begin{aligned} F(e) &= \frac{e^3}{3} + e - \frac{e^3}{9} - e = \frac{2e^3}{9}, \\ F(1) &= 0 - \frac19 - 1 = -\frac{10}{9}, \\ F(e) - F(1) &= \frac{2e^3 + 10}{9} = 5.5745637607\ldots \end{aligned}

Numerical integration of (x2+1)log⁡x(x^2+1)\log x over [1,e][1, e] gives 5.5745637607…5.5745637607\ldots⁠, the same.

Common mistakes
  1. Taking the polynomial as the first function. Then log⁡x\log x would have to be integrated as the second function, which needs another round of parts; possible, but longer and easy to get wrong.
  2. Applying the minus sign to only one term of x39+x\frac{x^3}{9} + x⁠.
  3. Dividing wrongly: 1x⋅x33=x23\frac1x\cdot\frac{x^3}{3} = \frac{x^2}{3}⁠, not x23x\frac{x^2}{3x} or x33x2\frac{x^3}{3x^2}⁠.
What to take away
  1. Polynomial times log⁡x\log x⁠: take log⁡x\log x first; the 1x\frac1x turns the integrated polynomial back into a polynomial.
  2. The minus sign in the parts formula applies to the whole leftover integral.

Every fact used, and where it comes from

FactUsed inSource
Integration by partsStep 2Section 7.6 (Lesson: integration by parts)
Logarithmic function taken as the first functionStep 1Remark (iii), Section 7.6
∫xn dx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C⁠; integral of a sumSteps 1, 3Standard formula (i), Section 7.2; properties (III), (IV), Section 7.2.1
∫log⁡x dx=xlog⁡x−x+C\int\log x\,dx = x\log x - x + CStep 4 (alternative)Example 18
ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠; product ruleSteps 1, 5Chapter 5, Sections 5.4 and 5.3
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 →