[proofplan]
We first compare $\psi$ and $\vartheta$ by isolating the contribution of proper prime powers $p^k$ with $k \geq 2$; this contribution is $o(x)$, so the two Chebyshev functions have the same first-order asymptotic. We then prove two partial summation identities connecting $\vartheta$ and $\pi$. These identities show that $\vartheta(x) \sim x$ implies $\pi(x) \sim x/\log x$, and conversely that $\pi(x) \sim x/\log x$ implies $\vartheta(x) \sim x$, because the integral error terms are smaller than the main terms after splitting at $x^{1/2}$.
[/proofplan]
[step:Bound the contribution of proper prime powers in $\psi(x) - \vartheta(x)$]
For $x \geq 2$, the difference between $\psi(x)$ and $\vartheta(x)$ is
\begin{align*}
\psi(x) - \vartheta(x)
&= \sum_{\substack{p^k \leq x\\ p \text{ prime},\ k \geq 2}} \log p.
\end{align*}
Indeed, the terms with $k = 1$ in the definition of $\psi(x)$ are exactly the terms in $\vartheta(x)$.
Define the exponent-counting function
\begin{align*}
K: [2, \infty) &\to \mathbb{N} \\
x &\mapsto \left\lfloor \frac{\log x}{\log 2} \right\rfloor.
\end{align*}
If $p^k \leq x$ and $k \geq 2$, then $2 \leq k \leq K(x)$ and $p \leq x^{1/k}$. Therefore
\begin{align*}
0 \leq \psi(x) - \vartheta(x)
&= \sum_{k=2}^{K(x)} \sum_{\substack{p \leq x^{1/k}\\ p \text{ prime}}} \log p\\
&\leq \sum_{k=2}^{K(x)} \sum_{2 \leq m \leq x^{1/k}} \log x.
\end{align*}
For every $k \geq 2$, we have $x^{1/k} \leq x^{1/2}$. Since $K(x) \leq \log x / \log 2$ for $x \geq 2$, this gives
\begin{align*}
0 \leq \psi(x) - \vartheta(x)
&\leq K(x) x^{1/2} \log x\\
&\leq \frac{x^{1/2}(\log x)^2}{\log 2}.
\end{align*}
Thus
\begin{align*}
0 \leq \frac{\psi(x) - \vartheta(x)}{x}
\leq \frac{(\log x)^2}{(\log 2)x^{1/2}}
\to 0
\end{align*}
as $x \to \infty$. Hence
\begin{align*}
\psi(x) - \vartheta(x) = o(x).
\end{align*}
[guided]
The function $\psi$ counts prime powers, while $\vartheta$ counts only primes. Thus the only possible difference comes from the terms $p^k$ with exponent $k \geq 2$. More precisely,
\begin{align*}
\psi(x) - \vartheta(x)
&= \sum_{\substack{p^k \leq x\\ p \text{ prime},\ k \geq 2}} \log p.
\end{align*}
We now show that this is much smaller than $x$. Define the exponent-counting function
\begin{align*}
K: [2, \infty) &\to \mathbb{N} \\
x &\mapsto \left\lfloor \frac{\log x}{\log 2} \right\rfloor.
\end{align*}
If $p^k \leq x$, then $2^k \leq p^k \leq x$, so $k \leq \log x/\log 2$. Thus every exponent that occurs satisfies $2 \leq k \leq K(x)$. Also, for such a fixed $k$, the primes that can occur satisfy $p \leq x^{1/k}$. Therefore
\begin{align*}
0 \leq \psi(x) - \vartheta(x)
&= \sum_{k=2}^{K(x)} \sum_{\substack{p \leq x^{1/k}\\ p \text{ prime}}} \log p.
\end{align*}
To get an upper bound, we discard the primality condition and use $\log p \leq \log x$ whenever $p \leq x$. This gives
\begin{align*}
0 \leq \psi(x) - \vartheta(x)
&\leq \sum_{k=2}^{K(x)} \sum_{2 \leq m \leq x^{1/k}} \log x.
\end{align*}
Since $k \geq 2$, we have $x^{1/k} \leq x^{1/2}$. Hence each inner sum has at most $x^{1/2}$ terms, and there are at most $\log x/\log 2$ possible exponents. Consequently
\begin{align*}
0 \leq \psi(x) - \vartheta(x)
&\leq \frac{x^{1/2}(\log x)^2}{\log 2}.
\end{align*}
After division by $x$, the right-hand side becomes
\begin{align*}
\frac{(\log x)^2}{(\log 2)x^{1/2}},
\end{align*}
which tends to $0$ as $x \to \infty$. Therefore
\begin{align*}
\psi(x) - \vartheta(x) = o(x).
\end{align*}
[/guided]
[/step]
[step:Conclude that $\psi(x) \sim x$ is equivalent to $\vartheta(x) \sim x$]
From the previous step,
\begin{align*}
\frac{\psi(x)}{x} - \frac{\vartheta(x)}{x}
= \frac{\psi(x) - \vartheta(x)}{x}
\to 0.
\end{align*}
Therefore $\psi(x)/x \to 1$ if and only if $\vartheta(x)/x \to 1$. Equivalently,
\begin{align*}
\psi(x) \sim x
\quad \Longleftrightarrow \quad
\vartheta(x) \sim x.
\end{align*}
[/step]
[step:Derive the partial summation identities relating $\vartheta$ and $\pi$]
For $x \geq 2$, the functions $\pi$ and $\vartheta$ satisfy the following identities. Throughout the rest of the proof, $\mathcal{L}^1$ denotes one-dimensional Lebesgue measure on $\mathbb{R}$.
\begin{align*}
\vartheta(x)
&= \pi(x)\log x - \int_2^x \frac{\pi(t)}{t}\,d\mathcal{L}^1(t),
\end{align*}
and
\begin{align*}
\pi(x)
&= \frac{\vartheta(x)}{\log x}
+ \int_2^x \frac{\vartheta(t)}{t(\log t)^2}\,d\mathcal{L}^1(t).
\end{align*}
We verify the first identity. Let $p_1 < p_2 < \cdots < p_N$ be the primes not exceeding $x$, where $N = \pi(x)$. On each interval $[p_j,p_{j+1})$ the function $\pi$ is constant and equal to $j$, and on $[p_N,x]$ it is constant and equal to $N$. Telescoping gives
\begin{align*}
\int_2^x \frac{\pi(t)}{t}\,d\mathcal{L}^1(t)
&= \sum_{j=1}^{N-1} j \int_{p_j}^{p_{j+1}} \frac{1}{t}\,d\mathcal{L}^1(t)
+ N \int_{p_N}^{x} \frac{1}{t}\,d\mathcal{L}^1(t)\\
&= \sum_{j=1}^{N-1} j(\log p_{j+1} - \log p_j)
+ N(\log x - \log p_N)\\
&= N\log x - \sum_{j=1}^{N} \log p_j\\
&= \pi(x)\log x - \vartheta(x).
\end{align*}
Rearranging gives the first identity.
We verify the second identity directly. Define
\begin{align*}
w: [2, \infty) &\to \mathbb{R} \\
t &\mapsto \frac{1}{\log t}.
\end{align*}
For $1 \leq j \leq N$, set $A_j := \sum_{i=1}^{j} \log p_i$, and set $A_0 := 0$. Thus $A_j = \vartheta(p_j)$ for each $j$. By finite summation by parts,
\begin{align*}
\pi(x)
&= \sum_{j=1}^{N} \log p_j\, w(p_j)\\
&= A_N w(x) - \sum_{j=1}^{N-1} A_j\bigl(w(p_{j+1}) - w(p_j)\bigr) - A_N\bigl(w(x) - w(p_N)\bigr).
\end{align*}
The function $\vartheta$ is constant and equal to $A_j$ on $[p_j, p_{j+1})$ for $1 \leq j \leq N-1$, and constant and equal to $A_N$ on $[p_N,x]$. Since $w$ is continuously differentiable on $[2,x]$ and
\begin{align*}
w'(t) = -\frac{1}{t(\log t)^2},
\end{align*}
the [fundamental theorem of calculus](/theorems/632) on each interval gives
\begin{align*}
- \sum_{j=1}^{N-1} A_j\bigl(w(p_{j+1}) - w(p_j)\bigr) - A_N\bigl(w(x) - w(p_N)\bigr)
&= \int_2^x \frac{\vartheta(t)}{t(\log t)^2}\,d\mathcal{L}^1(t).
\end{align*}
Because $A_N = \vartheta(x)$, we obtain
\begin{align*}
\pi(x)
&= \frac{\vartheta(x)}{\log x}
+ \int_2^x \frac{\vartheta(t)}{t(\log t)^2}\,d\mathcal{L}^1(t).
\end{align*}
[guided]
The bridge between $\vartheta$ and $\pi$ is partial summation. Because $\pi$ and $\vartheta$ are step functions, we can prove the needed formulas directly by writing the integral over intervals between consecutive primes.
Fix $x \geq 2$. Let $p_1 < p_2 < \cdots < p_N$ be the primes not exceeding $x$, where
\begin{align*}
N := \pi(x).
\end{align*}
The function $\pi: [2,\infty) \to \mathbb{N}$ is constant on each interval between consecutive primes: on $[p_j,p_{j+1})$ it equals $j$, and on $[p_N,x]$ it equals $N$. Therefore
\begin{align*}
\int_2^x \frac{\pi(t)}{t}\,d\mathcal{L}^1(t)
&= \sum_{j=1}^{N-1} j \int_{p_j}^{p_{j+1}} \frac{1}{t}\,d\mathcal{L}^1(t)
+ N \int_{p_N}^{x} \frac{1}{t}\,d\mathcal{L}^1(t)\\
&= \sum_{j=1}^{N-1} j(\log p_{j+1} - \log p_j)
+ N(\log x - \log p_N).
\end{align*}
The finite sum telescopes. Expanding the coefficients of each $\log p_j$, every interior term cancels except for one negative copy of each $\log p_j$, while $N\log x$ remains. Hence
\begin{align*}
\int_2^x \frac{\pi(t)}{t}\,d\mathcal{L}^1(t)
&= N\log x - \sum_{j=1}^{N} \log p_j\\
&= \pi(x)\log x - \vartheta(x).
\end{align*}
Rearranging gives
\begin{align*}
\vartheta(x)
&= \pi(x)\log x - \int_2^x \frac{\pi(t)}{t}\,d\mathcal{L}^1(t).
\end{align*}
For the inverse formula, we use the same idea but weight the jumps of $\vartheta$ by $1/\log t$. The function $\vartheta$ has a jump of size $\log p$ at each prime $p$. Therefore summing the jump size multiplied by $1/\log p$ counts each prime once:
\begin{align*}
\sum_{\substack{p \leq x\\ p \text{ prime}}} \frac{\log p}{\log p}
= \pi(x).
\end{align*}
Applying the same telescoping calculation to the step function $\vartheta$ and the differentiable weight $t \mapsto 1/\log t$, whose derivative is
\begin{align*}
-\frac{1}{t(\log t)^2},
\end{align*}
gives
\begin{align*}
\pi(x)
&= \frac{\vartheta(x)}{\log x}
- \int_2^x \vartheta(t)\left(-\frac{1}{t(\log t)^2}\right)\,d\mathcal{L}^1(t)\\
&= \frac{\vartheta(x)}{\log x}
+ \int_2^x \frac{\vartheta(t)}{t(\log t)^2}\,d\mathcal{L}^1(t).
\end{align*}
This is the second partial summation identity.
[/guided]
[/step]
[step:Show that $\vartheta(x) \sim x$ implies $\pi(x) \sim x/\log x$]
Assume $\vartheta(x) \sim x$ as $x \to \infty$. From the inverse partial summation identity,
\begin{align*}
\pi(x)
&= \frac{\vartheta(x)}{\log x}
+ \int_2^x \frac{\vartheta(t)}{t(\log t)^2}\,d\mathcal{L}^1(t).
\end{align*}
The first term satisfies
\begin{align*}
\frac{\vartheta(x)}{\log x} \sim \frac{x}{\log x}.
\end{align*}
It remains to show that the integral is $o(x/\log x)$.
Define
\begin{align*}
I: [2, \infty) &\to [0, \infty) \\
x &\mapsto \int_2^x \frac{\vartheta(t)}{t(\log t)^2}\,d\mathcal{L}^1(t),
\end{align*}
and define $y := x^{1/2}$.
For $2 \leq t \leq y$, we use the elementary bound $\vartheta(t) \leq t\log t$, since there are at most $t$ positive integers not exceeding $t$ and each prime $p \leq t$ satisfies $\log p \leq \log t$. Hence
\begin{align*}
\int_2^y \frac{\vartheta(t)}{t(\log t)^2}\,d\mathcal{L}^1(t)
&\leq \int_2^y \frac{1}{\log t}\,d\mathcal{L}^1(t)\\
&\leq \frac{y}{\log 2}
= \frac{x^{1/2}}{\log 2}
= o\!\left(\frac{x}{\log x}\right).
\end{align*}
Let $\varepsilon > 0$. Since $\vartheta(t) \sim t$, there exists $T_\varepsilon \geq 2$ such that $\vartheta(t) \leq (1+\varepsilon)t$ for all $t \geq T_\varepsilon$. For $x$ sufficiently large, $y = x^{1/2} \geq T_\varepsilon$, and then
\begin{align*}
\int_y^x \frac{\vartheta(t)}{t(\log t)^2}\,d\mathcal{L}^1(t)
&\leq (1+\varepsilon)\int_y^x \frac{1}{(\log t)^2}\,d\mathcal{L}^1(t)\\
&\leq (1+\varepsilon)\frac{x}{(\log y)^2}\\
&= 4(1+\varepsilon)\frac{x}{(\log x)^2}\\
&= o\!\left(\frac{x}{\log x}\right).
\end{align*}
Thus $I(x) = o(x/\log x)$, and therefore
\begin{align*}
\pi(x) \sim \frac{x}{\log x}.
\end{align*}
[/step]
[step:Show that $\pi(x) \sim x/\log x$ implies $\vartheta(x) \sim x$]
Assume $\pi(x) \sim x/\log x$ as $x \to \infty$. From the partial summation identity,
\begin{align*}
\vartheta(x)
&= \pi(x)\log x - \int_2^x \frac{\pi(t)}{t}\,d\mathcal{L}^1(t).
\end{align*}
The first term satisfies
\begin{align*}
\pi(x)\log x \sim x.
\end{align*}
It remains to show that the integral is $o(x)$.
Define
\begin{align*}
J: [2, \infty) &\to [0, \infty) \\
x &\mapsto \int_2^x \frac{\pi(t)}{t}\,d\mathcal{L}^1(t),
\end{align*}
and define $y := x^{1/2}$.
For $2 \leq t \leq y$, the elementary bound $\pi(t) \leq t$ gives
\begin{align*}
\int_2^y \frac{\pi(t)}{t}\,d\mathcal{L}^1(t)
&\leq \int_2^y 1\,d\mathcal{L}^1(t)\\
&\leq y
= x^{1/2}
= o(x).
\end{align*}
Let $\varepsilon > 0$. Since $\pi(t) \sim t/\log t$, there exists $T_\varepsilon \geq 2$ such that
\begin{align*}
\pi(t) \leq (1+\varepsilon)\frac{t}{\log t}
\end{align*}
for all $t \geq T_\varepsilon$. For $x$ sufficiently large, $y = x^{1/2} \geq T_\varepsilon$, and therefore
\begin{align*}
\int_y^x \frac{\pi(t)}{t}\,d\mathcal{L}^1(t)
&\leq (1+\varepsilon)\int_y^x \frac{1}{\log t}\,d\mathcal{L}^1(t)\\
&\leq (1+\varepsilon)\frac{x}{\log y}\\
&= 2(1+\varepsilon)\frac{x}{\log x}\\
&= o(x).
\end{align*}
Hence $J(x) = o(x)$. Therefore
\begin{align*}
\vartheta(x)
= \pi(x)\log x - J(x)
\sim x.
\end{align*}
[/step]
[step:Combine the implications]
We have shown
\begin{align*}
\psi(x) \sim x
\quad \Longleftrightarrow \quad
\vartheta(x) \sim x
\end{align*}
and
\begin{align*}
\vartheta(x) \sim x
\quad \Longleftrightarrow \quad
\pi(x) \sim \frac{x}{\log x}.
\end{align*}
Combining these two equivalences proves that the three asserted forms of the [Prime Number Theorem](/theorems/1742) are equivalent.
[/step]