AP Calculus AB and BC

Integral of ln(x)/x: Answer, Proof, and Steps

The integral of ln(x)/x is (ln x)^2/2 + C. The substitution u = ln x works because du = dx/x, the other factor in the integrand, so the integral collapses to the integral of u du. Differentiating (ln x)^2/2 returns ln(x)/x, which confirms the answer.

lnxxdx=(lnx)22+C\int \frac{\ln x}{x}\,dx = \frac{(\ln x)^2}{2} + C

Substituting u = ln x

The integrand contains lnx\ln x next to 1x\frac{1}{x}, and 1x\frac{1}{x} is the derivative of lnx\ln x. That pairing of a function with its own derivative is the signal for substitution.

u=lnx,du=1xdxu = \ln x, \qquad du = \frac{1}{x}\,dx

Every piece of the integral has a replacement: lnx\ln x becomes uu and dxx\frac{dx}{x} becomes dudu.

lnxxdx=udu=u22+C=(lnx)22+C\int \frac{\ln x}{x}\,dx = \int u\,du = \frac{u^2}{2} + C = \frac{(\ln x)^2}{2} + C

Convert back to x

The answer must be written in the original variable. Stopping at u22+C\frac{u^2}{2} + C leaves an undefined letter in the answer and loses credit on the AP exam.

Checking by differentiating

Differentiate the result with the chain rule, treating (lnx)2(\ln x)^2 as an outer square applied to lnx\ln x.

ddx((lnx)22)=122lnx1x=lnxx\frac{d}{dx}\left(\frac{(\ln x)^2}{2}\right) = \frac{1}{2}\cdot 2\ln x\cdot\frac{1}{x} = \frac{\ln x}{x}

The 12\frac{1}{2} cancels the 22 the power rule brings down, and the chain rule supplies the 1x\frac{1}{x}. The integrand comes back exactly, so the antiderivative is right.

The mistakes students make

  • Dropping the 12\frac{1}{2} and writing (lnx)2(\ln x)^2. Differentiating that gives 2lnxx\frac{2\ln x}{x}, twice the integrand.
  • Confusing lnxx\frac{\ln x}{x} with 1xlnx\frac{1}{x\ln x}. The second one puts lnx\ln x in the denominator and integrates to lnlnx+C\ln|\ln x| + C.
  • Reaching for integration by parts. It does reach the same answer, but only after the integral reappears on both sides, so substitution is far shorter.
  • Writing lnx2\ln x^2 when (lnx)2(\ln x)^2 is meant. Those are different functions: lnx2=2lnx\ln x^2 = 2\ln x.

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

Does the answer need absolute value bars?

No. The integrand already requires x>0x > 0 for lnx\ln x to exist, so on the whole domain of the problem lnx\ln x is defined and (lnx)22+C\frac{(\ln x)^2}{2} + C needs no absolute values.

What is the integral of ln(x)/x from 1 to e?

1elnxxdx=[(lnx)22]1e=120=12\int_1^e \frac{\ln x}{x}\,dx = \left[\frac{(\ln x)^2}{2}\right]_1^e = \frac{1}{2} - 0 = \frac{1}{2}, since lne=1\ln e = 1 and ln1=0\ln 1 = 0.

How is this different from the integral of 1/(x ln x)?

Both use u=lnxu = \ln x, but the placement of lnx\ln x changes the outcome. Here the integral becomes udu=u22\int u\,du = \frac{u^2}{2}; there it becomes duu=lnu\int \frac{du}{u} = \ln|u|, giving lnlnx+C\ln|\ln x| + C.