Prime-Counting Function is Theta of x over Logarithm of x

Theorem
We have:


 * $\ds \map \pi x = \map \Theta {\frac x {\ln x} }$

where:
 * $\Theta$ is big-$\Theta$ notation
 * $\pi$ is the prime counting function.

Proof
From Second Chebyshev Function is $\map \Theta x$, there exists real numbers $A, B > 0$ such that:


 * $A x \le \map \psi x \le B x$

where $\psi$ is the second Chebyshev function.

From Bounds for Prime-Counting Function in terms of Second Chebyshev Function, there exists a real function $R : \hointr 2 \infty \to \R$ such that:


 * $\ds \frac {\map \psi x} {\ln x} + \map R x \le \map \pi x \le \frac {2 \map \psi x} {\ln x} + \sqrt x$

for all real numbers $x \ge 2$, with:


 * $R = \map \OO {\sqrt x \ln x}$

We aim to combine these inequalities to first obtain:


 * $\ds \map \pi x \le \frac {C_2 x} {\ln x}$

for a real number $C_2 > 0$, so we would obtain:


 * $\ds \map \pi x = \map \OO {\frac x {\ln x} }$

We will also aim to obtain:


 * $\ds \frac {C_1 x} {\ln x} \le \map \pi x$

for a real number $C_1 > 0$, so we obtain:


 * $\ds \frac x {\ln x} \le \frac 1 {C_1} \map \pi x$

giving:


 * $\ds \frac x {\ln x} = \map \OO {\map \pi x}$

At which point we have:


 * $\ds \map \pi x = \map \Theta {\frac x {\ln x} }$

which is the demand.

We have:


 * $\ds \frac {2 \map \psi x} {\ln x} + \sqrt x \le \frac {2 B x} {\ln x} + \sqrt x$

From Order of Natural Logarithm Function, we have:


 * $\ln x \le 2 \sqrt x$

So that:


 * $\ds \sqrt x \le \frac {2 x} {\ln x}$

So we obtain:


 * $\ds \frac {2 \map \psi x} {\ln x} + \sqrt x \le \frac {\paren {2 B + 2} x} {\ln x}$

So:


 * $\ds \map \pi x \le \frac {\paren {2 B + 2} x} {\ln x}$

Setting $C_2 = 2 B + 2 > 0$, we have:


 * $\ds \map \pi x \le \frac {C_2 x} {\ln x}$