I've been looking at how to integrate the following definite integral using the residue calculus, but can't seem to get my thoughts together. I know the $\log$ term is a multivalued function and the branch points are $i$, $-i$, and complex infinity, so I know that there must be branch cuts from $i$ and $-i$ stretching out to complex infinity (I think of this as being on a Riemann sphere with infinity at the "furthest 'pole' on the sphere."

Because of this I know that I can't use an ordinary key-hole contour because this would intersect these branch cuts. There must be any number of contours I could attempt, so my question is are there any known useful contours for dealing with such integrals? Or maybe residue calculus is no help here?

$$\int_0^\infty\frac{\log (1+z^2)}{e^z-1}dz.$$

  • 15,638
  • 3
  • 25
  • 69
  • 9,831
  • 5
  • 40
  • 73
  • 1
    This one is a tough nut to crack. To use a rectangular contour, one would need to integrate $$\oint_C dz \frac{f(z)}{e^z-1}$$ where $f(x)-f(x+i 2 \pi) = \log{(1+x^2)}$; I cannot find such an $f$. Meanwhile, a semicircular contour is out because the integral is divergent over the negative real line. – Ron Gordon Jan 26 '14 at 13:12
  • @Ron - by rectangular contour do you mean that which "covers" the first quadrant (i.e. vertices at $(0,0), (R,0), (R,R), (0,R)$ ? (although I suppose that is technically square!) – gone Feb 02 '14 at 21:09
  • 1
    No. You want the vertices to be at $i 2 \pi$ and $R + i 2 \pi$ so that the denominator remains the same in the $x$ integrals. – Ron Gordon Feb 02 '14 at 21:33
  • Maybe try integrating by parts to deal with $$\int_0^\infty \log(1-e^{-z}) \frac{2z}{1+z^2} dz?$$ – abnry Feb 02 '14 at 22:21
  • @nayrb Your idea is quite fine. However, the OP is looking for a complex contour integral. – Felix Marin Jun 04 '14 at 19:18
  • 1
    @FelixMarin, I know, perhaps the typical complex variables tricks would be more amenable to the expression I gave. That's my meager suggestion. – abnry Jun 04 '14 at 21:38

1 Answers1


A partial answer for the moment.

I think such an integral can be attacked with complex analytic techniques, but just after some manipulations. Integrating by parts we have: $$ I = 2\int_{0}^{+\infty}\frac{t}{1+t^2}(-\log(1-e^{-t}))\,dt =2\sum_{n=1}^{+\infty}\frac{1}{n}\int_{0}^{+\infty}\frac{te^{-nt}}{1+t^2}\,dt\tag{1}$$ and since $$ \frac{t}{1+t^2} = \int_{0}^{+\infty}e^{-tu}\cos u \,du, \tag{2} $$ it follows that: $$\begin{eqnarray*} I &=& 2\sum_{n=1}^{+\infty}\frac{1}{n}\int_{0}^{+\infty}\frac{\cos u}{n+u}\,du=\color{red}{2\int_{0}^{+\infty} \frac{H_u}{u} \cos u\,du}\\&=&\color{blue}{2\int_{0}^{+\infty}\frac{dv}{v+1}\sum_{n=1}^{+\infty}\frac{\cos(nv)}{n}},\tag{3}\end{eqnarray*} $$ where $H_u=\gamma+\psi(u+1)$, $\gamma$ is the Euler constant and $\psi=\frac{\Gamma'}{\Gamma}$. In this form, the integral is convergent in virtue of the integral version of the Dirichlet's test: $\color{red}{\frac{H_u}{u}}$ is a smooth function on $\mathbb{R}^+$ decreasing to zero, or $\color{blue}{\sum_{n\geq 1}\frac{\cos(nv)}{n}}$ is a $2\pi$-periodic function, $-\log(2\sin(v/2))$, belonging to $L^1((0,2\pi))$ and having mean zero. We also have: $$\begin{eqnarray*} I &=& 2\sum_{n=1}^{+\infty}\frac{1}{n}\int_{n}^{+\infty}\frac{\cos u\cos n+\sin u\sin n}{u}\,du\\&=&2\sum_{n=1}^{+\infty}\left(-\frac{\cos n}{n}\operatorname{Ci}(n)+\frac{\sin n}{n}\left(\frac{\pi}{2}-\operatorname{Si}(n)\right)\right)\\&=&\frac{\pi(\pi-1)}{2}-2\sum_{n=1}^{+\infty}\frac{\sin n\operatorname{Si}(n)+\cos n\operatorname{Ci}(n)}{n},\tag{4}\end{eqnarray*}$$ where $\operatorname{Si}(n)=\int_{0}^{n}\frac{\sin z}{z}\,dz$ and $\operatorname{Ci}(n)=-\int_{n}^{+\infty}\frac{\cos z}{z}\,dz$.

Addendum. Binet's second $\log\Gamma$-formula can be seen as a consequence of the Abel-Plana formula and it gives $$\log\Gamma(z)=\left(z-\frac{1}{2}\right)\log(z)-z+\log\sqrt{2\pi}+\frac{1}{\pi}\int_{0}^{+\infty}\frac{\arctan\frac{t}{2\pi z}}{e^t-1}\,dz.\tag{5}$$ If we consider such identity at $z=\frac{1}{2\pi}$, then apply $\int_{0}^{\frac{1}{2\pi}}\left(\ldots\right)\,dz$ to both sides, we recover a closed form for the similar integral $\int_{0}^{+\infty}\frac{z\log(1+z^2)}{e^z-1}\,dz$. The evaluation at $z=\frac{i}{2\pi}$ leads to a closed form for $\int_{0}^{+\infty}\frac{\text{arctanh}(z)}{e^z-1}\,dz$.

Jack D'Aurizio
  • 338,356
  • 40
  • 353
  • 787