# Prove that $\int_{-\infty}^\infty \frac {\sin t \tau}{e^{t/2}-e^{-t/2}}\,dt = \pi \tanh \pi \tau$

Let $f_\tau(t)=\frac {\sin t \tau}{e^{t/2}-e^{-t/2}}$ and show that $I :=\int_{-\infty}^\infty f_\tau(t)\,dt = \pi \tanh \pi \tau$.

My attempt:

Consider the integral $\int_R f_\tau(t)\,dt$ over a large rectangle $R$ over the complex numbers going from $-K$ to $K$ to $K+4\pi i$ to $-K+4\pi i$ to $-K$ and let $K\rightarrow \infty$.

Since $f_\tau(t)$ has poles at $0, 2\pi i, 4\pi i$, we have that $$\int_R f_\tau(t)\,dt = \frac 1 2(\operatorname{res}_{0}f_\tau(t) + \operatorname{res}_{4\pi i}f_\tau(t)) + \operatorname{res}_{2\pi i}f_\tau(t).$$

Since the integrals over the vertical sides go to zero,

$$I - \int \frac {e^{-4\pi \tau}e^{it\tau}-e^{4\pi\tau}e^{-it\tau}}{e^{t/2}-e^{-t/2}}\,dt=\frac 1 2(\operatorname{res}_{0}f_\tau(t) + \operatorname{res}_{4\pi i}f_\tau(t)) + \operatorname{res}_{2\pi i}f_\tau(t).$$

Moreover,

$$\operatorname{res}_{0}f_\tau(t) = \lim_{t\rightarrow 0}\,(t-0)\frac{\sin t\tau}{e^{t/2}-e^{-t/2}} = 0.$$

If I am on the right path, I'd like to ask for a hint for the calculation of the other two residues and the integral over the top of the rectangle.

• This is an indefinite integral, but the result given in your formula does not depend on $t$. So something is not right. – Hans Engler Sep 9 '16 at 12:13
• Are you considering the definite integral $\int_{- \infty}^{+\infty}$? Othrwise this doesn't make sense. – Crostul Sep 9 '16 at 12:20
• $e^{t/2}-e^{t/2}=0$... ^L^ – tired Sep 9 '16 at 12:41
• @HansEngler, Did I clarify the problem you pointed out? – Rodrigo Sep 10 '16 at 9:48
• @AméricoTavares, yes! – Rodrigo Sep 10 '16 at 12:39

\begin{align} I &= \int_{-\infty}^{+\infty}dt\,\frac{\sin(t\tau)}{e^{t/2}-e^{-t/2}}\\ &= \int_{-\infty}^{+\infty}dt\,\frac{1}{2i}\frac{e^{it\tau}}{\sinh(t/2)} \end{align}

The function $$g_{\tau}(t) = \frac{1}{2i}\frac{e^{it\tau}}{\sinh(t/2)}$$ has poles at $t_n = 2\pi i n$ for all integers $n$. The residue at $t = t_n$ can be calculated as: \begin{align} Res\{2\pi i n\} &=\lim_{t\rightarrow 2\pi i n} \frac{1}{2i} \frac{(t - 2\pi i n)\,e^{i t \tau}}{2 \sinh(t/2)}\\ &= \lim_{t\rightarrow 2\pi i n} \frac{1}{2i}\frac{(t - 2\pi i n)\,e^{-2\pi n \tau}}{\sinh(\pi i n) + \frac{1}{2}\cosh(\pi i n)(t - 2\pi i n)\,+\,...}\\ &= \lim_{t\rightarrow 2\pi i n} \frac{1}{2i}\frac{(t - 2\pi i n)\,e^{-2\pi n \tau}}{0 + \frac{1}{2}{(-1)}^n(t - 2\pi i n)\,+\,...}\\ &=\frac{1}{i} {(-1)}^ne^{-2\pi n \tau} \end{align} In the second line above, I have taken a Taylor series around $t = 2\pi i n$ to the necessary number of terms on the bottom.

For $\tau>0$ take a contour enclosing the upper half complex plane. This contour encloses all the poles with $n>0$, and passes through the $n=0$ pole at $t = 0$. The $t=0$ pole contributes half its residue to the integral. The value of the integral is thus: \begin{align} I &= 2\pi i \left(\sum_{n = 1}^{\infty} Res\{2\pi i n\}\;+\; \frac{1}{2}Res\{0\}\right)\\ &= 2\pi i \left(\sum_{n = 1}^{\infty} \frac{1}{i} {(-1)}^n e^{-2\pi n \tau} + \frac{1}{2}\frac{1}{i}\right)\\ &= \pi + 2\pi\sum_{n = 1}^{\infty} {(-1)}^n e^{-2\pi n \tau}\\ &= \pi - 2\pi \frac{e^{-2\pi n \tau}}{1+e^{-2\pi n \tau}}\\ &= \pi \tanh(\pi \tau) \end{align}

For $\tau<0$ the same procedure - except with a contour enclosing the lower half of the complex plane - yields the same result.

Here's another method. $$\frac{\sin(t\tau)}{e^{t/2}-e^{-t/2}} = \frac{e^{-t/2}\sin(t\tau)}{1-e^{-t}} = e^{-t/2}\sin(t\tau)\sum_{n = 0}^\infty e^{-nt}$$ Thus: \begin{align} I &= 2\int_0^{\infty}dt\, \frac{\sin(t\tau)}{e^{t/2}-e^{-t/2}}\\ &=2\sum_{n=0}^{\infty}\int_0^{\infty}dt\,e^{-(n+\frac{1}{2})t} \sin(t\tau)\\ &=2\sum_{n=0}^{\infty} \frac{\tau}{\tau^2+{(n+\frac{1}{2})}^2}\\ &=\sum_{n=-\infty}^{\infty} \frac{\tau}{\tau^2+{(n+\frac{1}{2})}^2} \end{align}

This final sum can be evaluated in various ways, such as by the Poisson summation formula, to yield $I = \pi\tanh(\pi\tau)$.

• I used $\tanh(\pi \tau) = \frac {1-e^{-2\pi \tau}}{1+e^{-2\pi \tau}} = \frac {e^{2\pi \tau}-1}{e^{2\pi \tau}-1}$ to get that for $\tau>0, \tanh(\pi \tau) =\sum_{n=0}^\infty (-e^{-2\pi\tau})^n + (-e^{-2\pi\tau})^{n+1}$ and for $\tau>0, \tanh \pi \tau = -\sum_{n=0}^\infty(-e^{2\pi\tau})^n+(-e^{2\pi\tau})^{n+1}$. But how do I get that for any $\tau$ $\tanh \pi \tau = \sum_{n=1}^\infty(-e^{2\pi\tau})^n-(-e^{-2\pi\tau})^n$? – Rodrigo Sep 13 '16 at 23:48
• You're right, it's not quite right, is it? I'll fix it later... – John Barber Sep 14 '16 at 0:58
• @Rodrigo Fixed, I think. I had been sloppy about convergence. – John Barber Sep 14 '16 at 2:11

$\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}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\Li}[1]{\,\mathrm{Li}_{#1}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ $$\bbox[#fee,5px,border:2px groove navy]{\quad% \mbox{Hereafter, we evaluate the integral without using the Residue Theorem.}\quad}$$

$\ds{\int_{-\infty}^{\infty}{\sin\pars{\tau t} \over \expo{t/2} - \expo{-t/2}}\,\dd t = \pi\tanh\pars{\pi\tau}:\ ?}$.

\begin{align} \color{#f00}{\int_{-\infty}^{\infty}{\sin\pars{\tau t} \over \expo{t/2} - \expo{-t/2}}\,\dd t} & = 2\int_{0}^{\infty}{\sin\pars{\tau t}\expo{-t/2} \over 1 - \expo{-t}}\,\dd t = 2\sum_{n = 0}^{\infty}\, \Im\int_{0}^{\infty}\expo{-\pars{n + 1/2 - \tau\,\ic}t}\,\,\,\,\dd t \\[5mm] & = -\ic\sum_{n = 0}^{\infty}\, \pars{{1 \over n + 1/2 - \tau\,\ic} - {1 \over n + 1/2 + \tau\,\ic}}\dd t \\[5mm] & = -\ic\bracks{\Psi\pars{\half + \tau\,\ic} - \Psi\pars{\half - \tau\,\ic}}\qquad \pars{~\Psi:\ Digamma\ Function~} \end{align} With Euler Reflection Formula: $$\color{#f00}{\int_{-\infty}^{\infty}{\sin\pars{\tau t} \over \expo{t/2} - \expo{-t/2}}\,\dd t} = -\ic\braces{\pi\cot\pars{\pi\bracks{\half - \tau\,\ic}}} = \color{#f00}{\pi\tanh\pars{\pi\tau}}$$

For a rectangular-like contour, consider

$$\oint_C dz \frac{\sin{\tau z}}{\sinh{(z/2)}}$$

where $C$ is the rectangle with vertices $-R$, $R$, $R+i 2 \pi$, $-R+i 2 \pi$, modified by a semicircular detour around $z=i 2 \pi$ of radius $\epsilon$. The contour integral is therefore

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

In the limit as $R \to \infty$ the second and fifth integrals vanish. The contour integral then becomes in this limit and the limit $\epsilon \to 0$,

$$\left [1+\cosh{(2 \pi \tau)} \right ] \int_{-\infty}^{\infty} dx \frac{\sin{\tau x}}{\sinh{(x/2)}} + i \sinh{(2 \pi \tau)} PV \int_{-\infty}^{\infty} dx \frac{\cos{\tau x}}{\sinh{(x/2)}} - 2 \pi \sinh{2 \pi \tau}$$

The integral over cosine vanishes due to symmetry. Further, by Cauchy's theorem, the contour integral vanishes. Thus,

$$\int_{-\infty}^{\infty} dx \frac{\sin{\tau x}}{\sinh{(x/2)}} = 2 \pi \frac{\sin{2 \pi \tau}}{1+\cos{2 \pi \tau}} = 2 \pi \tanh{\pi \tau}$$

The stated result follows.