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.

1xlnxdx=lnlnx+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 lnx\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.

1xlnxdx=1lnx1xdx\int \frac{1}{x\ln x}\,dx = \int \frac{1}{\ln x}\cdot\frac{1}{x}\,dx

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

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

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

1udu=lnu+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.

1xlnxdx=lnlnx+C\int \frac{1}{x\ln x}\,dx = \ln\left|\ln x\right| + C

Check it by differentiating

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

Why the absolute value is not optional

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

Take x=0.5x = 0.5. Then ln0.50.693\ln 0.5 \approx -0.693, and ln(0.693)\ln\left(-0.693\right) does not exist, while ln0.6930.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 1xdx=lnx+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.

2e21xlnxdx=[lnlnx]2e2=ln2ln(ln2)\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 1nlnn\sum \frac{1}{n\ln n} to 21xlnxdx\int_{2}^{\infty} \frac{1}{x\ln x}\,dx, and because lnlnx\ln\left|\ln x\right| grows without bound, the integral diverges and so does the series.

21xlnxdx=limb[ln(lnx)]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 1nlnn\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 lnxlnx\ln\left|x\ln x\right|. The rule 1udu=lnu\int \frac{1}{u}\,du = \ln\left|u\right| requires the DERIVATIVE of uu to be present as a factor. Here u=xlnxu = x\ln x has derivative lnx+1\ln x + 1, which is nowhere in the integrand.
  • Dropping the inner absolute value and writing ln(lnx)\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 (lnx)2\left(\ln x\right)^{2} territory. That is the antiderivative of lnxx\frac{\ln x}{x}, the reciprocal arrangement, which gives (lnx)22+C\frac{\left(\ln x\right)^{2}}{2} + C.

Two lookalike integrands, two different answers

1xlnxdx=lnlnx+C\int \frac{1}{x\ln x}\,dx = \ln\left|\ln x\right| + C has the logarithm downstairs, while lnxxdx=(lnx)22+C\int \frac{\ln x}{x}\,dx = \frac{\left(\ln x\right)^{2}}{2} + C has it upstairs. Both use u=lnxu = \ln x; only the power of uu differs, u1u^{-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 lnlnx+C\ln\left|\ln x\right| + C. Substitute u=lnxu = \ln x, so du=1xdxdu = \frac{1}{x}\,dx, and the integral becomes 1udu=lnu+C\int \frac{1}{u}\,du = \ln\left|u\right| + C.

Why does the answer need an absolute value?

Because lnx\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 lnlnx\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(lnx)\ln\left(\ln x\right) grows without bound, so the limit is infinite. By the integral test this is why 1nlnn\sum \frac{1}{n\ln n} also diverges.

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

Both substitute u=lnxu = \ln x, but 1xlnx\frac{1}{x\ln x} becomes u1du=lnu\int u^{-1}\,du = \ln\left|u\right|, while lnxx\frac{\ln x}{x} becomes udu=u22\int u\,du = \frac{u^{2}}{2}. The answers are lnlnx+C\ln\left|\ln x\right| + C and (lnx)22+C\frac{\left(\ln x\right)^{2}}{2} + C.