Why shouldn't this prove the prime number theorem?

Someone deduced without using complex analysis that

$$ \int \frac{\pi(t)}{t^2} \mathrm{d}t \sim \log\log t $$ where $\pi$ is the prime counting function.

By differentiating the above, he then arrives at

$$\frac{\pi(t)}{t^2} \sim \frac{1}{t\log t} $$ which is exactly the Prime Number Theorem.

However, he feels that something should be wrong with this approach, but not sure exactly what ?


The reasoning is flawed because $f\sim g$ most certainly does NOT imply $f’\sim g’$.

For example, take $f(x)\equiv 0$ and $g(x)= \frac1N \sin N^2x$.


$f\sim g$ does not imply $f'\sim g'$! L'hopital's rule only works in one direction: $$\log x \sim \log \left((5+\sin x)x\right) \quad\text{but}\quad\frac1{x}\nsim\frac{((5+\sin x)x)'}{(5+\sin x)x}$$ or if you want, $$\log\log x \sim \log \log \left((5+\sin x)x\right) \quad\text{but}\quad\frac1{x\log x}\nsim\frac{((5+\sin x)x)'}{(5+\sin x)x \cdot \log\left((5+\sin x)x\right)}$$ (The factor $5+\sin x$ is there just to make the second quotient misbehave.)

The point is that we don't know (a priori) that $$\frac{\pi(x)}{x/\log x}$$ has a limit for $x\to\infty$.


What l'Hopital does tell us, is that if the limit of $(\pi(x)\log x)/x$ exists, then it is $1$.

I believe Chebyshev's original proof (and any subsequent ones) of this fact also goes along these lines, via a Mertens-type estimate for $\sum_{p\leq x}1/p\sim\int_1^x\pi(t)/t^2$.