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

Example 38: ∫[log⁡(log⁡x)+1(log⁡x)2]dx\int\left[\log(\log x)+\frac{1}{(\log x)^2}\right]dx

ExamplesIntegration by parts · Miscellaneous Examples
The question

Find

∫[log⁡(log⁡x)+1(log⁡x)2]dx\int \left[\log(\log x) + \frac{1}{(\log x)^2}\right] dx
Exam answer

Let II be the given integral.

I=∫log⁡(log⁡x)⋅1 dx+∫dx(log⁡x)2\begin{aligned} I &= \int\log(\log x)\cdot 1\,dx \\ &\quad + \int\frac{dx}{(\log x)^2} \end{aligned}

By parts in the first integral, with log⁡(log⁡x)\log(\log x) as the first function and 1 as the second:

I=xlog⁡(log⁡x)−∫1xlog⁡x⋅x dx+∫dx(log⁡x)2=xlog⁡(log⁡x)−∫dxlog⁡x+∫dx(log⁡x)2…(i)\begin{aligned} I &= x\log(\log x) \\ &\quad - \int\frac{1}{x\log x}\cdot x\,dx \\ &\quad + \int\frac{dx}{(\log x)^2} \\ &= x\log(\log x) - \int\frac{dx}{\log x} \\ &\quad + \int\frac{dx}{(\log x)^2}\quad\ldots(\text{i}) \end{aligned}

Again by parts, with 1log⁡x\frac{1}{\log x} as the first function and 1 as the second:

∫dxlog⁡x=xlog⁡x−∫x(−1x(log⁡x)2)dx=xlog⁡x+∫dx(log⁡x)2…(ii)\begin{aligned} &\int\frac{dx}{\log x} \\ &= \frac{x}{\log x} \\ &\quad - \int x\left(-\frac{1}{x(\log x)^2}\right)dx \\ &= \frac{x}{\log x} + \int\frac{dx}{(\log x)^2}\quad\ldots(\text{ii}) \end{aligned}

Using (ii) in (i):

I=xlog⁡(log⁡x)−xlog⁡x−∫dx(log⁡x)2+∫dx(log⁡x)2\begin{aligned} I &= x\log(\log x) - \frac{x}{\log x} \\ &\quad - \int\frac{dx}{(\log x)^2} + \int\frac{dx}{(\log x)^2} \end{aligned}

∴ I=xlog⁡(log⁡x)−xlog⁡x+C\therefore\ I = x\log(\log x) - \dfrac{x}{\log x} + C⁠.

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

The one idea this problem is built on

Neither part can be integrated on its own with the functions of this course. But integrating log⁡(log⁡x)\log(\log x) by parts produces −∫dxlog⁡x-\int\frac{dx}{\log x}⁠, and integrating that by parts once more produces −∫dx(log⁡x)2-\int\frac{dx}{(\log x)^2}⁠, which is exactly cancelled by the second part of the given integrand. The question was built so that the impossible pieces cancel.

Given, to find, and the plan
Given
The integrand log⁡(log⁡x)+1(log⁡x)2\log(\log x) + \frac{1}{(\log x)^2}⁠, with log⁡\log the natural logarithm.
To find
Its indefinite integral, and where the answer is valid.
Plan
(1) Domain: x>1x > 1⁠. (2) Split into two integrals. (3) Parts on ∫1⋅log⁡(log⁡x) dx\int 1\cdot\log(\log x)\,dx⁠. (4) Parts on ∫1⋅1log⁡x dx\int 1\cdot\frac{1}{\log x}\,dx⁠. (5) Cancel. (6) Check by differentiating.

Basics you need

1Integration by parts (Section 7.6)∫f(x)g(x) dx=f(x)∫g(x) dx−∫[f′(x)∫g(x) dx]dx\begin{aligned}\int f(x)g(x)\,dx = {}&f(x)\int g(x)\,dx\\ &- \int\left[f'(x)\int g(x)\,dx\right]dx\end{aligned}

In words: first function times integral of the second, minus the integral of (derivative of the first times integral of the second). Lesson: integration by parts

2"1 as the second function"

When the integrand is a single function whose derivative is simple but whose integral is unknown (like log⁡x\log x or tan⁡−1x\tan^{-1}x⁠), write it as that function times 1, and take 1 as the second function: its integral is xx⁠.

3Derivatives by the chain rule

ddxlog⁡(log⁡x)=1log⁡x⋅1x\frac{d}{dx}\log(\log x) = \frac{1}{\log x}\cdot\frac{1}{x} and ddx1log⁡x=−1(log⁡x)2⋅1x\frac{d}{dx}\frac{1}{\log x} = -\frac{1}{(\log x)^2}\cdot\frac1x⁠. Basics: logarithms and 1/x

4Logarithms

log⁡u\log u is defined only for u>0u > 0⁠; log⁡x>0\log x > 0 exactly when x>1x > 1⁠. Basics: logarithms

Solution

  1. Where is the integrand defined?

    log⁡(log⁡x)\log(\log x) needs log⁡x>0\log x > 0⁠, that is x>1x > 1⁠. For such xx⁠, log⁡x≠0\log x \ne 0⁠, so 1(log⁡x)2\frac{1}{(\log x)^2} is defined too. The integrand is continuous on (1,∞)(1, \infty)⁠, and we work on that interval.

    A logarithm of a logarithm needs two conditions: x>0x > 0 for the inner log⁡x\log x⁠, and log⁡x>0\log x > 0 for the outer one. The second is the stronger. (The term 1(log⁡x)2\frac{1}{(\log x)^2} alone would also make sense for 0<x<10 < x < 1⁠, but the sum needs both terms.)
    log⁡x>0  ⟺  x>1\log x > 0 \iff x > 1⁠, since log⁡1=0\log 1 = 0 and log⁡\log is increasing.
  2. Split the integral

    I=∫log⁡(log⁡x) dx+∫dx(log⁡x)2.I = \int \log(\log x)\,dx + \int \frac{dx}{(\log x)^2} .
    The integral of a sum is the sum of the integrals (Property III, Section 7.2.1). We will work on the first integral and leave the second untouched, waiting for the cancellation.
  3. Parts on ∫log⁡(log⁡x) dx\int \log(\log x)\,dx⁠, with 1 as the second function

    Write log⁡(log⁡x)=log⁡(log⁡x)⋅1\log(\log x) = \log(\log x)\cdot 1⁠. First function f=log⁡(log⁡x)f = \log(\log x)⁠, second function g=1g = 1⁠. Then ∫g dx=x\int g\,dx = x and, by the chain rule,

    f′(x)=1log⁡x⋅1x=1xlog⁡x.f'(x) = \frac{1}{\log x}\cdot\frac{1}{x} = \frac{1}{x\log x} .

    Integration by parts gives

    ∫log⁡(log⁡x) dx=xlog⁡(log⁡x)−∫1xlog⁡x⋅x dx=xlog⁡(log⁡x)−∫dxlog⁡x.\begin{aligned}\int\log(\log x)\,dx &= x\log(\log x) - \int\frac{1}{x\log x}\cdot x\,dx\\ &= x\log(\log x) - \int\frac{dx}{\log x} .\end{aligned}

    So

    I=xlog⁡(log⁡x)−∫dxlog⁡x+∫dx(log⁡x)2(1)I = x\log(\log x) - \int\frac{dx}{\log x} + \int\frac{dx}{(\log x)^2} \qquad (1)
    We do not know an integral of log⁡(log⁡x)\log(\log x)⁠, but its derivative is simple. Taking 1 as the second function moves the work onto that derivative, and the factor xx from ∫1 dx\int 1\,dx cancels the 1x\frac1x in it.
    Chain rule: outer log⁡u\log u (derivative 1u\frac1u⁠), inner u=log⁡xu = \log x (derivative 1x\frac1x⁠). Lesson: integration by parts
  4. Parts again on ∫dxlog⁡x\int\frac{dx}{\log x}

    Write 1log⁡x=1log⁡x⋅1\frac{1}{\log x} = \frac{1}{\log x}\cdot 1⁠. First function f=1log⁡x=(log⁡x)−1f = \frac{1}{\log x} = (\log x)^{-1}⁠, second g=1g = 1⁠. By the chain rule,

    f′(x)=−(log⁡x)−2⋅1x=−1x(log⁡x)2.f'(x) = -(\log x)^{-2}\cdot\frac1x = -\frac{1}{x(\log x)^2} .

    So

    ∫dxlog⁡x=xlog⁡x−∫x(−1x(log⁡x)2)dx=xlog⁡x+∫dx(log⁡x)2(2)\begin{aligned}\int\frac{dx}{\log x} &= \frac{x}{\log x} - \int x\left(-\frac{1}{x(\log x)^2}\right)dx\\ &= \frac{x}{\log x} + \int\frac{dx}{(\log x)^2} \qquad (2)\end{aligned}
    The same trick again: 1 as the second function. It produces the integral ∫dx(log⁡x)2\int\frac{dx}{(\log x)^2}⁠, which is exactly the one already sitting in (1).
    ddxu−1=−u−2 dudx\frac{d}{dx}u^{-1} = -u^{-2}\,\frac{du}{dx} with u=log⁡xu = \log x⁠.
  5. Substitute (2) into (1): the hard integrals cancel

    I=xlog⁡(log⁡x)−xlog⁡x−∫dx(log⁡x)2+∫dx(log⁡x)2=xlog⁡(log⁡x)−xlog⁡x+C.\begin{aligned}I &= x\log(\log x) - \frac{x}{\log x} - \int\frac{dx}{(\log x)^2} + \int\frac{dx}{(\log x)^2}\\ &= x\log(\log x) - \frac{x}{\log x} + C .\end{aligned}
    The minus sign in front of ∫dxlog⁡x\int\frac{dx}{\log x} in (1) turns the +∫dx(log⁡x)2+\int\frac{dx}{(\log x)^2} of (2) into a minus, and it cancels the given second term. Each indefinite integral stands for a family of functions differing by constants, so "cancelling" them leaves an arbitrary constant: that is the CC⁠. It can be shown that ∫dxlog⁡x\int\frac{dx}{\log x} has no formula in terms of the functions of this course, which is why the cancellation is the only way through.
  6. Check: ddx\frac{d}{dx} of our answer

    Product rule on xlog⁡(log⁡x)x\log(\log x)⁠:

    ddx[xlog⁡(log⁡x)]=log⁡(log⁡x)+x⋅1xlog⁡x=log⁡(log⁡x)+1log⁡x.\frac{d}{dx}\big[x\log(\log x)\big] = \log(\log x) + x\cdot\frac{1}{x\log x} = \log(\log x) + \frac{1}{\log x} .

    Quotient rule on xlog⁡x\frac{x}{\log x}⁠:

    ddx[xlog⁡x]=log⁡x−x⋅1x(log⁡x)2=1log⁡x−1(log⁡x)2.\frac{d}{dx}\left[\frac{x}{\log x}\right] = \frac{\log x - x\cdot\frac1x}{(\log x)^2} = \frac{1}{\log x} - \frac{1}{(\log x)^2} .

    Subtracting:

    log⁡(log⁡x)+1log⁡x−1log⁡x+1(log⁡x)2=log⁡(log⁡x)+1(log⁡x)2.\log(\log x) + \frac{1}{\log x} - \frac{1}{\log x} + \frac{1}{(\log x)^2} = \log(\log x) + \frac{1}{(\log x)^2} .

    This is the integrand.

    The two 1log⁡x\frac{1}{\log x} terms cancel in the derivative, mirroring the cancellation of the integrals in Step 5.
Result

∫[log⁡(log⁡x)+1(log⁡x)2]dx=xlog⁡(log⁡x)−xlog⁡x+C\int\left[\log(\log x) + \frac{1}{(\log x)^2}\right]dx = x\log(\log x) - \frac{x}{\log x} + C for x>1x > 1⁠. This is the textbook's answer.

Check it with numbers

At x=ex = e⁠: log⁡e=1\log e = 1⁠, so the integrand is log⁡1+1=1\log 1 + 1 = 1⁠, and a numerical derivative of F(x)=xlog⁡(log⁡x)−xlog⁡xF(x) = x\log(\log x) - \frac{x}{\log x} at ee gives 1.0000001.000000⁠. At x=2x = 2⁠: integrand ≈1.714856\approx 1.714856⁠, numerical F′(2)≈1.714856F'(2) \approx 1.714856⁠. At x=5x = 5⁠: integrand ≈0.861942\approx 0.861942⁠, numerical F′(5)≈0.861942F'(5) \approx 0.861942⁠.

Definite check:

∫ee2[log⁡(log⁡x)+1(log⁡x)2]dx=F(e2)−F(e)≈1.427175−(−2.718282)=4.145457,\begin{aligned}&\int_e^{e^2}\left[\log(\log x) + \frac{1}{(\log x)^2}\right]dx\\ &= F(e^2) - F(e)\\ &\approx 1.427175 - (-2.718282)\\ &= 4.145457 ,\end{aligned}

matching numerical integration.

Common mistakes
  1. Differentiating log⁡(log⁡x)\log(\log x) as 1log⁡x\frac{1}{\log x}⁠. The chain rule adds the factor 1x\frac1x⁠.
  2. Trying to integrate 1(log⁡x)2\frac{1}{(\log x)^2} directly. There is no elementary formula; wait for it to cancel.
  3. Sign slip in Step 4. f′=−1x(log⁡x)2f' = -\frac{1}{x(\log x)^2}⁠, so "minus the integral" becomes "plus", and in (1) that plus is multiplied by the minus in front of ∫dxlog⁡x\int\frac{dx}{\log x}⁠.
  4. Forgetting the domain. The answer is valid only for x>1x > 1⁠.
What to take away
  1. "1 as the second function" turns ∫h(x) dx\int h(x)\,dx into x h(x)−∫x h′(x) dxx\,h(x) - \int x\,h'(x)\,dx⁠, useful whenever h′h' is simpler than hh⁠.
  2. When an integrand is a sum of two awkward terms, integrating one by parts may produce the other with the opposite sign.
  3. Equivalently: ddx[x h(x)]=h(x)+x h′(x)\frac{d}{dx}\left[x\,h(x)\right] = h(x) + x\,h'(x)⁠. Here h=log⁡(log⁡x)−1log⁡xh = \log(\log x) - \frac{1}{\log x} is chosen so that h+xh′h + x h' is the integrand.

Every fact used, and where it comes from

FactUsed inSource
log⁡u\log u needs u>0u > 0⁠; log⁡x>0  ⟺  x>1\log x > 0 \iff x > 1Step 1Properties of logarithms
Integral of a sumStep 2Section 7.2.1, Property III
Integration by parts; taking 1 as the second functionSteps 3, 4Section 7.6 (Lesson: integration by parts)
Chain, product and quotient rulesSteps 3, 4, 6Chapter 5, Sections 5.3 and 5.3.1
Constants of integration combine into one CCStep 5Section 7.2.1, Property II
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 →