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.

∫ln⁡xx dx=(ln⁡x)22+C\int \frac{\ln x}{x}\,dx = \frac{(\ln x)^2}{2} + C

Substituting u = ln x

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

u=ln⁡x,du=1x dxu = \ln x, \qquad du = \frac{1}{x}\,dx

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

∫ln⁡xx dx=∫u du=u22+C=(ln⁡x)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 (ln⁡x)2(\ln x)^2 as an outer square applied to ln⁡x\ln x.

ddx((ln⁡x)22)=12⋅2ln⁡x⋅1x=ln⁡xx\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 (ln⁡x)2(\ln x)^2. Differentiating that gives 2ln⁡xx\frac{2\ln x}{x}, twice the integrand.
  • Confusing ln⁡xx\frac{\ln x}{x} with 1xln⁡x\frac{1}{x\ln x}. The second one puts ln⁡x\ln x in the denominator and integrates to ln⁡∣ln⁡x∣+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 ln⁡x2\ln x^2 when (ln⁡x)2(\ln x)^2 is meant. Those are different functions: ln⁡x2=2ln⁡x\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 ln⁡x\ln x to exist, so on the whole domain of the problem ln⁡x\ln x is defined and (ln⁡x)22+C\frac{(\ln x)^2}{2} + C needs no absolute values.

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

∫1eln⁡xx dx=[(ln⁡x)22]1e=12−0=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 ln⁡e=1\ln e = 1 and ln⁡1=0\ln 1 = 0.

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

Both use u=ln⁡xu = \ln x, but the placement of ln⁡x\ln x changes the outcome. Here the integral becomes ∫u du=u22\int u\,du = \frac{u^2}{2}; there it becomes ∫duu=ln⁡∣u∣\int \frac{du}{u} = \ln|u|, giving ln⁡∣ln⁡x∣+C\ln|\ln x| + C.