# Integrate $\int_0^{\infty}\left(\frac{x}{\sinh x}\right)^ndx$, relationship between infinite residue sum, Riemann zeta and Dirichlet eta

I came across this question to evaluate the integral $$\int_0^{\infty}\left(\frac{x}{\sinh x}\right)^ndx$$

I thought this would be a nice challenge to keep me busy in the afternoon, so I naively went and gave it a try using contour methods.

Noting that $$I_n=\int_{0}^{\infty}\left(\frac{z}{\sinh(z)}\right)^n dz =\frac{1}{2}\int_{-\infty}^{\infty}\left(\frac{z}{\sinh(z)}\right)^n dz$$

and $$\lim_{z\to 0}\left(\frac{z}{\sinh(z)}\right)^n \text{ exists,}$$

We can take as a contour a semi-circle in the upper half-plane. We get

$$\oint_C\left(\frac{z}{\sinh(z)}\right)^ndz = \int_{-R}^R\left(\frac{z}{\sinh(z)}\right)^n+\int_\gamma \left(\frac{z}{\sinh(z)}\right)^ndz$$

It can be shown that the integral on the semi-circular arc vanishes, since \begin{align*} \left|\int_\gamma \left(\frac{z}{\sinh(z)}\right)^ndz\right|&\leq \int_\gamma \left|\left(\frac{z}{\sinh(z)}\right)^n\right||dz|\\ &=\int_{0}^\pi \frac{R^{n+1}d\theta}{|\sinh(Re^{i\theta})|^n}\\ &=\int_{0}^\pi \frac{2^n R^{n+1}d\theta}{|e^{Re^{i\theta}}-e^{-Re^{i\theta }}|^n}\\ &\leq \int_{0}^\pi \frac{2^n R^{n+1}d\theta}{\left||e^{Re^{i\theta}}|-|e^{-Re^{i\theta }}|\right|^n}\\ &= \int_{0}^\pi \frac{2^n R^{n+1}d\theta}{\left|e^{R\cos\theta}-e^{-R\cos\theta}\right|^n}\\ &\leq \int_{0}^\pi \frac{2^n R^{n+1}d\theta}{\left|e^R-e^{-R}\right|^n}\\ &= \frac{2^n \pi R^{n+1}d\theta}{\left|e^R-e^{-R}\right|^n} \end{align*}

which goes to $$0$$ as $$R\to \infty$$.

As $$R\to\infty$$, we would have an infinite number of poles lying inside the contour, on the imaginary axis. As I thought I'd likely face a wall for some reason due to this, I started computing residues for the first couple $$n$$ using Mathematica.

For $$n=1$$, residues at $$\pi i m$$ have the expression $$m(-1)^m i\pi$$ , $$m\geq 1$$ whose sum diverges. However, oddly enough, we could get the right value of the integral using the Dirichlet eta function $$\eta(s)$$ With $$s=-1$$, we end up getting $$\eta(-1)=1/4$$, which means $$2I_1 = 2\pi i (-i\pi /4)$$, thus $$I_1 = \pi^2/4$$ as desired.

For $$n=2$$, residues have the expression $$2\pi i m$$ whose sum would typically diverge. However, this time using the Riemann zeta function $$\zeta(s)$$ with $$s=-1$$, we end up getting $$\zeta(-1)=-1/12$$, which means $$2I_2 = 2\pi i (-i\pi /6)$$, thus $$I_2 = \pi^2/6$$ as desired.

For $$n=3$$, the residues are $$i(-1)^m ((3m\pi)+(m\pi)^3/2)$$. Using the same spiel as above, the sum of the residues becomes $$-3i\pi \eta(-1)-\frac{i\pi^3}{2}\eta(-3)$$

and the integral becomes $$I_3 = -\frac{1}{16} \pi ^2 \left(\pi ^2-12\right)$$

which is the correct answer yet again. I tried this up to $$n=15$$ and this method hasn't failed yet.

For even $$n$$, the residues always seem to form an odd polynomial in $$(m\pi)$$ of order $$n-1$$ : $$R_{even} = c_1(\pi m)+c_3(\pi m)^3+...+c_{n-1}(\pi m)^{n-1}$$

and for odd $$n$$, they form an odd polynomial in $$(-1)^m(m\pi)$$ of order $$n$$:

$$R_{odd} = (-1)^m\left(d_1(\pi m)+d_3(\pi m)^3+...+d_{n}(\pi m)^{n}\right)$$

Finding the coefficients seemed like an impossible task for $$m>1$$... oh, and it also seems that for even $$n>2$$, the last coefficient is equal to the inverse of the last coefficient of the odd $$n-1$$ residue for some god forsaken reason. I know some people here get masochistic satisfaction trying to prove this kind of stuff, so you're welcome to try and prove it (or disprove it), I guess.

I figured I neither have time, nor enough math knowledge to derive a closed form for the residues. The results seem pretty amazing nonetheless... Yet I still don't know how this is possible. I expected to normally sum residues and get a "normal" answer, but Dirichlet's and Riemann's analytically continuated ghosts barged in without knocking. Is there something I don't know about the residue theorem forbidding me from summing an infinite number of residues the normal way? I am not really a math major or anything, so my techniques are pretty limited.

• The coefficients are given by math.stackexchange.com/a/4081308/276986 – reuns Mar 29 at 7:50
• Specifically, the coefficients are the "central factorial numbers" (see this answer; another question in the same vein is here.). Your proof that the integral on the semi-circular arc vanishes doesn't seem quite correct to me though: $\cos\theta$ can be $0$, the final estimate doesn't seem to hold. Your non-convergent series are still quite interesting. – heiner May 1 at 19:23