Integration by parts of the Logarithmic Integral I am doing work on analytic number theory, and I am currently looking at the Prime Number Theorem, that is
$$\pi(x) \sim Li(x)$$
Some of my sources say that I can do integration by parts on the integral that defines Li$(x)$, that is $\int_2^x \frac{dt}{\ln(t)}$ and then take the limit as $x \rightarrow \infty$, to see that Li$(x)$ is asymptotic to $\frac{x}{\ln (x)}$ and so $\pi(x) \sim \frac{x}{\ln (x)}$.
I'm sure this is pretty easy, and I've done the integration by parts, but I am quite rusty so I'm not entirely sure how the calculation would go.
By integration by parts I get soemthing like:
$$\int \frac{1}{\ln(x)} dx = \frac{x}{\ln (x)} + \int \frac{1}{\ln(x)^2} dx$$
It's been a while, so I don't rememeber if the following is valid:
Let $I :=\int \frac{1}{\ln(x)} dx$, so we have:
$$I = \frac{x}{\ln (x)} + \frac{I}{\ln(x)}$$
so $I(1+\ln(x)) = x$, so $I=\frac{x}{1+\ln(x)}$, and as $x \rightarrow \infty$ this is  $\frac{x}{\ln(x)}$,
so Li$(x) \sim \frac{x}{\ln (x)}$.
I'm not at all confident this is correct, so I was wondering if you can show me what I am doing wrong.
Many thanks.
 A: This is wrong, because if you call 
$$I = \int \frac{1}{\ln(x)}\ \text{d}x$$
Then 
$$\int \frac{1}{\ln^2(x)}\ \text{d}x \neq \frac{I}{\ln(x)}$$
That is FALSE.
A: Integration by parts of the Logarithmic Integral, Li(x), can be calculated using the Exponential Integral, Ei(x), formula:
li(x) = Ei(lnx) = (γ + ln(lnx)) + [the cumulative sum from n=1 to infinity of: ((lnx)^n)/(n*n!)]
where: 
(x) is equal to any positive integer greater-than-or-equal-to 2,
ln(x) is the natural logarithm of (x),
(γ) is the Euler–Mascheroni constant, equal to approximately: 0.5772156649015328606065120,
ln(lnx) is the natural logarithm of: the natural logarithm of (x),
and where (n) is the iteration number, 1,2,3....
For example: 
Using ten iterations of the above formula the logarithmic integral of 2 was calculated to be: 1.04516378007482855. The actual value for the li(x) of 2 is about: 1.04516378011749278. The two value are in agreement for ten significant figures.
Note 1:
For values larger than 2, subtract the li(x) of 2 (which is approximately: 1.04516378011749278) from the final result.
Note 2:
It is not necessary to calculate an infinite number of iterations to acquire a good approximation of Li(x). 
For example: if (x) = 1,000,000, and 30 iterations are calculated using the above formula, then the calculated result for Li(x) will only deviate from the actual result for Li(x) by two units!
Source(s):
“Chapter 6 Exponential, Logarithmic, Sine, and Cosine Integrals”. Digital Library of Mathematical Functions, National Institute of Standards and Technology. dlmf.nist.gov. 2016-12-2. March 29, 2017. http://dlmf.nist.gov/6.6.
Kohli, Parth. “The answers above are very correct and state the Prime Number Theorem.... There are a lot of values that are approximately equal to π(x), as shown in the table.”. math.stackexchange.  December 24, 2012, 2:57 P.M. March 9, 2017. How to find number of prime numbers up to to N?.
“Logarithmic Integral Function”. en.wikipedia.org. February 2, 2017, at 16:49. March 28, 2017. en.wikipedia.org/wiki/Logarithmic_integral_function.
