y=xln⁡xy = \dfrac{x}{\ln x}

Graph of the Function y=xln⁡xy = \dfrac{x}{\ln x}

y=xln⁡xy = \dfrac{x}{\ln x} is known as the expression that captures how the primes thin out. The prime number theorem states that π(x)\pi(x), the number of primes not exceeding xx, grows at the same rate as this function.

Domain and sign

The logarithm must be defined and non-zero, so the domain is x>0x > 0 with x≠1x \neq 1. On 0<x<10 < x < 1 we have ln⁡x<0\ln x < 0 and hence y<0y < 0, while y>0y > 0 for x>1x > 1.

Asymptote and end behavior

The line x=1x = 1 is a vertical asymptote, approached toward −∞-\infty from the left and toward +∞+\infty from the right. As x→0+x \to 0^{+} the numerator tends to 00 and the denominator to −∞-\infty, so y→0−y \to 0^{-} and the curve enters the origin from below. As x→∞x \to \infty the factor xx overwhelms ln⁡x\ln x and the function diverges, so there is no asymptote on the right.

Monotonicity and extrema

The quotient rule gives the derivative.

y′=ln⁡x−1(ln⁡x)2y' = \frac{\ln x - 1}{(\ln x)^2}

The denominator is positive, so the sign is that of ln⁡x−1\ln x - 1: negative for x<ex < e and positive for x>ex > e. There is therefore a local minimum at x=ex = e, of value ee, so the minimum point (e,e)(e, e) has equal coordinates.

Range

The branch on 0<x<10 < x < 1 falls steadily from 0−0^{-} near the origin down to −∞-\infty, giving y<0y < 0, while the branch on x>1x > 1 has minimum ee, giving y≥ey \geq e. No value in 0≤y<e0 \leq y < e is attained. This is exactly the range of y=exxy = \dfrac{e^{x}}{x}, an amusing coincidence: exchanging logarithm and exponential leaves the same structure.

Concavity

The second derivative is y′′=2−ln⁡xx(ln⁡x)3y'' = \dfrac{2 - \ln x}{x(\ln x)^3}.

RangeNumeratorDenominatorConcavity
0<x<10 < x < 1positivenegativeconcave down
1<x<e21 < x < e^{2}positivepositiveconcave up
x>e2x > e^{2}negativepositiveconcave down

There is thus a single inflection point, at x=e2≈7.389x = e^{2} \approx 7.389, where the value is e22≈3.695\dfrac{e^{2}}{2} \approx 3.695.

The prime number theorem

Writing π(x)\pi(x) for the number of primes up to xx, the prime number theorem says that the ratio of the two tends to 11.

π(x)∼xln⁡x\pi(x) \sim \frac{x}{\ln x}

Intuitively the density of primes near xx is about 1ln⁡x\dfrac{1}{\ln x}, so consecutive primes are separated by roughly ln⁡x\ln x on average. The convergence is slow, however, and the values close in only gradually.

xxπ(x)\pi(x)xln⁡x\dfrac{x}{\ln x}Ratio
10610^{6}784987849872382723821.0851.085
10710^{7}6645796645796204216204211.0711.071

A better approximation

The error shrinks dramatically with the logarithmic integral.

li⁡(x)=∫2xdtln⁡t\operatorname{li}(x) = \int_2^{x}\frac{dt}{\ln t}

Here li⁡(106)≈78628\operatorname{li}(10^{6}) \approx 78628, only about 130130 away from the true value. Substituting t=eut = e^{u} turns that integral into ∫euu du\int \dfrac{e^{u}}{u}\,du, the exponential integral. The function xln⁡x\dfrac{x}{\ln x} is the leading term of the asymptotic expansion of li⁡(x)\operatorname{li}(x), and the Riemann hypothesis is a statement about how small the difference between li⁡(x)\operatorname{li}(x) and π(x)\pi(x) can be.