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$.

  • $\begingroup$ What book is this from? What page? $\endgroup$
    – Will Jagy
    Jun 10, 2014 at 17:16
  • $\begingroup$ I haven't found it in the books we are using for this subject (apostol, hildebrands notes). This exercise is in a worksheet he gave us. $\endgroup$ Jun 10, 2014 at 17:20

1 Answer 1


The traditional way of showing this implication is by using partial summation. First replace $\psi(x)$ by $\theta(x)+O(\sqrt x)$ (hopefully that's known or easy). If we set $E(x) = \theta(x)-x$, then (using $2^-$ to denote a real number a little bit smaller than $2$) \begin{align*} \pi(x)-Li(x) &= \int_{2^-}^x \frac{1}{\log t} \,d\theta(t) - \int_2^x \frac{dt}{\log t} \\ &= \int_{2^-}^x \frac{1}{\log t} \,d(\theta(t)-t) = \int_{2^-}^x \frac{1}{\log t} \,dE(t) \\ &= \frac{E(t)}{\log t}\bigg|_{2^-}^x - \int_{2^-}^x E(t)\,d\bigg(\frac1{\log t}\bigg) \\ &= \frac{E(x)}{\log x} + O(1) + \int_{2}^x \frac{E(t)}{t\log^2 t}\,dt. \end{align*} (If you're not comfortable with these Riemann-Stieltjes integrals, you can actually prove by hand that $\pi(x)-Li(x)$ equals that second-to-last expression.) At this point you can input the hypothesized bound on $E(t)$.

  • $\begingroup$ Hi Greg, thank you for your answer. I have the following doubts: the equality of pi(x) with the first integral, could be justified by theorem 6.16 in Baby Rudin?; in the next step, is it integration by parts?. I'm not totally familiar with Riemann-Stieltjes integration, but also, not unfamiliar. Thanks. $\endgroup$ Jun 10, 2014 at 17:52
  • $\begingroup$ Going from the second to third line is indeed integration by parts. For the first equality, we're using the fact: if $f(t)$ is continuous and $g(t) = \sum_{n\le t} a_n$, then $$\sum_{n\le x} f(n)a_n = \int^x f(t) \,dg(t).$$ (I don't know whether this is what baby Rudin says. Maybe $f$ needs to be of bounded variation too.) $\endgroup$ Jun 10, 2014 at 23:03
  • $\begingroup$ Thank you. Every thing is clear now (i guess). I tried the solution without Riemann-Stieltjes integration; is it right? $\endgroup$ Jun 10, 2014 at 23:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .