AP Calculus AB and BC

Integral of (ln x)^2/x: Substitution

The integral of ln x squared over x is ln x cubed over 3, plus C. The 1 over x is exactly the derivative of ln x, so substituting u equals ln x turns the integrand into u squared and the power rule finishes it.

∫(ln⁡x)2x dx=(ln⁡x)33+C\int \frac{\left(\ln x\right)^{2}}{x}\,dx = \frac{\left(\ln x\right)^{3}}{3} + C

One substitution, then the power rule

u=ln⁡x,du=dxx  ⟹  ∫u2du=u33+Cu = \ln x, \quad du = \frac{dx}{x} \implies \int u^{2}du = \frac{u^{3}}{3} + C

The general version is worth carrying: ∫(ln⁡x)nxdx=(ln⁡x)n+1n+1+C\int \frac{(\ln x)^{n}}{x}dx = \frac{(\ln x)^{n+1}}{n+1} + C for every n≠−1n \neq -1.

The excluded case

At n=−1n = -1 the integrand is 1xln⁡x\frac{1}{x\ln x} and the power rule fails, exactly as it does for ∫x−1dx\int x^{-1}dx. That case gives ln⁡∣ln⁡x∣+C\ln\left|\ln x\right| + C instead.

Common mistakes

  • Reading (ln⁡x)2\left(\ln x\right)^{2} as ln⁡(x2)\ln\left(x^{2}\right), which is 2ln⁡x2\ln x and a completely different integral.
  • Trying integration by parts.
  • Forgetting the 13\frac{1}{3}.

Every answer on this page is machine checked

An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.

Frequently asked questions

What is the integral of (ln x)^2/x?

It is (ln⁡x)33+C\frac{\left(\ln x\right)^{3}}{3} + C.

What is the general rule?

∫(ln⁡x)nxdx=(ln⁡x)n+1n+1+C\int \frac{(\ln x)^{n}}{x}dx = \frac{(\ln x)^{n+1}}{n+1} + C for n≠−1n \neq -1.