The problem is from Exercise 7.11 in Stein complex analysis
Let $$\varphi(x) =\sum_{p\leq x}\log p$$ where the sum is taken over all primes $\leq x$. Prove the following are equivalent as $x\to\infty$:
(i) $\varphi(x)\sim x,$
(ii) $\pi(x)\sim x/\log x,$
(iii) $\psi(x)\sim x,$
(iv) $\psi_1(x)\sim x^2/2.$
Here, $$\psi(x) = \sum_{p\leq x}\left\lfloor{\log x\over\log p}\right\rfloor\log p,\quad\psi_1(x) = \int_1^x\psi(u)\ du.$$
Textbook proved (iv)->(iii)->(ii) (Proposition 2.1, 2.2). I can prove (ii)->(i) using a similar argument. So I tried to prove (i)->(iv) using a similar method the book used to prove (iv)->(iii). Here is the proof from the textbook:
Proposition $\pmb{2.2}$ If $\psi_1(x)\sim x^2/2$ as $x\to\infty$, then $\psi(x)\sim x$ as $x\to\infty$, and therefore, $\pi(x)\sim x/\log(x)$ as $x\to\infty$.
Proof. By Proposition $2.1$, if suffices to prove that $\psi(x)\sim x$ as $x\to\infty$. This will follow quite easily from the fact that if $\alpha\lt1\lt\beta$, then $$ \frac1{(1-\alpha)x}\int_{\alpha x}^x\psi(u)\,\mathrm{d}u\le\psi(x)\le\frac1{(\beta-1)x}\int_x^{\beta x}\psi(u)\,\mathrm{d}u $$ The proof of this double inequality is immediate and relies simply on the fact that $\psi$ is increasing. As a consequence, we find, for example, that $$ \psi(x)\le\frac1{(\beta-1)x}[\psi_1(\beta x)-\psi_1(x)], $$ and therefore $$ \frac{\psi(x)}x\le\frac1{(\beta-1)}\left[\frac{\psi_1(\beta x)}{(\beta x)^2}\beta^2-\frac{\psi_1(x)}{x^2}\right]. $$ In turn this implies $$ \limsup_{x\to\infty}\frac{\psi(x)}x\le\frac1{\beta-1}\left[\frac12\beta^2-\frac12\right]=\frac12(\beta+1). $$ Since this result is true for all $\beta\gt1$, we have proved that $\limsup_{x\to\infty}\psi(x)/x\le1$. A similar argument with $\alpha\lt1$, then shows that $\limsup_{x\to\infty}\psi(x)/x\ge1$, and the proof of the proposition is complete.
$\varphi(x)\leq\psi(x)$ so $\int_1^x\varphi(u)\ du\leq\int_1^x\psi(u)\ du =\psi_1(x)$. So, $${\varphi(x)\over x}\leq{1\over(\beta-1)}\left[{\psi_1(\beta x)\over(\beta x)^2}\beta^2-{\psi_1(x)\over x^2}\right].$$ But this time, $\lim_{x\to\infty}{\varphi(x)\over x} =1$ does not imply anything. I guess a completely different argument is required but can't come up with it. Please help.