Approximation of $\mathrm{Li}(x) = \int\limits_{0}^x \frac{dt}{\ln t}$ [duplicate]

I am reading about the Riemann hypothesis, and the article mentioned the Li function:

$$\mathrm{Li}(x) = \int\limits_{0}^x \frac{dt}{\ln t}$$ They said that this function can be approximated:

$$\mathrm{Li}(x) \approx \frac{x}{\ln x} + \frac{x}{\ln^2(x)} + \frac{2x}{\ln^3(x)}+\cdots ,$$ thus is a better approximation for $\pi(x)$(the number of prime numbers less than or equal to $x$).

I could not figure out how to prove this approximation formula. Could anyone help me please?

• It's worth noting that this is not a single approximation but an asymptotic expansion: in contrast to a power series, plugging in any value of $x>1$ will give a divergent series. Instead the convention is that one can truncate the expansion at any given number of terms, to get an approximation with error roughly of the same size as the next term, making it suitable for large enough $x$. – Erick Wong Apr 8 '13 at 15:19
• – Eric Naslund Apr 9 '13 at 23:13

Minor correction: the $0$ at the lower limit should be $2$ so that the integral converges.

The approximation for any truncation of the sum on the right comes from repeated integration by parts. In the integral

$$Li(x) = \int\limits_{2}^x \frac{dt}{\ln t}$$

integrate by parts with $u = \frac{1}{\ln{t}}$ and $dv = dt$ to obtain

$$Li(x) = \frac{x}{\ln(x)} + \int\limits_{2}^x \frac{dt}{({\ln t})^2} dt - \frac{2}{\ln(2)}$$

Then iterate, setting $u = \frac{1}{{(\ln{t})}^2}$ and $dv = dt$.

If you iterate indefinitely, there's a subtlety having to do with the constant terms such as $\frac{2}{\ln{2}}$ adding up. But if you stop after a finite number of steps, repeated integration by parts gives the desired approximation.

• The integral converges if the limit is $0$ but the singularity at $t=1$ must be integrated in the principal value sense. See the wiki page for the logarithmic integral. Also note the difference between the functions $\mathrm{Li}$ and $\mathrm{li}$, the latter of which is likely the one Long Mai is asking about. Of course this doesn't affect your method; you will end up with the asymptotic series stated at the end of the question. – Antonio Vargas Apr 1 '13 at 1:46

Differentiate the right hand side (it will also tell how to continue with the constants..:)

Verify and continue these: \begin{align} \left(\frac{x}{\ln x}\right)' &= \frac1{\ln x}-\frac1{\ln^2x} \\ \left(\frac{x}{\ln^2 x}\right)' &= \frac1{\ln^2 x}-\frac2{\ln^3x} \\ &\dots \end{align}