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

Exercise 7.6 · Q6: ∫x2log⁡x dx\int x^2\log x\,dx

Exercise 7.6Integration by parts · Section 7.6
The question

Integrate the functions in Exercises 1 to 22.

6. x2log⁡xx^2\log x

Exam answer

Let I=∫x2log⁡x dxI = \displaystyle\int x^2\log x\,dx⁠.

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

I=log⁡x⋅x33−∫1x⋅x33 dx=x33log⁡x−13∫x2 dx=x33log⁡x−13⋅x33+C\begin{aligned} I &= \log x\cdot\frac{x^3}{3} - \int\frac1x\cdot\frac{x^3}{3}\,dx \\ &= \frac{x^3}{3}\log x - \frac13\int x^2\,dx \\ &= \frac{x^3}{3}\log x - \frac13\cdot\frac{x^3}{3} + C \end{aligned}

∴ I=x33log⁡x−x39+C\therefore\ I = \dfrac{x^3}{3}\log x - \dfrac{x^3}{9} + C⁠.

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

The one idea this problem is built on

Same pattern as Question 4: differentiate the logarithm (it becomes 1x\frac1x⁠) and integrate the power (it becomes x33\frac{x^3}{3}⁠). Their product x33⋅1x=x23\frac{x^3}{3}\cdot\frac1x = \frac{x^2}{3} is a plain power, so one use of integration by parts finishes the job.

Given, to find, and the plan
Given
The function x2log⁡xx^2\log x⁠, defined for x>0x > 0 (where log⁡x\log x is defined).
To find
∫x2log⁡x dx\int x^2\log x\,dx on x>0x > 0⁠.
Plan
(1) Name uu and dvdx\frac{dv}{dx}⁠. (2) Find dudx\frac{du}{dx} and vv⁠. (3) Apply the formula. (4) Finish the remaining integral. (5) Differentiate back.

Basics you need

1Integration by parts

Section 7.6, equation (1):

∫u dvdx dx=uv−∫v dudx dx,\int u\,\frac{dv}{dx}\,dx = uv - \int v\,\frac{du}{dx}\,dx,

with uu the first function (differentiated) and dvdx\frac{dv}{dx} the second (integrated to give vv⁠). Lesson: integration by parts

2Which factor should be uu⁠?

Remark (iii) after Example 17: when the other function is logarithmic, the logarithm is the first function. Memory aid ILATE (Inverse trigonometric, Logarithmic, Algebraic, Trigonometric, Exponential; not in the book): L before A.

3Derivative of log⁡x\log x

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

4Power rule

∫x2 dx=x33+C\int x^2\,dx = \frac{x^3}{3} + C (standard formula (i) with n=2n = 2⁠). Basics: powers of x

Solution

  1. Name uu and dvdx\frac{dv}{dx}

    u=log⁡x(first),dvdx=x2(second).\begin{aligned} u &= \log x \quad (\text{first}), \\ \frac{dv}{dx} &= x^2 \quad (\text{second}). \end{aligned}
    ILATE: Logarithmic before Algebraic. If x2x^2 were uu we would need ∫log⁡x dx\int\log x\,dx as vv⁠, and the remaining integral would still contain a logarithm. With u=log⁡xu = \log x⁠, the logarithm turns into the algebraic 1x\frac1x and disappears from the next integral.
    Remark (iii) after Example 17, Section 7.6. Lesson: integration by parts
  2. Find dudx\frac{du}{dx} and vv

    dudx=1x,v=∫x2 dx=x33.\frac{du}{dx} = \frac1x, \qquad v = \int x^2\,dx = \frac{x^3}{3}.
    Derivative of the logarithm (valid as x>0x > 0⁠), and the power rule with n=2n = 2⁠. No constant in vv (Remark (ii) after Example 17).
    Standard formulae (xii) and (i), Section 7.2. Basics: powers of x
  3. Apply the formula

    ∫x2log⁡x dx=uv−∫v dudx dx=x33log⁡x−∫x33⋅1x dx=x33log⁡x−13∫x2 dx.\begin{aligned} \int x^2\log x\,dx &= uv - \int v\,\frac{du}{dx}\,dx \\ &= \frac{x^3}{3}\log x - \int\frac{x^3}{3}\cdot\frac1x\,dx \\ &= \frac{x^3}{3}\log x - \frac13\int x^2\,dx. \end{aligned}
    x33⋅1x=x23\frac{x^3}{3}\cdot\frac1x = \frac{x^2}{3} because x≠0x \ne 0⁠. The constant 13\frac13 comes out of the integral.
    Section 7.6, equation (1); constant multiple rule (Section 7.2.1). Lesson: integration by parts
  4. Finish the remaining integral

    ∫x2log⁡x dx=x33log⁡x−13⋅x33+C=x33log⁡x−x39+C.\begin{aligned} \int x^2\log x\,dx &= \frac{x^3}{3}\log x - \frac13\cdot\frac{x^3}{3} + C \\ &= \frac{x^3}{3}\log x - \frac{x^3}{9} + C. \end{aligned}
    ∫x2 dx=x33\int x^2\,dx = \frac{x^3}{3} once more, and 13⋅13=19\frac13\cdot\frac13 = \frac19⁠.
    Standard formula (i), Section 7.2. Basics: powers of x
  5. Check: differentiate the answer

    ddx(x33log⁡x−x39)=x2log⁡x+x33⋅1x−3x29=x2log⁡x+x23−x23=x2log⁡x.\begin{aligned} &\frac{d}{dx}\Big(\frac{x^3}{3}\log x - \frac{x^3}{9}\Big) \\ &= x^2\log x + \frac{x^3}{3}\cdot\frac1x - \frac{3x^2}{9} \\ &= x^2\log x + \frac{x^2}{3} - \frac{x^2}{3} = x^2\log x. \end{aligned}
    Product rule on the first term; the two x23\frac{x^2}{3} terms cancel and the integrand remains, for every x>0x > 0⁠.
    Product rule; ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠. Basics: integration undoes differentiation
Result ∫x2log⁡x dx=x33log⁡x−x39+C,\int x^2\log x\,dx = \frac{x^3}{3}\log x - \frac{x^3}{9} + C,

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

Check it with numbers

With F(x)=x33log⁡x−x39F(x) = \frac{x^3}{3}\log x - \frac{x^3}{9}⁠, on [1,e][1, e]⁠:

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

Numerical integration of x2log⁡xx^2\log x over [1,e][1, e] gives 4.5745637607…4.5745637607\ldots⁠, the same.

Common mistakes
  1. Taking u=x2u = x^2⁠. The logarithm then stays inside the new integral.
  2. Last coefficient. 13∫x2 dx=x39\frac13\int x^2\,dx = \frac{x^3}{9}⁠, not x33\frac{x^3}{3}⁠.
  3. Forgetting the domain x>0x > 0⁠.
What to take away
  1. Logarithm times a power of xx⁠: the logarithm is uu⁠.
  2. For n≠−1n \ne -1⁠: ∫xnlog⁡x dx\int x^n\log x\,dx has the same shape of answer, xn+1n+1log⁡x\frac{x^{n+1}}{n+1}\log x minus xn+1(n+1)2\frac{x^{n+1}}{(n+1)^2}⁠, plus CC (Question 4 is n=1n = 1⁠).
  3. Check the coefficients by differentiating: the cancelling pair is a good sign.

Every fact used, and where it comes from

FactUsed inSource
Integration by partsStep 3Section 7.6, equation (1) (Lesson: integration by parts)
Logarithm as the first function (ILATE)Step 1Remark (iii) after Example 17, Section 7.6
No constant needed in vvStep 2Remark (ii) after Example 17, Section 7.6
ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x for x>0x > 0Steps 2, 5Standard formula (xii), Section 7.2; Chapter 5
Power ruleSteps 2, 4Standard formula (i), Section 7.2
Constant multiple ruleStep 3Property (IV), Section 7.2.1
Product ruleStep 5Chapter 5, Section 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 →