# Evaluating the integral $\int_0^\infty \frac{\psi(x)-x}{x^2}dx.$

Let $\psi(x)=\sum_{n\leq x} \Lambda(n)$ be the weighted prime counting function. I am trying to evaluate the integral $$\kappa:=\int_{1}^{\infty}\frac{\psi(x)-x}{x^{2}}dx$$ in several different ways. Originally, this integral came up as a particular part in a particular case for a a formula for a summatory function I was looking at. From now on, let $\gamma$ refer to the Euler-Mascheroni constant.

(Now Corrected:) I found a fun, elementary approach to this integral which gave $\kappa=-1-\gamma$ if we assume the quantitative prime number theorem. (Precisely, we just need to assume that this integral is absolutely convergent. ) Since I am not too confident about this, I naturally wanted to check by complex analytic methods to see if my answer was correct. My question then is:

What other ways can be used to prove this identity?

I feel like knowing many approaches to this problem will give a greater understanding of certain properties of these functions. A friend suggested that it must be related to the logarithmic derivative of $\zeta(s)$, and certain special values, but I cannot see how to use this.

Thanks a lot!

I attempted to use the explicit formula for $\psi(x)$, and deduced $\kappa=-\gamma-1$. Originally I felt this was wrong, but after reading Julian Rosen's answer I think it is correct. Here is the alternate solution:

Substituting in the explicit formula, and then integrating termwise we have$$\kappa=\int_{1}^{\infty}\left(-\sum_{\rho}\frac{x^{\rho-2}}{\rho}-\frac{\log2\pi}{x^{2}}-\frac{\log\left(1-x^{-2}\right)}{2x^{2}}\right)dx=\sum_{\rho}\frac{1}{\rho(\rho-1)}-\log2\pi+1-\log2$$since

$$\frac{1}{2}\int_{1}^{\infty}\frac{\log\left(1-x^{-2}\right)^{-1}}{x^{2}}dx=\frac{1}{2}\int_{1}^{\infty}\sum_{i=1}^{\infty}\frac{1}{ix^{2i+2}}dx=\sum_{i=1}^{\infty}\frac{1}{2i(2i+1)}=1-\log2.$$As $$\sum_{\rho}\frac{1}{\rho(\rho-1)}=\sum_{\rho}\frac{1}{\rho-1}-\frac{1}{\rho}=-\sum_{\rho}\frac{1}{1-\rho}+\frac{1}{\rho}=2B=-\gamma-2+\log4\pi$$it follows that $\kappa=-\gamma-1$.

Consider $f(s):=\int_1^{\infty}\frac{\psi(x)-x}{x^s}dx$, which converges for $Re(s)\geq2$. For $Re(s)>2$, we can separate the numerator and integrate by parts (using the Riemann-Stieltjes integral, for convenience) to get $f(s)=\frac{1}{s-1}\int_1^{\infty}\frac{1}{x^{s-1}}d\psi(x)-\frac{1}{s-2}$. Now, $\frac{\zeta'}{\zeta}(s)=-\sum\frac{\Lambda(n)}{n^s}=-\int_1^{\infty}\frac{1}{x^s}d\psi(x)$, so we can write $f(s)=\frac{-1}{s-1}\frac{\zeta'}{\zeta}(s-1)-\frac{1}{s-2}$. $\frac{\zeta'}{\zeta}(s-1)$ has a Laurent expansion at $s=2$ of the form $\frac{\zeta'}{\zeta}(s-1)=\frac{-1}{s-2}+\gamma+O(s-2)$, so that $f(s)=\frac{-1-\gamma}{s-1}+O(s-2)$. This holds for $Re(s)>2$, but if we let $s$ decrease to 2 and use the dominated convergence theorem, we get that the value of the integral is $-\gamma-1$.

Hmm...this isn't quite the same as either value you gave. Maybe I made a mistake somewhere.

• Thanks Julian. This is certainly the type of solution my friend was thinking of. – Eric Naslund May 10 '11 at 21:48

I want to prove it with an elementary approach:

a theorem of Landau say that the PNT is equivalent to $\sum_{n\leq x} \frac{\Lambda(n)}{n}=log(x)-\gamma+o(1)$.

Now using partial summation we have:

$\displaystyle \sum_{n\leq x} \frac{\Lambda(n)}{n}=\displaystyle \int_{1}^{x}\frac {d\psi(t)}{t}=\int_{1}^{x}\frac {d(\psi(t)-t)}{t}+\int_{1}^{x}\frac {dt}{t}=log(x)+\int_{1}^{+\infty}\frac {\psi(t)-t}{t^{2}}-\int_{x}^{+\infty}\frac {\psi(t)-t}{t^{2}}+\frac{\psi(x)-x}{x}-\frac{\psi(1)-1}{1}=log(x)+\int_{1}^{+\infty}\frac {\psi(t)-t}{t^{2}}+o(1)+1$

so that $\displaystyle \int_{1}^{+\infty}\frac {\psi(t)-t}{t^{2}}=-1-\gamma$.

• I think we don't need the PNT, try from one of the Mertens theorem, or by completing this : $\sum_{n \le x} \lfloor x /n\rfloor \Lambda(n) = \ln x!= x \ln x+ \mathcal{O}(x)$ by Stirling's approximation. Hence $\sum_{n \le x} \frac{\Lambda(n)}{n} = \frac{1}{x} \sum_{n \le x} \Lambda(n)(\lfloor x /n\rfloor+\mathcal{O}(1)) = \ln x+ \mathcal{O}(1)$ (we used that $\sum_{n \le x}\Lambda(n) = \mathcal{O}(x)$) – reuns Oct 11 '16 at 19:07
• But in this way i think that one doesn't recover the constant $\gamma$ because one has only a $O(1)$. – The Number Theorist Oct 12 '16 at 9:09
• All we need is showing that $\int_1^\infty (\psi(x)-x) x^{-2}dx$ converges and that its value is $\lim_{s \to 1^-}\int_1^\infty (\psi(x)-x) x^{-s-1}dx = -1 - \gamma$ by Julian answer – reuns Oct 12 '16 at 9:43

The answer seems to be $-1-\gamma$. The integral with $\log$ is equal to $\log2-1$.

• The integral with log is definitely $1-\log2$. It seems that the error in the last part was incorrectly adding the expression in the last line and the third line from the bottom. (There is $−2$ and a $1$ and somehow by adding these I found positive $1$....) – Eric Naslund May 10 '11 at 21:52