AP Calculus AB and BC

Integral of 1/(x ln x): Answer and Substitution

The integral of 1/(x ln x) with respect to x is ln|ln x| + C. The substitution u = ln x works because du = (1/x) dx is already present in the integrand, turning the problem into the integral of 1/u. The absolute value is required because ln x is negative for x between 0 and 1.

∫1xln⁡x dx=ln⁡∣ln⁡x∣+C\int \frac{1}{x\ln x}\,dx = \ln\left|\ln x\right| + C

How to integrate 1/(x ln x) by substitution

This integrand is a substitution problem that announces itself. The derivative of ln⁡x\ln x is 1x\frac{1}{x}, and there is a 1x\frac{1}{x} sitting in the integrand already, so the inner function and its derivative are both present.

Write the integrand so the pairing is visible before you substitute.

∫1xln⁡x dx=∫1ln⁡x⋅1x dx\int \frac{1}{x\ln x}\,dx = \int \frac{1}{\ln x}\cdot\frac{1}{x}\,dx

Now let u=ln⁡xu = \ln x, so du=1x dxdu = \frac{1}{x}\,dx. Every piece of the integrand is accounted for, with no leftover xx to convert.

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

The problem becomes the single most important basic antiderivative on the course.

∫1u du=ln⁡∣u∣+C\int \frac{1}{u}\,du = \ln\left|u\right| + C

Substituting back gives a logarithm of a logarithm, which looks strange but is exactly right.

∫1xln⁡x dx=ln⁡∣ln⁡x∣+C\int \frac{1}{x\ln x}\,dx = \ln\left|\ln x\right| + C

Check it by differentiating

Differentiate ln⁡∣ln⁡x∣\ln\left|\ln x\right| with the chain rule. The outer derivative is 1ln⁡x\frac{1}{\ln x} and the inner derivative is 1x\frac{1}{x}, and their product is 1xln⁡x\frac{1}{x\ln x}, the integrand.

Why the absolute value is not optional

The domain of the integrand is x>0x > 0 with x≠1x \neq 1, since ln⁡1=0\ln 1 = 0 makes the denominator zero. On 0<x<10 < x < 1 the value of ln⁡x\ln x is NEGATIVE, so writing ln⁡(ln⁡x)\ln\left(\ln x\right) without bars would be undefined on half the domain.

Take x=0.5x = 0.5. Then ln⁡0.5≈−0.693\ln 0.5 \approx -0.693, and ln⁡(−0.693)\ln\left(-0.693\right) does not exist, while ln⁡∣−0.693∣≈−0.367\ln\left|-0.693\right| \approx -0.367 is fine. The absolute value is what lets one formula cover both sides of x=1x = 1.

This is the same reason ∫1x dx=ln⁡∣x∣+C\int \frac{1}{x}\,dx = \ln\left|x\right| + C carries bars, and it is the most commonly dropped notation in Unit 6.

One antiderivative, two separate intervals

Strictly, x=1x = 1 splits the domain into two pieces and the constant may differ on each. AP answers write a single +C+C, but you cannot integrate ACROSS x=1x = 1: the integrand blows up there, so a definite integral spanning it is improper and in fact divergent.

Where the integral of 1/(x ln x) shows up on the AP exam

Integrating using substitution is Topic 6.9 in Unit 6, on both AB and BC, and this is a standard example of the pattern where the inner function is a logarithm. Unit 6 carries a weighting of 15 to 20 percent on both exams.

A definite integral over an interval that avoids x=1x = 1 is straightforward.

∫2e21xln⁡x dx=[ln⁡∣ln⁡x∣]2e2=ln⁡2−ln⁡(ln⁡2)\int_{2}^{e^{2}} \frac{1}{x\ln x}\,dx = \left[\ln\left|\ln x\right|\right]_{2}^{e^{2}} = \ln 2 - \ln\left(\ln 2\right)

On BC this integrand is the engine behind a well known convergence result. The integral test compares the series ∑1nln⁡n\sum \frac{1}{n\ln n} to ∫2∞1xln⁡x dx\int_{2}^{\infty} \frac{1}{x\ln x}\,dx, and because ln⁡∣ln⁡x∣\ln\left|\ln x\right| grows without bound, the integral diverges and so does the series.

∫2∞1xln⁡x dx=lim⁡b→∞[ln⁡(ln⁡x)]2b=∞\int_{2}^{\infty} \frac{1}{x\ln x}\,dx = \lim_{b \to \infty}\left[\ln\left(\ln x\right)\right]_{2}^{b} = \infty

That result is worth remembering as a boundary case. The terms 1nln⁡n\frac{1}{n\ln n} shrink faster than 1n\frac{1}{n} but still not fast enough to converge, which is why a shrinking term is never on its own evidence of convergence.

Common mistakes with the integral of 1/(x ln x)

  • Writing ln⁡∣xln⁡x∣\ln\left|x\ln x\right|. The rule ∫1u du=ln⁡∣u∣\int \frac{1}{u}\,du = \ln\left|u\right| requires the DERIVATIVE of uu to be present as a factor. Here u=xln⁡xu = x\ln x has derivative ln⁡x+1\ln x + 1, which is nowhere in the integrand.
  • Dropping the inner absolute value and writing ln⁡(ln⁡x)\ln\left(\ln x\right), which is undefined for 0<x<10 < x < 1.
  • Choosing u=xu = x, which produces du=dxdu = dx and changes nothing.
  • Integrating across x=1x = 1 as though the integrand were continuous there. It is not, so any definite integral whose interval contains 11 is improper and divergent.
  • Reading the answer as (ln⁡x)2\left(\ln x\right)^{2} territory. That is the antiderivative of ln⁡xx\frac{\ln x}{x}, the reciprocal arrangement, which gives (ln⁡x)22+C\frac{\left(\ln x\right)^{2}}{2} + C.

Two lookalike integrands, two different answers

∫1xln⁡x dx=ln⁡∣ln⁡x∣+C\int \frac{1}{x\ln x}\,dx = \ln\left|\ln x\right| + C has the logarithm downstairs, while ∫ln⁡xx dx=(ln⁡x)22+C\int \frac{\ln x}{x}\,dx = \frac{\left(\ln x\right)^{2}}{2} + C has it upstairs. Both use u=ln⁡xu = \ln x; only the power of uu differs, u−1u^{-1} against u1u^{1}.

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 1/(x ln x)?

It is ln⁡∣ln⁡x∣+C\ln\left|\ln x\right| + C. Substitute u=ln⁡xu = \ln x, so du=1x dxdu = \frac{1}{x}\,dx, and the integral becomes ∫1u du=ln⁡∣u∣+C\int \frac{1}{u}\,du = \ln\left|u\right| + C.

Why does the answer need an absolute value?

Because ln⁡x\ln x is negative for 0<x<10 < x < 1, and the logarithm of a negative number is undefined. The bars let the single expression ln⁡∣ln⁡x∣\ln\left|\ln x\right| cover the whole domain instead of only x>1x > 1.

Is the integral of 1/(x ln x) on the AP Calculus AB exam?

Yes. It is an ordinary uu-substitution, Topic 6.9, which is on both AB and BC. The infinite version used in the integral test is BC material.

Does the integral of 1/(x ln x) from 2 to infinity converge?

No, it diverges. The antiderivative ln⁡(ln⁡x)\ln\left(\ln x\right) grows without bound, so the limit is infinite. By the integral test this is why ∑1nln⁡n\sum \frac{1}{n\ln n} also diverges.

How is this different from the integral of ln x over x?

Both substitute u=ln⁡xu = \ln x, but 1xln⁡x\frac{1}{x\ln x} becomes ∫u−1 du=ln⁡∣u∣\int u^{-1}\,du = \ln\left|u\right|, while ln⁡xx\frac{\ln x}{x} becomes ∫u du=u22\int u\,du = \frac{u^{2}}{2}. The answers are ln⁡∣ln⁡x∣+C\ln\left|\ln x\right| + C and (ln⁡x)22+C\frac{\left(\ln x\right)^{2}}{2} + C.