TITLE: Why shouldn't this prove the prime number theorem?
QUESTION [13 upvotes]: 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 ?

REPLY [34 votes]: 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$.