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

Exercise 7.2 · Q2: ∫(log⁡x)2x dx\int \frac{(\log x)^2}{x}\,dx

Exercise 7.2Integration by substitution · Section 7.3.1
The question

Integrate the function:

(log⁡x)2x\frac{(\log x)^2}{x}
Exam answer

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

Put log⁡x=t\log x = t⁠. Then 1x dx=dt\frac1x\,dx = dt⁠.

∴ I=∫t2 dt=t33+C\therefore\ I = \int t^2\,dt = \frac{t^3}{3} + C

∴ I=13(log⁡x)3+C\therefore\ I = \dfrac13(\log x)^3 + C⁠.

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

The one idea this problem is built on

Read the integrand as (log⁡x)2(\log x)^2 times 1x\frac1x⁠. The second factor is the derivative of log⁡x\log x⁠. So with t=log⁡xt = \log x we have dt=dxxdt = \frac{dx}{x}⁠, and the integral becomes the simple power integral ∫t2 dt=t33\int t^2\,dt = \frac{t^3}{3}⁠.

Given, to find, and the plan
Given
The integrand f(x)=(log⁡x)2xf(x) = \dfrac{(\log x)^2}{x}⁠. Since log⁡x\log x is defined only for x>0x > 0⁠, the integrand lives on x>0x > 0⁠, where it is continuous.
To find
∫(log⁡x)2x dx\displaystyle\int \frac{(\log x)^2}{x}\,dx⁠.
Plan
(1) Recognise 1x\frac1x as the derivative of log⁡x\log x⁠. (2) Substitute t=log⁡xt = \log x⁠. (3) Use the power formula. (4) Return to xx⁠. (5) Differentiate to check. (6) Compare with the textbook's form.

Basics you need

1The derivative of log⁡x\log x

ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x for x>0x > 0 (Chapter 5, Theorem 5). Basics: logarithms and 1/x

2Substitution

Put t=g(x)t = g(x)⁠, so dt=g′(x) dxdt = g'(x)\,dx⁠; then ∫h(g(x)) g′(x) dx=∫h(t) dt\int h(g(x))\,g'(x)\,dx = \int h(t)\,dt (Section 7.3.1). Basics: substitution

3The power formula

∫tn dt=tn+1n+1+C\int t^n\,dt = \dfrac{t^{n+1}}{n+1} + C for n≠−1n \ne -1 (standard formula (i), Section 7.2). Basics: powers and the power rule

Solution

  1. Split the integrand to expose 1x\frac{1}{x}

    (log⁡x)2x=(log⁡x)2⋅1x.\frac{(\log x)^2}{x} = (\log x)^2\cdot\frac{1}{x}.
    Written this way the integrand is "a function of log⁡x\log x" times "the derivative of log⁡x\log x". That is the exact pattern that substitution handles: the inner expression is log⁡x\log x⁠, and its derivative 1x\frac1x is present as a factor.
    ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠, x>0x > 0⁠. Basics: logarithms and 1/x
  2. Substitute t=log⁡xt = \log x

    t=log⁡x,dtdx=1x,dt=dxx.\begin{aligned} t &= \log x, \\ \frac{dt}{dx} &= \frac{1}{x}, \\ dt &= \frac{dx}{x}. \end{aligned}

    Therefore

    ∫(log⁡x)2⋅dxx=∫t2 dt.\int (\log x)^2\cdot\frac{dx}{x} = \int t^2\,dt.
    The factor (log⁡x)2(\log x)^2 becomes t2t^2⁠, and the leftover dxx\frac{dx}{x} is exactly dtdt⁠. Every xx has been replaced, so the substitution is complete. As xx runs over (0,∞)(0, \infty)⁠, t=log⁡xt = \log x runs over all real numbers, and t2t^2 is defined for all of them.
    Substitution, Section 7.3.1. Lesson: integration by substitution
  3. Integrate with the power formula

    ∫t2 dt=t2+12+1+C=t33+C.\int t^2\,dt = \frac{t^{2+1}}{2+1} + C = \frac{t^3}{3} + C.
    The power formula with n=2n = 2 (allowed, since n≠−1n \ne -1⁠): raise the power by one and divide by the new power.
    Standard formula (i), Section 7.2. Basics: the power rule
  4. Return to xx

    t33+C=(log⁡x)33+C,x>0.\frac{t^3}{3} + C = \frac{(\log x)^3}{3} + C, \qquad x > 0.
    Replace tt by log⁡x\log x⁠. The answer must be stated in the original variable, on the original domain x>0x > 0⁠.
  5. Check: differentiate the answer

    Chain rule with inner u=log⁡xu = \log x and outer u33\frac{u^3}{3}⁠:

    ddx[(log⁡x)33]=3(log⁡x)23⋅ddx(log⁡x)=(log⁡x)2⋅1x=(log⁡x)2x.\begin{aligned} \frac{d}{dx}\left[\frac{(\log x)^3}{3}\right] &= \frac{3(\log x)^2}{3}\cdot\frac{d}{dx}(\log x) \\ &= (\log x)^2\cdot\frac{1}{x} \\ &= \frac{(\log x)^2}{x}. \end{aligned}

    We get back the integrand, so the answer is correct for every x>0x > 0⁠.

    Differentiation undoes integration (Property (I), Section 7.2.1), so getting the integrand back confirms the antiderivative.
    Power rule dduu3=3u2\frac{d}{du}u^3 = 3u^2 and the chain rule (Chapter 5, Theorem 4). Basics: integration undoes differentiation
  6. Compare with the textbook's form

    The answer key prints 13(log⁡∣x∣)3+C\frac13(\log|x|)^3 + C⁠. On our domain x>0x > 0 we have ∣x∣=x|x| = x⁠, so

    13(log⁡∣x∣)3=(log⁡x)33.\frac{1}{3}\left(\log|x|\right)^3 = \frac{(\log x)^3}{3}.

    The two answers are identical.

    The key's absolute value does no harm: it is the form that would also cover negative xx if the integrand were read as (log⁡∣x∣)2x\frac{(\log|x|)^2}{x}⁠. For the function as printed, log⁡x\log x needs x>0x > 0⁠, and there both forms agree.
Result

For x>0x > 0⁠,

∫(log⁡x)2x dx=(log⁡x)33+C.\int \frac{(\log x)^2}{x}\,dx = \frac{(\log x)^3}{3} + C.

(Textbook answer: 13(log⁡∣x∣)3+C\frac13(\log|x|)^3 + C⁠, the same thing for x>0x > 0⁠; see Step 6.)

Check it with numbers

Let F(x)=(log⁡x)33F(x) = \frac{(\log x)^3}{3}⁠. At x=3x = 3 the integrand is (log⁡3)23≈0.402316\frac{(\log 3)^2}{3} \approx 0.402316⁠. With h=0.0001h = 0.0001⁠:

F(3.0001)≈0.44202988556,F(2.9999)≈0.44194942230,F(3.0001)−F(2.9999)0.0002≈0.402316.\begin{aligned} F(3.0001) &\approx 0.44202988556, \\ F(2.9999) &\approx 0.44194942230, \\ \frac{F(3.0001)-F(2.9999)}{0.0002} &\approx 0.402316. \end{aligned}

The slope of FF matches the integrand.

Common mistakes
  1. Using ∫1x dx=log⁡∣x∣\int \frac1x\,dx = \log|x| on the whole thing. The integrand is not 1x\frac1x⁠; the factor (log⁡x)2(\log x)^2 changes everything. Substitute first.
  2. Writing (log⁡x)33x\frac{(\log x)^3}{3x}⁠. The 1x\frac1x was used up as dtdt⁠; it does not reappear.
  3. Confusing (log⁡x)2(\log x)^2 with log⁡(x2)\log(x^2)⁠. The first is the square of a log; the second equals 2log⁡x2\log x and would give a different integral.
What to take away
  1. A factor 1x\frac1x next to a function of log⁡x\log x is the signal for t=log⁡xt = \log x⁠.
  2. In general, for n≠−1n \ne -1 and x>0x > 0⁠, ∫(log⁡x)nx dx=(log⁡x)n+1n+1+C.\int \frac{(\log x)^n}{x}\,dx = \frac{(\log x)^{n+1}}{n+1} + C. Question 14 of this exercise uses the same idea with the power n=−mn = -m⁠.

Every fact used, and where it comes from

FactUsed inSource
ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠, x>0x > 0Steps 1, 2, 5Chapter 5, Theorem 5
Substitution t=g(x)t = g(x)⁠, dt=g′(x) dxdt = g'(x)\,dxStep 2Section 7.3.1 (Lesson: substitution)
∫tn dt=tn+1n+1+C\int t^n\,dt = \frac{t^{n+1}}{n+1} + C⁠, n≠−1n \ne -1Step 3Standard formula (i), Section 7.2
Chain ruleStep 5Chapter 5, Theorem 4
Checking by differentiationStep 5Property (I), Section 7.2.1
∣x∣=x|x| = x for x>0x > 0Step 6Definition of absolute value
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 →