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

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

Exercise 7.2Integration by substitution · Section 7.3.1
The question

Integrate the function (Exercise 7.2, "Integrate the functions in Exercises 1 to 37"):

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

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

Put 1+log⁡x=t1 + \log x = t⁠. Then dxx=dt\frac{dx}{x} = dt⁠.

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

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

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

The one idea this problem is built on

The bracket 1+log⁡x1 + \log x has derivative 1x\frac1x⁠, and the integrand is divided by xx⁠. So with t=1+log⁡xt = 1 + \log x⁠, the factor dxx\frac{dx}{x} is exactly dtdt⁠, and the integral becomes ∫t2 dt\int t^2\,dt⁠.

Given, to find, and the plan
Given
f(x)=(1+log⁡x)2xf(x) = \dfrac{(1 + \log x)^2}{x}⁠, with log⁡\log the natural logarithm.
To find
∫f(x) dx\int f(x)\,dx⁠, and where the answer is valid.
Plan
(1) Domain: x>0x > 0⁠. (2) Substitute t=1+log⁡xt = 1 + \log x⁠, dt=dxxdt = \frac{dx}{x}⁠. (3) Integrate t2t^2⁠. (4) Return to xx⁠. (5) Differentiate back.

Basics you need

1log⁡x\log x and its derivative

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

2Substitution

If t=g(x)t = g(x)⁠, then dt=g′(x) dxdt = g'(x)\,dx and ∫h(g(x)) g′(x) dx=∫h(t) dt\int h(g(x))\,g'(x)\,dx = \int h(t)\,dt⁠. Basics: substitution (the chain rule backwards)

3Power rule

∫t2 dt=t33+C\int t^2\,dt = \frac{t^3}{3} + C (standard formula (i), Section 7.2). Basics: powers and the power rule

4Integration undoes differentiation

Check the answer by differentiating it. Basics: integration undoes differentiation

Solution

  1. Where is the integrand defined?

    log⁡x\log x needs x>0x > 0⁠; then also x≠0x \ne 0⁠, so dividing by xx is fine. The integrand is defined exactly for

    x>0.x > 0.
    The answer is claimed on this interval (Note, Section 7.2). 1+log⁡x1 + \log x itself can be negative (for x<1ex < \frac1e⁠); that does no harm, because it is only squared.
  2. Substitute t=1+log⁡xt = 1 + \log x

    Put t=1+log⁡xt = 1 + \log x⁠. Differentiate: the constant 1 gives 0 and log⁡x\log x gives 1x\frac1x⁠, so

    dtdx=1x,that is,dt=dxx.\frac{dt}{dx} = \frac1x, \quad\text{that is,}\quad dt = \frac{dx}{x}.

    Then

    ∫(1+log⁡x)2x dx=∫(1+log⁡x)2⋅dxx=∫t2 dt.\int\frac{(1 + \log x)^2}{x}\,dx = \int(1 + \log x)^2\cdot\frac{dx}{x} = \int t^2\,dt.
    The bracket 1+log⁡x1 + \log x appears raised to a power, and its derivative 1x\frac1x is the remaining factor. That is the signal for substitution (Section 7.3.1). Including the 1 in tt means the whole bracket becomes tt⁠.
    ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠, x>0x > 0 (Section 5.4; standard formula (xii), Section 7.2). Lesson: integration by substitution
  3. Integrate and return to xx

    ∫t2 dt=t33+C=13(1+log⁡x)3+C.\int t^2\,dt = \frac{t^3}{3} + C = \tfrac13(1 + \log x)^3 + C.
    Power rule with n=2n = 2⁠. Then tt is replaced by 1+log⁡x1 + \log x⁠, because the question is in xx⁠.
    Standard formula (i), Section 7.2. Basics: power rule
  4. Check: differentiate the answer back

    Let F(x)=13(1+log⁡x)3F(x) = \frac13(1 + \log x)^3⁠. Chain rule, outer 13u3\frac13u^3⁠, inner u=1+log⁡xu = 1 + \log x⁠:

    F′(x)=13⋅3(1+log⁡x)2⋅1x=(1+log⁡x)2x.F'(x) = \tfrac13\cdot 3(1 + \log x)^2\cdot\frac1x = \frac{(1 + \log x)^2}{x}.

    This is the integrand. ✓

    Property (I), Section 7.2.1: FF is an antiderivative of ff exactly when F′=fF' = f⁠.
    Chain rule, Theorem 4, Section 5.3.1. Basics: integration undoes differentiation
  5. Another way to see it: expand

    Expanding the cube,

    (1+log⁡x)3=1+3log⁡x+3(log⁡x)2+(log⁡x)3,\begin{aligned} (1 + \log x)^3 &= 1 + 3\log x \\ &\quad + 3(\log x)^2 + (\log x)^3, \end{aligned}

    so our answer is

    13+log⁡x+(log⁡x)2+13(log⁡x)3+C.\tfrac13 + \log x + (\log x)^2 + \tfrac13(\log x)^3 + C.

    The 13\frac13 is just a constant, so this is the same family as log⁡x+(log⁡x)2+13(log⁡x)3+C\log x + (\log x)^2 + \frac13(\log x)^3 + C⁠, which a student who first expands (1+log⁡x)2(1 + \log x)^2 and substitutes t=log⁡xt = \log x would get.

    Both routes are correct; their answers differ only by the constant 13\frac13 (Property (II), Section 7.2.1). Keeping the bracket whole, as in Steps 2–3, is shorter.
Result

∫(1+log⁡x)2x dx=13(1+log⁡x)3+C,x>0.\int\frac{(1 + \log x)^2}{x}\,dx = \tfrac13(1 + \log x)^3 + C, \quad x > 0. (Textbook answer: 13(1+log⁡x)3+C\frac13(1 + \log x)^3 + C⁠.)

Check it with numbers

Take x=2x = 2 and h=0.001h = 0.001⁠:

  • F(2.001)≈1.6193751837F(2.001) \approx 1.6193751837 and F(1.999)≈1.6165084364F(1.999) \approx 1.6165084364⁠,
  • slope ≈1.6193751837−1.61650843640.002\approx \frac{1.6193751837 - 1.6165084364}{0.002} ≈1.43337\approx 1.43337⁠,
  • integrand: (1+log⁡2)22=(1.693147)22=1.43337\frac{(1 + \log 2)^2}{2} = \frac{(1.693147)^2}{2} = 1.43337⁠. ✓
Common mistakes
  1. Treating 1x\frac{1}{x} as part of the bracket. It is the derivative of log⁡x\log x⁠, and becomes dtdt⁠.
  2. Integrating the factors separately. The integral of a product is not the product of the integrals: 13(1+log⁡x)3⋅log⁡∣x∣\frac13(1 + \log x)^3\cdot\log|x| is wrong. The factor 1x\frac1x is absorbed into dtdt⁠.
  3. Forgetting the domain. The answer holds for x>0x > 0 only.
What to take away
  1. Any integrand of the form h(log⁡x)x\frac{h(\log x)}{x} is handled by t=log⁡xt = \log x (or t=a+log⁡xt = a + \log x⁠).
  2. ∫g(x)ng′(x) dx=g(x)n+1n+1+C\int g(x)^n g'(x)\,dx = \frac{g(x)^{n+1}}{n+1} + C for n≠−1n \ne -1⁠.
  3. Expanding first also works, but the answers then differ by a constant.

Every fact used, and where it comes from

FactUsed inSource
log⁡x\log x defined for x>0x > 0⁠; ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1xSteps 1, 2Section 5.4
Substitution t=1+log⁡xt = 1 + \log xStep 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 rule; F′=fF' = f checks the answerStep 4Theorem 4, Section 5.3.1; Property (I), Section 7.2.1
Antiderivatives of the same function differ by a constantStep 5Property (II), Section 7.2.1
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 →