I'm trying to show that the relation $\psi(x)=x+O(\sqrt{x}\log ^2 x)$ (consequence of the Riemann hypothesis) implies $\pi(x)=Li(x)+O(\sqrt{x}\log x)$, where $Li(x)=\int_2^x \frac{dt}{\log t}$.
I haven´t achieved so much towards the solution of this exercise that seems to be easy. This is what i've done:
As $\pi(x)\sim \psi(x)/\log x$, we get $$\pi(x)= \psi(x)/\log x+O(\psi(x)/\log x)=x/\log x+O(\sqrt{x}\log x)+O(x/\log x).$$ Using the relation $Li(x)=x/\log x+\int_2^x\frac{dt}{log^2 t}-2/\log 2$, we obtain $$\pi(x)=Li(x)+O(\sqrt{x}\log x)+O(x/\log x)-\int_2^x\frac{dt}{log^2 t}.$$ I can't handle with the last two terms because i guess they are not big O's of $\sqrt{x}\log x$. I would appreciate any orientation.
Due to Greg Martin's answer, i've come to this solution, is it right?:
Let's suppose that \begin{equation} \psi(x)=x+O(\sqrt{x}\log^2 x).\end{equation} We have that \begin{equation} \psi(x)-\vartheta(x)=O(\sqrt{x}\log^2 x)\end{equation} -proof of theorem 4.1 from Apostol's book-, then \begin{equation} E(x):=\vartheta(x)-x=O(\sqrt{x}\log^2 x).\end{equation} By (1) and theorem 4.2 from Apostol's, we obtain the following \begin{equation} \pi(x)-\int_2^x\frac{\vartheta(t)}{t\log^2 t}dt+\frac{\psi(x)-\vartheta(x)}{\log x}=\frac{\vartheta(x)}{\log x}+\frac{\psi(x)-\vartheta(x)}{\log x}=\frac{x}{\log x}+O(x^{1/2}\log x).\end{equation} So \begin{eqnarray} \pi(x) &=& \frac{x}{\log x}+O(x^{1/2}\log x)+\int_2^x\frac{\vartheta(t)}{t\log^2 t}dt+\frac{\vartheta(x)-\psi(x)}{\log x} \\ & = & \frac{x}{\log x}+O(x^{1/2}\log x)+\int_2^x\frac{\vartheta(t)}{t\log^2 t}dt+\frac{\vartheta(x)-x-O(x^{1/2}\log^2 x)}{\log x} \\ & = &\frac{x}{\log x}+O(x^{1/2}\log x)+\int_2^x\frac{\vartheta(t)}{t\log^2 t}dt+\frac{E(x)}{\log x}. \end{eqnarray} But \begin{equation} Li(x)=\frac{x}{\log x}+\int_2^x\frac{dt}{\log^2 t}-\frac{2}{\log 2}, \end{equation} so we get \begin{eqnarray} \pi(x) & = & Li(x)-\int_2^x\frac{dt}{\log^2 t}+\frac{2}{\log 2}+O(\sqrt{x}\log x)+\int_2^x\frac{\vartheta(t)}{t\log^2 t}dt+\frac{E(x)}{\log x}\\ & = & Li(x)+\int_2^x\frac{E(t)}{t\log^2 t}dt+\frac{E(x)}{\log x}+O(\sqrt{x}\log x)\\ & = & Li(x)+\int_2^x\frac{O(\sqrt{t}\log^2 t)}{t\log^2 t}dt+O(\sqrt{x}\log x) \\ & = & Li(x)+O(\int_2^x\frac{\sqrt{t}\log^2 t}{t\log^2 t}dt)+O(\sqrt{x}\log x)\\ & = & Li(x)+O(2\sqrt{x}-2\sqrt{2})+O(\sqrt{x}\log x)\\ & = & Li(x)+O(\sqrt{x}\log x). \end{eqnarray}
This holds for $x\geq 2$.