AP Calculus BC

Integral of ln x / x^2: Parts, Not Substitution

The integral of ln x over x squared is minus the quantity ln x plus one, all divided by x, plus C. Integration by parts with u equal to ln x and dv equal to x to the power minus two dx is the route. Substitution works for ln x over x but not here.

lnxx2dx=lnx+1x+C\int \frac{\ln x}{x^{2}}\,dx = -\frac{\ln x + 1}{x} + C

Parts, with the power as dv

The two factors point in opposite directions. Logarithms get simpler when differentiated and messier when integrated, so u=lnxu = \ln x. The power x2x^{-2} integrates without effort, so dv=x2dxdv = x^{-2}dx, giving du=dxxdu = \frac{dx}{x} and v=1xv = -\frac{1}{x}.

lnxx2dx=lnxx+1x2dx\int\frac{\ln x}{x^{2}}\,dx = -\frac{\ln x}{x} + \int\frac{1}{x^{2}}\,dx
=lnxx1x+C=lnx+1x+C= -\frac{\ln x}{x} - \frac{1}{x} + C = -\frac{\ln x + 1}{x} + C

Both terms carry a factor of 1x-\frac{1}{x}, which is why the tidy form combines them over a single denominator. Note that the leftover integral x2dx\int x^{-2}dx is 1x-\frac{1}{x}, so the second minus sign is earned, not a slip.

One power away from a different problem

Set this beside lnxxdx\int\frac{\ln x}{x}dx. There the leftover factor 1xdx\frac{1}{x}\,dx is exactly d(lnx)d\left(\ln x\right), so u=lnxu = \ln x is a substitution and the answer is (lnx)22+C\frac{\left(\ln x\right)^{2}}{2} + C.

Change the denominator to x2x^{2} and that link breaks. Now 1x2dx\frac{1}{x^{2}}dx is not the differential of anything in the numerator, so substitution no longer finishes the job on its own and parts takes over. Substituting u=lnxu = \ln x does turn the integral into ueudu\int ue^{-u}\,du, but that one still needs parts. The integrands look almost identical; the deciding step is what differs.

Read the denominator first

With ln x over x, the leftover factor is the derivative of ln x, so it is u substitution. With ln x over x squared, it is not, so it is parts. On the exam, choosing correctly between those two is worth more than executing either one cleanly.

The mistakes students make

The first of these is the one examiners see most, because the two integrands sit next to each other in every textbook.

  • Reusing the answer to lnxxdx\int\frac{\ln x}{x}dx and writing (lnx)22+C\frac{\left(\ln x\right)^{2}}{2} + C. Its derivative is lnxx\frac{\ln x}{x}, which is missing a power of xx.
  • Taking v=1xv = \frac{1}{x} instead of 1x-\frac{1}{x}. That returns lnx+1x+C\frac{\ln x + 1}{x} + C, the exact negative of the correct antiderivative.
  • Integrating numerator and denominator separately, as though lnxx2dx\int\frac{\ln x}{x^{2}}dx were lnxdxx2dx\frac{\int \ln x\,dx}{\int x^{2}dx}. No such rule exists.

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

How do you integrate ln x / x^2?

It is lnx+1x+C-\frac{\ln x + 1}{x} + C, equivalently lnxx1x+C-\frac{\ln x}{x} - \frac{1}{x} + C.

Why is ln x over x^2 integration by parts but ln x over x is substitution?

Because substitution needs the derivative of lnx\ln x, which is 1x\frac{1}{x}, present as a factor. It is present in lnxx\frac{\ln x}{x} and absent in lnxx2\frac{\ln x}{x^{2}}.

What is the domain of this antiderivative?

Only x>0x > 0, since lnx\ln x is undefined otherwise. Any definite integral has to stay on the positive side of the origin.