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, x_0 > 0$ such that:


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

for $x \ge x_0$, 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 sufficiently large $x$ and 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 sufficiently large $x$ and 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, for $x \ge \max \set {x_0, 2}$:


 * $\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, for $x \ge 1$ we have:


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

So that:


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

So we obtain, for $x \ge \max \set {x_0, 2}$:


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

Let:


 * $M_1 = \max \set {x_0, 2}$

Then, we have:


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

for $x \ge M_1$.

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


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

for $x \ge M_1$.

Now we aim to find a real number $C_1 > 0$ such that:


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

Since, for $x \ge 2$:


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

with $R = \map \OO {\sqrt x \ln x}$, there exists real numbers $C, x_1 > 0$ such that:


 * $\size {\map R x} \le C \sqrt x \ln x$

for $x \ge x_1 \ge 2$.

That is:


 * $-C \sqrt x \ln x \le \map R x$

for $x \ge x_1$.

So, we have:


 * $\ds \frac {\map \psi x} {\ln x} + \map R x \ge \frac {A x} {\ln x} - C \sqrt x \ln x$

for $x \ge \max \set {x_0, x_1}$.

We can show that we have:


 * $\ds \frac {A x} {\ln x} - C \sqrt x \ln x \ge \frac {A x} {2 \ln x}$

for sufficiently large $x$.

Note that this inequality is equivalent to:


 * $\ds \frac {A x} {2 \ln x} \ge C \sqrt x \ln x$

That is:


 * $\ds \frac {\sqrt x} {\paren {\ln x}^2} \ge \frac {2 C} A$

From Order of Natural Logarithm Function, we have:


 * $\ln x \le 8 x^{1/8}$

for $x \ge 1$.

That is:


 * $\ds \frac {\sqrt x} {\paren {\ln x}^2} \ge \frac {\sqrt x} {\paren {8 x^{1/8} }^2} = \frac 1 {64} x^{1/4}$

So it suffices to take:


 * $\ds \frac 1 {64} x^{1/4} \ge \frac {2 C} A$

Setting:


 * $\ds M_2 = \max \set {x_0, x_1, \paren {\frac {128 C} A}^4}$

We have:


 * $\ds \frac {\map \psi x} {\ln x} + \map R x \ge \frac {A x} {2 \ln x}$

for $x \ge M_2$.

That is:


 * $\ds \map \pi x \ge \frac {A x} {2 \ln x}$

So, taking:


 * $\ds C_1 = \dfrac A 2 > 0$

We have:


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

for $x \ge M_2$.

Let:


 * $\ds M = \max \set {M_1, M_2}$

Then, for $x \ge M$, we have:


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

with $C_1, C_2 > 0$, so:


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

as required.