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.

(lnx)2xdx=(lnx)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=lnx,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: (lnx)nxdx=(lnx)n+1n+1+C\int \frac{(\ln x)^{n}}{x}dx = \frac{(\ln x)^{n+1}}{n+1} + C for every n1n \neq -1.

The excluded case

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

Common mistakes

  • Reading (lnx)2\left(\ln x\right)^{2} as ln(x2)\ln\left(x^{2}\right), which is 2lnx2\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 (lnx)33+C\frac{\left(\ln x\right)^{3}}{3} + C.

What is the general rule?

(lnx)nxdx=(lnx)n+1n+1+C\int \frac{(\ln x)^{n}}{x}dx = \frac{(\ln x)^{n+1}}{n+1} + C for n1n \neq -1.