Complex Analysis – Integrate: $\int_0^{\infty}\frac{\sinh (ax)}{\sinh x} \cos (bx) dx$

complex-analysis

Q: If $|a|< 1$ and $b>0$, show that
$$\int_0^{\infty}\frac{\sinh (ax)}{\sinh x} \cos (bx) dx = \frac{\pi \sin (\pi a)}{2 (\cos (\pi a)+\cosh (\pi b))}$$

I need to evaluate the above integral by method of contour. I tried to use this contour on this question but at $2\pi i$, $\sinh(ax)$ changes to $\sinh(ax+2a\pi i)$ and I have difficulty taking out $\sinh(ax)$. Please give hints on which contour to use.Thanks in advance!!

ADDED::
Considering $-R \to R \to R + \pi i \to -R + \pi i \to -R$ with a bump on $0$ and $\pi i$ to avoid singularity.

$$(1 + e^{(a+ib)\pi i}) \int_{-\infty}^{\infty}\frac{e^{(a+bi)x}}{\sinh x}dx = -\pi i(1 – e^{(a+ib)\pi i}) \hspace{1 cm}(1)$$
$$(1 + e^{(-a+ib)\pi i}) \int_{-\infty}^{\infty}\frac{e^{(-a+bi)x}}{\sinh x}dx = -\pi i(1 – e^{(-a+ib)\pi i}) \hspace{1 cm}(2)$$
With a bit of algebra, we get
\begin{align*}
\int_{-\infty}^{\infty}\frac{e^{ax}-e^{-ax}}{\sinh x}e^{ibx}dx &= 2\pi i \left( \frac{1}{1 + e^{(a+bi)\pi i}} – \frac{1}{1 + e^{(-a+bi)\pi i}} \right)\\
&= 2 \pi \frac{\sin (a\pi)}{\cosh (b\pi) + \sin(a\pi)}
\end{align*}
From which we get the desired result.

Best Answer

Use parity to extend the domain of integration from $-\infty$ to $\infty$. Shift the contour of integration down by $\frac{i\pi}{2}$ to avoid pole $x=0$. Then compute separately four integrals (actually, it suffices to compute one of them and then to change parameters accordingly) $$\int_{-\infty-\frac{i\pi}{2}}^{\infty-\frac{i\pi}{2}}\frac{e^{(\pm a\pm ib)x}dx}{\sinh x}$$ using the rectangle $$-R-\frac{i\pi}{2}\rightarrow R-\frac{i\pi}{2}\rightarrow R+\frac{i\pi}{2} \rightarrow -R+\frac{i\pi}{2} \rightarrow -R-\frac{i\pi}{2}$$ with $R\rightarrow\infty$.


For example, let us compute \begin{align} \int_{\text{rectangle}}\frac{e^{(a+ib)z}dz}{\sinh z}\substack{R\rightarrow\infty\\=}\int_{-\infty-\frac{i\pi}{2}}^{\infty-\frac{i\pi}{2}}\frac{e^{(a+ib)z}dz}{\sinh z}- \int_{-\infty+\frac{i\pi}{2}}^{\infty+\frac{i\pi}{2}}\frac{e^{(a+ib)z}dz}{\sinh z}=\\ =\left(1+e^{\pi i (a+ib)}\right)\int_{-\infty-\frac{i\pi}{2}}^{\infty-\frac{i\pi}{2}}\frac{e^{(a+ib)z}dz}{\sinh z} \end{align} On the other hand, the integral over rectangle is equal to $2\pi i$ (the only pole inside is $z=0$ and the residue is $1$). Therefore, $$\int_{-\infty-\frac{i\pi}{2}}^{\infty-\frac{i\pi}{2}}\frac{e^{(a+ib)z}dz}{\sinh z}=\frac{2\pi i}{1+e^{\pi i (a+ib)}},$$ and the initial integral evaluates to $$\frac{2\pi i}{8}\left(\frac{1}{1+e^{\pi i (a+ib)}}-\frac{1}{1+e^{\pi i (-a+ib)}}+\frac{1}{1+e^{\pi i (a-ib)}}-\frac{1}{1+e^{\pi i (-a-ib)}}\right)=\frac{\pi\sin\pi a}{2\left(\cos\pi a+\cosh\pi b\right)}.$$