# Evaluate $\int_0^{\infty } \frac{\sinh (a x) \sinh (b x)}{(\cosh (a x)+\cos (t))^2} \, dx$

Gradshteyn&Ryzhik $$3.514.4$$ states that $$\int_0^{\infty } \frac{\sinh (a x) \sinh (b x)}{(\cosh (a x)+\cos (t))^2} \, dx=\frac{\pi b \csc (t) \csc \left(\frac{\pi b}{a}\right) \sin \left(\frac{b t}{a}\right)}{a^2}$$ Whenever $$0<\left| b\right| . My bet is on Feynman's trick or contour integration but haven't figure out the exact way. Any help will be appreciated!

Integration by parts (just to simplify the evaluation) gives $$\int_0^\infty\frac{\sinh ax\sinh bx}{(\cosh ax+\cos t)^2}\,dx=\frac{b}{a}\int_0^\infty\frac{\cosh bx\,dx}{\cosh ax+\cos t}.$$ This can be evaluated using the residue theorem. Consider $$I_R=\displaystyle\int_{C_R}\frac{e^{bz}\,dz}{\cosh az-\cos t}$$ where $$C_R$$ is the rectangular contour with vertices at $$\pm R\pm i\pi/a$$; the integrand has simple poles at $$z=\pm it/a$$, thus $$I_R=2\pi i\left(\operatorname*{Res}_{z=it/a}+\operatorname*{Res}_{z=-it/a}\right)\frac{e^{bz}}{\cosh az-\cos t}=\frac{4\pi i}{a}\frac{\sin(bt/a)}{\sin t},$$ and on the other hand, $$\lim\limits_{R\to\infty}I_R$$ is equal to $$\int_{-\infty}^\infty\frac{e^{b(x-i\pi/a)}\,dx}{-\cosh ax-\cos t}+\int_\infty^{-\infty}\frac{e^{b(x+i\pi/a)}\,dx}{-\cosh ax-\cos t}=4i\sin\frac{b\pi}{a}\int_0^\infty\frac{\cosh bx\,dx}{\cosh ax+\cos t}.$$

$$2 \sum_{n=1}^{\infty} (-1)^{n-1} \sin(bnx) e^{-anx} = \frac{\sin bx}{\cosh ax + \cos bx}$$ and $$2 \sum_{n=1}^{\infty} (-1)^{n-1} \cos (bnx) e^{- anx} = \frac{e^{-ax} + \cos bx}{\cosh ax + \cos bx} .$$

Differentiating the first identity with respect to $$a$$,

$$2 \sum_{n=1}^{\infty} (-1)^{n-1} n \sin (bnx) e^{-anx} = \frac{\sinh (ax) \sin (bx)}{(\cosh ax + \cos bx)^{2}} .$$

Therefore, $$\int_{0}^{\infty} \frac{\sinh (ax) \sin (bx)}{(\cosh ax + \cos bx)^{2}} \ dx = 2 \int_{0}^{\infty} \sum_{n=1}^{\infty} (-1)^{n-1} n \sin (bnx) e^{-anx} \ dx .$$

Changing the order of integration and summation at this point will lead to a nonsensical result, namely that the integral is not finite.

But this is not entirely unexpected since Fubini's theorem is not satisfied.

That is $$2 \int_{0}^{\infty} \sum_{n=1}^{\infty} \Big| (-1)^{n-1} n \sin (bnx) e^{-anx} \Big| \ dx \not < \infty .$$

So that the theorem is satisfied, write the right hand side as

\begin{align} 2 \lim_{\epsilon \to 0} \int_{\epsilon}^{\infty} \sum_{n=1}^{\infty} (-1)^{n-1} n \sin (bnx) e^{-anx} &= 2 \lim_{\epsilon \to 0} \sum_{n=1}^{\infty}(-1)^{n-1} n \int_{\epsilon}^{\infty} \sin (bnx) e^{-anx} \ dx \\ &= \frac{2}{a^{2}+b^{2}} \lim_{\epsilon \to 0} \sum_{n=1}^{\infty}(-1)^{n-1} \Big( a \sin (bn \epsilon) e^{-an \epsilon} + b \cos (bn \epsilon) e^{-an \epsilon}\Big) \\ &= \frac{2}{a^{2}+b^{2}}\lim _{\epsilon \to 0} \Big( \frac{a}{2} \frac{\sin b \epsilon}{\cosh a \epsilon + \cos b \epsilon} + \frac{b}{2} \frac{e^{-a \epsilon} + \cos b \epsilon}{\cosh a \epsilon + \cos b \epsilon} \Big) \\ &= \frac{b}{a^{2}+b^{2}} . \end {align}