On an integral related to the prime number theorem I am trying to prove the prime number theorem by showing
$$
J(x)=\sum_{n\le x}{\Lambda(n)\over\log n}\sim{x\over\log x}
$$
To begin with, I use
$$
\sigma\ge1-{A\over\log^9|t|}
$$
as the zero-free region for $\zeta(\sigma+it)$, so applying Perron's formula gives
$$
J(x)={1\over2\pi i}\oint_\Gamma{x^s\over s}\log\zeta(s)\mathrm ds+\mathcal O\left(xe^{-c\log^{1/10}x}\right)
$$
where $\Gamma$ is any positively oriented contour that encloses only $s=1$. Since $\zeta(s)\sim 1/(s-1)$ when $s$ is near one, it suffices to evaluate
$$
{1\over2\pi i}\oint_\Gamma{x^s\over s}\log{1\over s-1}\mathrm ds
$$
However, this is where I become stuck. Could anybody suggest a contour to work this out?
 A: Since we are concerned about large $x$, we assume $x>1$ at the beginning.
To proceed, consider introducing a parameter
$$
f(a)={1\over2\pi i}\oint_\Gamma{x^s\over s}\log{1\over s/a-1}\mathrm ds
$$
where $\Gamma$ rotates around $s=a$.
so all we need is to find $f(1)$. To proceed, we differentiate on both side to get
$$
f'(a)={1\over2\pi i}\oint_\Gamma{x^s\over s}\left[\frac1a+{1\over s-a}\right]\mathrm ds={x^a\over a}
$$
In order to proceed, we consider integrating through the straight path connecting $a=-\infty$ and $a=1+\delta i$ (with $\delta\in\mathbb R$). This means we have
$$
f(1+i\delta)=\int_{-\infty}^{1+\delta i}{x^a\over a}\mathrm da=\int_{-\infty}^{(1+\delta i)\log x}{e^t\over t}\mathrm dt
$$
Now, we deform the path into horizontal segment from $-\infty$ to $-\delta$, an arc going through $-|\delta|$, $i\delta$, and $|\delta|$
$$
f(1+i\delta)=\int_{-\infty}^{-|\delta|}+\int_\delta^{(1+|\delta|i)\log x}{e^t\over t}\mathrm dt+\int_{-|\delta|}^{|\delta|}{e^t\over t}\mathrm dt
$$
when $\delta>0$, we have
$$
\int_{-|\delta|}^{|\delta|}{e^t\over t}\mathrm dt=-i\pi
$$
when $\delta<0$ the RHS changes sign. Consequently, we obtain $f(1)$ by calculating its Cauchy principal value:
$$
\begin{aligned}
f(1)
&\triangleq\lim_{\delta\to0^+}{f(1+i\delta)+f(1-i\delta)\over2} \\
&=\lim_{\delta\to0^+}\int_{-\infty}^{-\delta}+\int_\delta^{\log x}{e^t\over t}\mathrm dt \\
&=\lim_{\delta\to0^+}\int_0^{1-\delta}+\int_{1+\delta}^x{\mathrm dt\over\log t} \\
&=\operatorname{li}(x)
\end{aligned}
$$
Conclusively, we obtain the prime number theorem in the form of
$$
J(x)=\operatorname{li}(x)+\mathcal O\left(xe^{-c\log^{1/10}x}\right)
$$
A: $$li(x)=pv(\int_0^x \frac1{\log t}dt), \qquad li(1+\epsilon)=O(\log\epsilon)$$
For $\Re(s)>1$
$$-\log (s-1)= \int_{s-1}^1\int_1^\infty x^{-z-1} dxdz=\int_1^\infty \frac{x^{-s}-x^{-2}}{\log x}dx$$ $$=li(x) (x^{-s}-x^{-2})|_1^\infty+\int_1^\infty li(x) (sx^{-s-1}-2x^{-3})dx=s\int_1^\infty (li(x)+C)x^{-s-1}dx$$
Whence by Mellin inversion for $x>0,x\ne 1,\Re(s)>1$
$$\frac1{2i\pi}\int_{2-i\infty}^{2+i\infty}\frac{-\log (s-1)}{s}x^sds=(li(x)+C)1_{x>1}$$
