Complex Analysis – Finding Asymptotics to Evaluate a Contour Integral

asymptoticscomplex-analysiscontour-integration

$\newcommand{\d}{\,\mathrm{d}}\newcommand{\sech}{\operatorname{sech}}\newcommand{\csch}{\operatorname{csch}}$It was recently asked, and then deleted, how to evaluate the following using contour integration: $$I=\int_0^\infty\frac{\sin^2(x)}{\sinh^2(x)}\d x\overset{?}{=}\frac{\pi\coth\pi-1}{2}$$

There is a simple real method, and I credit @KStar for finding the series expansions:

If $f(x)=-\frac{2}{1+e^{2x}}$, then $f'(x)=\sech^2(x)$ and by expanding $f$ as a geometric series we find, for $x\gt0$: $$\sech^2(x)=4\sum_{n=1}^\infty(-1)^{n-1}n\cdot e^{-2nx}$$And letting $x\mapsto x+i\pi/2$ yields: $$\csch^2(x)=4\sum_{n=1}^\infty n\cdot e^{-2nx}$$For $x\gt0$. Then: $$\begin{align}\int_0^\infty\frac{\sin^2(x)}{\sinh^2(x)}\d x&=2\sum_{n=1}^\infty n\cdot\int_0^\infty(1-\cos(2x))e^{-2nx}\d x\\&=2\sum_{n=1}^\infty n\cdot\left(\frac{1}{2n}-\frac{2n}{4n^2+4}\right)\\&=\sum_{n=1}^\infty\frac{1}{n^2+1}\\&=\frac{\pi\coth\pi-1}{2}\end{align}$$By the Mittag-Leffler expansion of $\coth$, or equivalently via an argument using the digamma function.

The new user who posted and subsequently deleted their question suggested taking a rectangular contour, limiting in $R\to\infty$ on the rectangle with base $-R\to R$, of height $i\pi$, and with a semicircular inward indent around the point $i\pi$, say of radius $\varepsilon$. The integrand $f(z)=\frac{\sin^2z}{\sinh^2z}$ is holomorphic on the boundary and interior of this contour, so the integrals over all paths sum to zero. Moreover the small strips $R\to R+i\pi,-R\to-R+i\pi$ obviously vanish.

We have: $$\begin{align}\sin(x+i\pi)&=\sin(x)\cosh(\pi)+i\sinh(\pi)\cos(x)\\\sin^2(x+i\pi)&=\sin^2(x)\cosh^2(\pi)-\cos^2(x)\sinh^2(\pi)+2i\sin(x)\cos(x)\sinh(\pi)\cosh(\pi)\\&=\sin^2(x)(1+2\sinh^2(\pi))-\sinh^2(\pi)+2i\sin(x)\cos(x)\sinh(\pi)\cosh(\pi)\end{align}$$

For asymptotically large $R$, asymptotically small $\varepsilon\gt0$ we then need to use: $$0=o(1)+I-\int_{[-R,-\varepsilon]\cup[\varepsilon,R]}\frac{\sin^2(x)(1+2\sinh^2(\pi))-\sinh^2(\pi)}{\sinh^2(x)}\d x+i\varepsilon\int_{-\pi}^0\frac{\sin^2(i\pi+\varepsilon e^{it})}{\sinh^2(\varepsilon e^{it})}e^{it}\d t\\\overset{R\to\infty}{\longrightarrow}-2\sinh^2(\pi)\cdot I+\\\lim_{\varepsilon\to0^+}\left[2\sinh^2(\pi)(1-\coth(\varepsilon))+i\varepsilon\int_{0}^\pi\frac{\sin^2(i\pi-\varepsilon e^{it})}{\sinh^2(\varepsilon e^{it})}e^{it}\d t\right]$$

The original asker claimed that it is possible to use this method to calculate the final answer (they didn't go as far, but it was implied). Taking this on good faith, I will assume this works – but I am very uncertain how to do this. The limit of the semicircular integral is, well, nasty – I'd appreciate help with the asymptotics here. I am fairly certain my calculations thus far are correct, but I unfortunately do not own a copy of Mathematica or equivalent to help me here.

It is my (purely intuitive) suspicion that the limit does not exist, but this is weird since the limit must exist, as all the other limits do and the total limit of zero obviously exists.

To present a concrete target – to get the correct evaluation, we need to show that: $$\begin{align}2\sinh^2(\pi)(I-1)&=\pi\sinh(\pi)\cosh(\pi)-3\sinh^2(\pi)\\&\overset{?}{=}\lim_{\varepsilon\to0^+}\left[i\varepsilon\int_0^\pi\frac{\sin^2(i\pi-\varepsilon e^{it})}{\sinh^2(\varepsilon e^{it})}\d t-2\sinh^2(\pi)\coth(\varepsilon)\right]\end{align}$$

Best Answer

Indeed, the method can be salvaged by taking the limits sufficiently carefully. Note that the contour proposed yields the equation

$$-2\sinh^2\pi\int_{-\infty}^\infty\frac{\sin^2x}{\sinh^2 x}dx+\lim_{\epsilon\to 0}\left[\left(\int_{-\infty}^{-\epsilon}+\int^{\infty}_{\epsilon}\right)\frac{\sinh^2\pi}{\sinh^2 x}-\\\int_0^\pi\frac{(\cosh^2\pi+\sinh^2\pi)\sin^2(\epsilon e^{-it})-\sinh^2\pi+i\sinh\pi\cosh\pi\sin (2\epsilon e^{-it})}{\sinh^2 (\epsilon e^{-it})}i\epsilon e^{-it}dt\right]=0$$

Now, we need to understand the leading behavior of the expression in brackets for $\epsilon\to 0$. The first integral is basically a principal value prescription with a double pole at $x=0$ and as such, is of order $\mathcal{O}(1/\epsilon).$ We expect this one to be canceled exactly. To this end we note that by expanding the denominator to leading order for the second term of the indent:

$$\int_0^\pi\frac{\sinh^2\pi}{\sinh^2 \epsilon e^{-it}}i\epsilon e^{-it}dt=-\frac{2\sinh^2\pi}{\epsilon}+o(\epsilon)=\sinh^2\pi\left(\int_{-\infty}^{-\epsilon}+\int^{\infty}_{\epsilon}\right)\frac{dx}{x^2}+o(\epsilon)$$

and we note that it exactly cancels out the divergent part of the PV integral. The first term of the indent vanishes as $\epsilon$ becomes small:

$$\int_0^\pi\frac{(\cosh^2\pi+\sinh^2\pi)\sin^2(\epsilon e^{-it})}{\sinh^2 \epsilon e^{-it}}i\epsilon e^{-it}dt=2(\cosh^2\pi+\sinh^2\pi)\epsilon+o(\epsilon ^3)$$

Finally, the third term tends to a constant:

$$\int_0^\pi\frac{i\cosh\pi\sinh\pi\sin(2\epsilon e^{-it})}{\sinh^2 \epsilon e^{-it}}i\epsilon e^{-it}dt=-2\pi\cosh\pi\sinh\pi+o(\epsilon^2)$$

Collecting everything we can finally evaluate the limit and rewrite the equation as

$$-2\sinh^2\pi \int_{-\infty}^\infty\frac{\sin^2x}{\sinh^2 x}dx+\sinh^2\pi\int_{-\infty}^\infty dx\left(\frac{1}{\sinh^2 x}-\frac{1}{x^2}\right)+2\pi \cosh\pi\sinh\pi=0$$

Evaluating the integral by using the antiderivative $(\coth x-1/x)'=1/x^2-1/\sinh^2 x$ we have that

$$\int_{-\infty}^\infty dx\left(\frac{1}{\sinh^2 x}-\frac{1}{x^2}\right)=-2$$ and with this we finally recover the result stated above.