← Back to all lessons
Class 12Calculus4:19Published 22 Sept 2025

Integral of log(log x) Plus One Over (log x) Squared

A worked Class 12 integration problem showing how to integrate log(log x) plus one over (log x) squared using integration by parts twice.

This lesson works through a frequently asked Class 12 integration question. The integrand is split into two pieces, each handled with integration by parts. The key insight is that the leftover integral from the first part and the integral of the second part are identical, so they cancel and leave a clean closed-form answer.

What you'll learn

  • How to split a sum inside an integral and integrate each part on its own
  • Using integration by parts with one as the second function
  • Spotting matching leftover integrals that cancel to give a tidy final answer

Lesson chapters

0:00The problem and splitting the integral
0:24Integrating log(log x) by parts
1:51Integrating one over log x by parts
3:23Combining results and cancelling
4:09Final answer

Lesson notes

This lesson works through a popular Class 12 integration question: integrate log(logx)+1(logx)2\log(\log x) + \dfrac{1}{(\log x)^2}. The strategy is to split the integrand into two parts and apply integration by parts to each, then notice that two leftover integrals cancel.

Setting up the split

We want

I=(log(logx)+1(logx)2)dx.I = \int \left( \log(\log x) + \frac{1}{(\log x)^2} \right) dx.

Split it into two integrals:

I=log(logx)dx+1(logx)2dx.I = \int \log(\log x)\, dx + \int \frac{1}{(\log x)^2}\, dx.

First part: integrating log(logx)\log(\log x)

Write log(logx)=log(logx)1\log(\log x) = \log(\log x)\cdot 1 and use integration by parts with log(logx)\log(\log x) as the first function and 11 as the second.

log(logx)dx=xlog(logx)ddx(log(logx))xdx.\int \log(\log x)\, dx = x\log(\log x) - \int \frac{d}{dx}\big(\log(\log x)\big)\cdot x\, dx.

By the chain rule, ddxlog(logx)=1logx1x\dfrac{d}{dx}\log(\log x) = \dfrac{1}{\log x}\cdot\dfrac{1}{x}, so the integrand simplifies:

1logx1xxdx=1logxdx.\int \frac{1}{\log x}\cdot\frac{1}{x}\cdot x\, dx = \int \frac{1}{\log x}\, dx.

Therefore

\int \log(\log x)\, dx = x\log(\log x) - \int \frac{1}{\log x}\, dx. \tag{2}

Second part: integrating 1logx\dfrac{1}{\log x}

Again take 1logx\dfrac{1}{\log x} as the first function and 11 as the second.

1logxdx=xlogxddx ⁣(1logx)xdx.\int \frac{1}{\log x}\, dx = \frac{x}{\log x} - \int \frac{d}{dx}\!\left(\frac{1}{\log x}\right)\cdot x\, dx.

Since ddx((logx)1)=1(logx)21x\dfrac{d}{dx}\left((\log x)^{-1}\right) = -\dfrac{1}{(\log x)^2}\cdot\dfrac{1}{x}, the leftover term becomes

x(1(logx)21x)dx=+1(logx)2dx.-\int x\left(-\frac{1}{(\log x)^2}\cdot\frac{1}{x}\right) dx = +\int \frac{1}{(\log x)^2}\, dx.

So

\int \frac{1}{\log x}\, dx = \frac{x}{\log x} + \int \frac{1}{(\log x)^2}\, dx. \tag{3}

Combining everything

Substitute (3)(3) into (2)(2), then put that into the original split for II:

I=xlog(logx)[xlogx+1(logx)2dx]+1(logx)2dx.I = x\log(\log x) - \left[ \frac{x}{\log x} + \int \frac{1}{(\log x)^2}\, dx \right] + \int \frac{1}{(\log x)^2}\, dx.

The two copies of 1(logx)2dx\displaystyle\int \frac{1}{(\log x)^2}\, dx have opposite signs and cancel:

I=xlog(logx)xlogx+c.I = x\log(\log x) - \frac{x}{\log x} + c.

Key takeaways

  • Splitting (f+g)dx\int(f+g)\,dx into fdx+gdx\int f\,dx + \int g\,dx lets you attack each piece separately.
  • Integration by parts with 11 as the second function is the standard trick for integrating a lone awkward function like log(logx)\log(\log x) or 1logx\tfrac{1}{\log x}.
  • The leftover 1(logx)2dx\int \tfrac{1}{(\log x)^2}\,dx produced by the first part cancels exactly with the second part, giving the clean result xlog(logx)xlogx+cx\log(\log x) - \tfrac{x}{\log x} + c.