# Integral representation of the digamma function using Abel–Plana formula

$$\int^\infty_0 \frac{2x}{(x^2+z^2)e^{2\pi x}-1}\,dx =\log(z)-\psi(z)-\frac{1}{2z}$$

$$\textit{proof}$$

Use Abel–Plana formula

$$\sum_{n=0}^\infty f(n) = \int^\infty_0f(x)\,dx+\frac{f(0)}{2} +i\int^\infty_0 \frac{f(ix)-f(-ix)}{e^{2\pi x}-1}\,dx$$

Let

$$f(x) = \frac{1}{z+x}$$

Note that
$$i(f(ix) -f(-ix))= \frac{i}{z+ix}-\frac{i}{z-ix} = \frac{2x}{z^2+x^2}$$

By integration we have

$$\int^\infty_0 \frac{2x}{(x^2+z^2)e^{2\pi x}-1}\,dx =\lim_{N\to \infty}\sum_{n=0}^N \frac{1}{z+n}-\int^N_0 \frac{1}{x+z}\,dx-\frac{1}{2z}$$

The sum

$$\sum_{n=0}^N \frac{1}{z+n}=\frac{1}{z}+ \sum_{n=1}^N\frac{1}{n}-\frac{z}{n(z+n)} = H_N-\psi(z)-\gamma$$

By taking the limit

\begin{align}
\lim_{N\to \infty}\sum_{n=0}^N \frac{1}{z+n}-\int^N_0 \frac{1}{x+z}\,dx &=\log(z) -\psi(z)-\gamma+\lim_{N\to \infty}H_N-\log(z+N)\\ & = \log(z)-\psi(z)
\end{align}

Finally we have

$$\int^\infty_0 \frac{2x}{(x^2+z^2)e^{2\pi x}-1}\,dx =\log(z)-\psi(z)-\frac{1}{2z}$$

This entry was posted in Digamma function and tagged , , , , , , . Bookmark the permalink.

### 3 Responses to Integral representation of the digamma function using Abel–Plana formula

1. Ricardo says:

Congratulations for your blog. Very nice! Lots of stuff to learn.
In regards to this integral, you take Abel-plana formula for granted to derive your solution, but how do you actually proof it?
Thank you very much,
Ricardo.

• Zaidalyafeai says:

Hey Ricardo, you are right I should include a proof of it but from first glance it seems a proper contour should work. The infinite sum will be the result of summing the residues I reckon. I’ll try to post the method as soon as I have time.

• Ricardo says: