5

I tried to solve the following integral using residue theorem. $$\int_0^\infty\frac{x}{\sinh x} ~\mathrm dx=\int_{-\infty}^\infty\frac{x}{e^x-e^{-x}}~\mathrm dx$$

$e^x-e^{-x}=0$ when $x=n\pi i, n\subset\mathbb Z$

So the residues are (when n is a positive integer) $$\frac{(-1)^n n\pi i}{2}$$ Thus the value of definite integral will be $$2\pi i\sum_{n=1}^\infty \frac{(-1)^n n\pi i}{2}=\pi^2(1-2+3-4+5-\ldots)$$

But the series diverges obviously. Here I used the technique that $$A=1-1+1-1+1-\ldots$$ $$A=1-(1-1+1-1+1-\ldots)$$ $$A=1-A, A=\frac{1}{2}$$ $$B=1-2+3-4+5-6+7-\ldots$$ $$B=(1-1+1-1+1-\ldots)-(1-2+3-4+5-\ldots)$$ $$B=A-B, B=\frac{1}{4}$$ Thus the integral value is $\frac{\pi^2}{4}$. Although the value itself is correct, I think this method is still controversial. How can this method become justified? Or is there a problem in my residue theorem solution?

Mike Park
  • 145
  • 1
    the problem with this method is that the integrand becomes unbounded on the imagaginary axis (note that $\sinh(ix)=i\sin(x)$), so you have a non defined integrand on your contour of integration (but this piece of the integral has measure 0).This results in a divergent series. I played the same game some time ago here, http://math.stackexchange.com/questions/1284185/integration-of-dfracx-sinh-xdx-from-infty-to-infty/1284788#1284788
    but unluckily i never got a satisfying answer how this kind of calculations can be made rigorous
    – tired Jul 01 '16 at 10:58

4 Answers4

10

A simpler way to use complex analysis is to consider the integral

$$\oint_C dz \frac{z}{\sinh{z}} $$

where $C$ is the rectangle with vertices $-R$, $R$, $R+i \pi$, $-R+i \pi$, with a semicircular detour of radius $\epsilon$ at $z=i \pi$ into the rectangle. Thus, the contour integral is equal to

$$\int_{-R}^R dx \frac{x}{\sinh{x}} + i \int_0^{\pi} dy \frac{R+i y}{\sinh{(R+i y)}}-PV \int_{-R}^R dx \frac{x+i \pi}{\sinh{(x+i \pi)}} \\ + i \epsilon \int_{2 \pi}^{\pi} d\phi \, e^{i \phi} \frac{i \pi + \epsilon e^{i \phi}}{\sinh{(i \pi + \epsilon e^{i \phi})}} -i \int_0^{\pi} dy \frac{-R+i y}{\sinh{(-R+i y)}} $$

As $R \to \infty$, the second and fifth integrals vanish. Further, the fourth integral becomes as $\epsilon \to 0$, $-\pi^2$. Also, the 2nd piece of the third integral vanishes due to symmetry. Left with the first piece, we may drop the principal value indicator and combine with the first integral to get, by Cauchy's theorem,

$$2 \int_{-\infty}^{\infty} dx \frac{x}{\sinh{x}} - \pi^2 = 0$$

The rest follows.

Ron Gordon
  • 138,521
  • Since you beat me to this way forward, I posted an alternative that first uses the transformation used in Jack D'Aurizio's answer, then relies on integration over "ye ole keyhole" contour. – Mark Viola Jun 30 '16 at 20:22
  • How did you calculate the third integral? – Mike Park Jul 03 '16 at 12:59
  • @MikePark: note that $\sinh{(x+i \pi)} = -\sinh{x}$. Also note that the contribution of the $i \pi$ piece in he numerator to the integral is zero. Thus, the third integral is negative the first, and they add to twice the first integral. – Ron Gordon Jul 05 '16 at 17:15
  • Oh, I am sorry! I meant the fourth one. – Mike Park Jul 08 '16 at 15:32
  • @MikePark: Note that $$\sinh{(i \pi + \epsilon e^{i \phi})} = -\sinh{( \epsilon e^{i \phi})} \sim -\epsilon e^{i \phi} $$ – Ron Gordon Jul 14 '16 at 20:04
8

Through the substitutions $x=\log t$, then $t=\frac{1}{v}$, we have: $$ I=\int_{0}^{+\infty}\frac{x\,dx}{\sinh{x}}=\int_{1}^{+\infty}\frac{2\log t}{t^2-1}\,dt = 2\int_{0}^{1}\frac{-\log v}{1-v^2}\,dv\tag{1}$$ and now a simple Taylor series expansion is enough, since: $$ \int_{0}^{1}(-\log v)v^{2k}\,dv = \frac{1}{(2k+1)^2} \tag{2}$$ leads to: $$ I = 2\sum_{k\geq 0}\frac{1}{(2k+1)^2} = \frac{3}{2}\,\zeta(2)=\color{red}{\frac{\pi^2}{4}}.\tag{3}$$ You may also use the Laplace transform: $$ \mathcal{L}\left(\frac{1}{\sinh x}\right)= -H_{\frac{s-1}{2}},\qquad \mathcal{L}^{-1}(x)=\delta'(s)\tag{4}$$ give that your integral is directly related with a value of $\psi'$, namely a dilogarithm.

Jack D'Aurizio
  • 353,855
  • Jack, I started with your Equation $(1)$, then moved to the complex plane and integrated $\frac{\log^2(z)}{z^2-1}$ over the classical "keyhole" contour. Low and behold, it worked. – Mark Viola Jun 30 '16 at 20:24
5

We can use complex analysis that begins by enforcing the substitutions that were used in the solution posted by @jackd'aurizio . There, we have

$$\int_0^\infty \frac{x}{\sinh(x)}\,dx=\int_0^\infty \frac{\log(x)}{x^2-1}\,dx \tag 1$$

Now, we analyze the contour integral

$$\begin{align} I&=\oint_C \frac{\log^2(z)}{z^2-1}\,dz\\\\ &=\int_{0^+}^R \frac{\log^2(x)}{x^2-1}\,dx-\text{PV}\left(\int_{0^+}^R\frac{\left(\log(x)+i2\pi\right)^2}{x^2-1}\,dx\right)\\\\ &-\int_\pi^{2\pi} \frac{(\log(1+\nu e^{i\phi})+i2\pi)^2}{(2+\nu e^{i\phi})(\nu e^{i\phi})}i\nu e^{i\phi}\,d\phi\\\\ &+\int_{0^+}^{2\pi^-}\frac{\log^2(Re^{i\phi})}{R^2e^{i2\phi}-1}iRe^{i\phi}\,d\phi-\int_{0^+}^{2\pi^-}\frac{\log^2(\epsilon e^{i\phi})}{\epsilon ^2e^{i2\phi}-1}i\epsilon e^{i\phi}\,d\phi \tag 2 \end{align}$$

where $C$ is the classical "keyhole" contour with the "keyhole" taken along the real axis. For $R>1$, we have from the residue theorem

$$\begin{align} I&=2\pi i \,\text{Res}\left(\frac{\log^2(z)}{z^2-1}, z=-1\right)\\\\ &=2\pi i \left(\frac{\log^2(e^{i\pi})}{-2}\right)\\\\ &=i\pi^3 \tag 3 \end{align}$$

Now, as $R\to \infty$ and $\epsilon \to 0$, the last two integrals on the right-hand side of $(2)$ vanish. Furthermore, the principal value, $\text{PV}\left(\int_0^\infty \frac{1}{x^2-1}\,dx\right)=0$. And as $\nu \to 0$, the third integral on the right-hand side of $(2)$ approaches $i2\pi^3$.

Hence, we find from the limiting value of $(2)$ and $(3)$

$$-i4\pi \int_0^\infty \frac{\log(x)}{x^2-1}\,dx+i2\pi^3=i\pi^3 \tag 4$$

Finally, from $(4)$ we obtain

$$\int_0^\infty \frac{x}{\sinh(x)}\,dx=\frac{\pi^2}{4}$$

Mark Viola
  • 179,405
2

$\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{\mathrm{i}} \newcommand{\iff}{\Leftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\Li}[2]{\,\mathrm{Li}_{#1}\left(\,{#2}\,\right)} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

  1. This is another posibility to evaluate the integral along a complex plane contour: \begin{align} \color{#f00}{\int_{0}^{\infty}{x \over \sinh\pars{x}}\,\dd x} & = \half\int_{-\infty}^{\infty}{x \over \sinh\pars{x}}\,\dd x = \int_{-\infty}^{\infty}{x\expo{x} \over \expo{2x} - 1}\,\dd x\ \stackrel{\expo{x}\ \mapsto\ x}{=}\ \int_{0}^{\infty}{\ln\pars{t} \over t^{2} - 1}\,\dd x \end{align} The integral is evaluated along a $\mathit{\mbox{key-hole}}$ contour which takes care of the $\ds{\ln\pars{z}}$ $\mathit{\mbox{branch-cut}}$ along the 'positive real axis'. Namely, $$ \ln\pars{z} = \ln\pars{\verts{z}} + \,\mathrm{arg}\pars{z}\ic\,,\ 0 < \,\mathrm{arg}\pars{z} < 2\pi\,,\ z \not= 0 $$ Along the above mentioned contour, we evaluate the integral $$ \int{\ln^{2}\pars{z} \over z^{2} - 1}\,\dd z $$ which has one pole $\ds{\pars{= -1}}$ 'inside' the contour. The forthcoming $\ds{\ \ic\,0^{\pm}\ }$ 'factors' will take care of the singularity at $\ds{x = +1}$ along the $\ds{\ln}$ branch-cut.
    $$ 2\pi\ic\,{\braces{\ln\pars{\verts{-1}} + \pi\ic}^{\, 2} \over -1 - 1} = \int_{0}^{\infty} {\bracks{\ln\pars{t} + 0\,\ic}^{\, 2} \over \pars{t - 1 + \ic 0^{+}}\pars{t + 1}}\,\dd t + \int_{\infty}^{0} {\bracks{\ln\pars{t} + 2\pi\ic}^{\, 2} \over \pars{t - 1 - \ic 0^{-}}\pars{t + 1}}\,\dd t $$ \begin{align} \pi^{3}\,\ic & = \mathrm{P.V.}\int_{0}^{\infty}{\ln^{2}\pars{t} - \ln^{2}\pars{t} - 4\pi\ic\,\ln\pars{t} - 4\pi^{2} \over t^{2} - 1}\,\dd t \\[3mm] &\ +\ \overbrace{\int_{0}^{\infty}{\ln^{2}\pars{t} \over t + 1}\, \bracks{-\pi\ic\,\delta\pars{t - 1}}\,\dd t}^{\ds{=\ 0}} \\[3mm] & - \int_{0}^{\infty}{\bracks{\ln\pars{t} + 2\pi\ic}^{\, 2}\over t + 1}\, \bracks{\pi\ic\,\delta\pars{t - 1}},\dd t \\[1cm] & = -4\pi\ic\int_{0}^{\infty}{\ln\pars{t} \over t^{2} - 1}\,\dd t - 4\pi^{2}\,\mathrm{P.V.}\int_{0}^{\infty}{\dd t \over t^{2} - 1} + 2\pi^{3}\ic \\[1cm] \imp \int_{0}^{\infty}{\ln\pars{t} \over t^{2} - 1}\,\dd t & = {\pi^{3}\ic - 2\pi^{3}\ic \over -4\pi\ic} - {4\pi^{2} \over -4\pi\ic}\,\mathrm{P.V.}\int_{0}^{\infty}{\dd t \over t^{2} - 1} \\[3mm] & = \color{#f00}{\pi^{2} \over 4} - \pi\ic\,\mathrm{P.V.}\int_{0}^{\infty}{\dd t \over t^{2} - 1}\tag{1} \end{align}
    Note que \begin{align} \mathrm{P.V.}\int_{0}^{\infty}{\dd t \over t^{2} - 1} & = \lim_{\epsilon \to 0^{+}}\pars{\int_{0}^{1 - \epsilon}{\dd t \over t^{2} - 1} + \int_{1 + \epsilon}^{\infty}{\dd t \over t^{2} - 1}} \\[3mm] & = \lim_{\epsilon \to 0^{+}}\pars{\int_{0}^{1 - \epsilon}{\dd t \over t^{2} - 1} + \int_{1/\pars{1 + \epsilon}}^{0}{\dd t \over t^{2} - 1}} = \lim_{\epsilon \to 0^{+}} \int_{1 - \epsilon}^{1/\pars{1 + \epsilon}}{\dd t \over 1 - t^{2}} = 0 \end{align} \begin{align} &\mbox{because} \\[3mm] &\ 0 < \verts{\int_{1 - \epsilon}^{1/\pars{1 + \epsilon}}{\dd t \over 1 -t^{2}}} <\verts{\pars{{1 \over 1 + \epsilon} - 1 + \epsilon}\,{1 \over 1 - 1/\pars{1 + \epsilon}^{2}}} = \verts{\epsilon\pars{1 + \epsilon} \over 2 + \epsilon} \to \stackrel{\epsilon\ \to\ 0}{0} \end{align}
    With this result and expression $\pars{1}$: $$ \color{#f00}{\int_{0}^{\infty}{x \over \sinh\pars{x}}\,\dd x} = \int_{0}^{\infty}{\ln\pars{t} \over t^{2} - 1}\,\dd t = \color{#f00}{\pi^{2} \over 4} $$
Felix Marin
  • 89,464
  • 1
    @Dr.MV Thanks. Just fixed. I used the identities $$ {1 \over x \pm ,\mathrm{i}0^{+}} = \mathrm{P.V.}\left(1 \over x\right) \mp \pi,\mathrm{i},\delta\pars{x} $$ They are widely used by physicists and they are quite fine to deal with this case because such singularity happens to be on the branch-cut. Above the branch-cut we wrote $z = x + ,\mathrm{i}0^{+}$ and below it we wrote $z = x - ,\mathrm{i}0^{+}$. The identities are understood after application 'under the integral sign'. – Felix Marin Jun 30 '16 at 22:54
  • @Dr.MV It's amusing !!!. If you use the series $${z \over \sinh\left(z\right)} =2z^{2} \sum_{n = 0}^{\infty}{\left(-1\right)^{n}\left(1 - \delta_{n0}/2\right) \over z^{2} + n^{2}\pi^{2}}$$ and 'closes' in the upper complex plane you get $-2\pi^{2}\sum_{n = 1}^{\infty}\left(-1\right)^{n}n$ which clearly diverges. However, whenever you use Dirichlet Regularization you get $$ \lim_{x \to 0}\sum_{n = 1}^{\infty}{\left(-1\right)^{n}n \over n^{x}} = -,{1 \over 4} $$ which yields ${1 \over 2},\left(-2\pi^{2}\right)\left(-,{1 \over 4}\right) = \color{#f00}{\pi^{2} \over 4}$. – Felix Marin Jul 06 '16 at 20:08