# Integral of 1/(x ln x): Formula, Steps and Examples

> The integral of 1/(x ln x) is ln|ln x| + C. See the u = ln x substitution, why its improper integral diverges, a graph and worked examples.

Source: https://practicecalculus.com/integrals/1-over-x-ln-x
Updated: 2026-11-06

$$ \int \frac{1}{x\ln x}\,dx = \ln\lvert\ln x\rvert + C $$

## At a glance

- **Antiderivative:** $\ln\lvert\ln x\rvert + C$
- **Method:** Substitution $u = \ln x$, $du = \frac{1}{x}\,dx$
- **Domain:** $x > 0$, $x \ne 1$
- **From e to e²:** $\ln 2 \approx 0.693$
- **From 2 to ∞:** Diverges

## Key takeaways

- The integral of $\frac{1}{x\ln x}$ is $\ln\lvert\ln x\rvert + C$.
- Substitute $u = \ln x$. The $\frac{1}{x}$ in the integrand is exactly $du$, and the integral becomes $\int\frac{du}{u}$.
- $\int_2^\infty\frac{dx}{x\ln x}$ diverges, but very slowly. By the integral test, so does $\sum\frac{1}{n\ln n}$.
- With a square, $\int_2^\infty\frac{dx}{x(\ln x)^2} = \frac{1}{\ln 2}$ converges.

The **integral of $\dfrac{1}{x\ln x}$ is $\ln\lvert\ln x\rvert + C$**. It is a textbook example of a substitution that is hiding in plain sight: the $\frac{1}{x}$ is the derivative of the $\ln x$ next to it.

$$\int \frac{1}{x\ln x}\,dx = \ln\lvert\ln x\rvert + C$$

The integrand is defined for $x > 0$ with $x \ne 1$, since $\ln 1 = 0$ would make the denominator zero.

## Graph of 1/(x ln x)

```graph
title: 'y = 1/(x ln x) with the area from e to e² shaded'
caption: 'The shaded area is $\ln(\ln e^2) - \ln(\ln e) = \ln 2 - \ln 1 = \ln 2 \approx 0.693$. The curve has a vertical asymptote at $x = 1$ and decays very slowly to the right.'
x: [0, 9]
y: [-1, 5]
functions:
  - expr: 1/(x*ln(x))
    label: y = 1/(x ln x)
    domain: [1.2, 9]
shade:
  expr: 1/(x*ln(x))
  from: 2.71828
  to: 7.38906
vertical:
  - x: 1
    label: x = 1
```

## How to integrate 1/(x ln x) step by step

1. **Spot the pair.** Rewrite the integrand as $\frac{1}{\ln x}\cdot\frac{1}{x}$. The second factor is the derivative of $\ln x$.
2. **Substitute.** Let $u = \ln x$, so $du = \frac{1}{x}\,dx$:
$$\int\frac{1}{\ln x}\cdot\frac{1}{x}\,dx = \int\frac{1}{u}\,du$$
3. **Integrate.** $\int\frac{du}{u} = \ln\lvert u\rvert + C$, from the [integral of 1/x](/integrals/1-over-x).
4. **Substitute back.** $\ln\lvert\ln x\rvert + C$.

The absolute value matters on $0 < x < 1$, where $\ln x$ is negative. For $x > 1$ you can drop it and write $\ln(\ln x)$.

This is the [u-substitution rule](/rules/u-substitution-rule) at work. Whenever you see $\frac{1}{x}$ multiplied by some function of $\ln x$, try $u = \ln x$.

## Check by differentiating

Use the [chain rule](/rules/chain-rule) twice:

$$\frac{d}{dx}\ln(\ln x) = \frac{1}{\ln x}\cdot\frac{d}{dx}\ln x = \frac{1}{\ln x}\cdot\frac{1}{x} = \frac{1}{x\ln x}$$

## Definite and improper integrals

**From e to e²:** $\ln(\ln e^2) - \ln(\ln e) = \ln 2 - \ln 1 = \ln 2$.

**From e to e^e:** $\ln(e) - \ln(1) = 1$. Each step of the form $[e^{a}, e^{ea}]$ adds the same area, $1$.

**From 2 to ∞:** this [improper integral](/blog/improper-integrals) diverges.

$$\int_2^\infty\frac{dx}{x\ln x} = \lim_{b\to\infty}\Big(\ln(\ln b) - \ln(\ln 2)\Big) = \infty$$

The growth is painfully slow. Even at $b = 10^{100}$, $\ln(\ln b) \approx \ln 230.3 \approx 5.44$. A calculator would never convince you it diverges, but the antiderivative proves it.

**The integral test.** Because this integral diverges, the [integral test](/learn/calculus-2/sequences-and-series/integral-test-and-p-series) says the series $\sum_{n=2}^\infty\frac{1}{n\ln n}$ diverges too, even though its terms shrink faster than $\frac{1}{n}$.

## Worked examples

**Example 1: a log squared.** $\displaystyle\int_2^\infty\frac{dx}{x(\ln x)^2}$. With $u = \ln x$, the antiderivative is $-\frac{1}{\ln x}$:

$$\lim_{b\to\infty}\left(-\frac{1}{\ln b} + \frac{1}{\ln 2}\right) = \frac{1}{\ln 2} \approx 1.443$$

This one converges. An extra power of $\ln x$ is enough.

**Example 2: log on top.** $\displaystyle\int\frac{\ln x}{x}\,dx = \int u\,du = \frac{(\ln x)^2}{2} + C$.

**Example 3: a power of the log.** $\displaystyle\int\frac{dx}{x\sqrt{\ln x}} = \int u^{-1/2}\,du = 2\sqrt{\ln x} + C$, for $x > 1$.

**Example 4: a constant inside.** $\displaystyle\int\frac{dx}{x\ln(5x)}$. Here $\frac{d}{dx}\ln(5x) = \frac{1}{x}$ as well, so the answer is $\ln\lvert\ln(5x)\rvert + C$.

**Example 5: one more layer.** $\displaystyle\int\frac{dx}{x\ln x\,\ln(\ln x)} = \ln\lvert\ln(\ln x)\rvert + C$, using $u = \ln(\ln x)$.

## Common mistakes

1. **Splitting into $\frac{1}{x}\cdot\frac{1}{\ln x}$ and integrating each factor.** You cannot integrate a product factor by factor. $\ln x\cdot\ln\lvert\ln x\rvert$ is wrong.
2. **Using integration by parts.** It is possible but leads nowhere useful. Substitution finishes in one line.
3. **Writing $\ln\lvert x\ln x\rvert$.** That is the antiderivative of $\frac{\ln x + 1}{x\ln x}$, not of $\frac{1}{x\ln x}$.
4. **Integrating across $x = 1$.** The integrand blows up there, so $\int_{1/2}^{2}\frac{dx}{x\ln x}$ is not a normal integral.

The [integral of ln x](/integrals/ln-x) and the [integral of x ln x](/integrals/x-ln-x) cover the other common log integrals. For more on this kind of substitution, see the [u-substitution guide](/blog/u-substitution) and the [u-substitution practice problems](/practice-problems/u-substitution).

## Frequently asked questions

### What is the integral of 1/(x ln x)?

It is $\ln\lvert\ln x\rvert + C$. For $x > 1$, where $\ln x > 0$, this is just $\ln(\ln x) + C$.

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

No. $\ln(\ln b) - \ln(\ln 2) \to \infty$ as $b \to \infty$, so the integral diverges. It grows extremely slowly: at $b = 10^{100}$ the antiderivative is only about $5.4$.

### What is the integral of ln x / x?

It is $\frac{(\ln x)^2}{2} + C$. The same substitution $u = \ln x$ turns it into $\int u\,du$.

### What is the integral of 1/(x (ln x)²)?

It is $-\frac{1}{\ln x} + C$. With $u = \ln x$ it becomes $\int u^{-2}\,du = -u^{-1} + C$.
