How to evaluate the following integral involving hyperbolic functions? I've been thinking about using contour integration, but I can't seem to find the right combination of function and contour. Thanks for your attention. :)
$$
 \int_{0}^{\infty} \frac {\sinh ax \sinh bx}{\cosh cx} \ dx
$$
 A: Consider the contour integral
$$\oint_C dz \frac{\sinh{a z} \sinh{b z}}{\sinh{c z}} $$
where $C$ is the rectangle $-R-i \pi/(2 c), R-i \pi/(2 c), R+i \pi/(2 c), -R+i \pi/(2 c)$.  Note that
$$\sinh{c (x \pm i \pi/2 c)} = \pm i \cosh{c x} $$
Therefore the contour integral is
$$\int_{-R}^R dx \, \frac{\sinh{a(x-i \pi/(2 c))} \sinh{b(x-i \pi/(2 c))}}{-i \cosh{c x}}\\ +i \int_{-\pi/(2 c)}^{\pi/(2 c)} dy \, \frac{\sinh{a (R+i y)} \sinh{b (R+i y)}}{\sinh{c (R+i y)}}\\ + \int_{R}^{-R} dx \, \frac{\sinh{a(x+i \pi/(2 c))} \sinh{b(x+i \pi/(2 c))}}{i \cosh{c x}} \\-i \int_{\pi/(2 c)}^{-\pi/(2 c)} dy \, \frac{\sinh{a (R-i y)} \sinh{b (R-i y)}}{\sinh{c (R-i y)}}$$
Note that, for the second and fourth integrals to vanish as $R \to \infty$, we must have $|a|+|b| \lt |c|$; assume this is the case.  The contour integral then becomes, after simplification (the algebra of which I will spare the reader) (*):
$$i 2 \cos \left(\frac{\pi  a}{2 c}\right) \cos \left(\frac{\pi  b}{2
   c}\right) \int_{-\infty}^{\infty} dx \frac{ \sinh (a x)  \sinh (b x)}{\cosh{c x}}\\-i 2 \sin \left(\frac{\pi  a}{2 c}\right) \sin
   \left(\frac{\pi  b}{2 c}\right) \int_{-\infty}^{\infty} dx \frac{\cosh (a x)  \cosh (b x)}{\cosh{c x}}$$
Note that we don't quite have the integral we want.  So now consider
$$\oint_C dz \frac{\cosh{a z} \cosh{b z}}{\sinh{c z}} $$
and as a result of similar steps as above, the contour integral becomes (**)
$$i 2 \cos \left(\frac{\pi  a}{2 c}\right) \cos \left(\frac{\pi  b}{2
   c}\right) \int_{-\infty}^{\infty} dx \frac{ \cosh (a x)  \cosh (b x)}{\cosh{c x}}\\-i 2 \sin \left(\frac{\pi  a}{2 c}\right) \sin
   \left(\frac{\pi  b}{2 c}\right) \int_{-\infty}^{\infty} dx \frac{\sinh (a x)  \sinh (b x)}{\cosh{c x}}$$
We can eliminate the integral we are not seeking by multiplying $\text{(*)}$ by $\cos \left(\frac{\pi  a}{2 c}\right) \cos \left(\frac{\pi  b}{2
   c}\right)$ and $\text{(**)}$ by $\sin \left(\frac{\pi  a}{2 c}\right) \sin \left(\frac{\pi  b}{2
   c}\right)$.  Thus, really, we are then seeking
$$\oint_C dz \, \frac{f(z)}{\sinh{c z}}$$
where
$$f(z) = \cos \left(\frac{\pi  a}{2 c}\right) \cos \left(\frac{\pi  b}{2 c}\right) \sinh{a z} \sinh{b z} + \sin \left(\frac{\pi  a}{2 c}\right) \sin \left(\frac{\pi  b}{2 c}\right) \cosh{a z} \cosh{b z} $$
The contour integral now takes the form
$$i 2 \left [\cos^2 \left(\frac{\pi  a}{2 c}\right) \cos^2 \left(\frac{\pi  b}{2 c}\right) - \sin^2 \left(\frac{\pi  a}{2 c}\right) \sin^2 \left(\frac{\pi  b}{2 c}\right) \right ] \int_{-\infty}^{\infty} dx \frac{\sinh (a x)  \sinh (b x)}{\cosh{c x}}$$
This is equal to $i 2 \pi$ times the residue of $f(z) \operatorname{csch}{c z}$ at the pole $z=0$, which is simply $f(0)/c$.  Using the symmetry of the integral, we finally have
$$\begin{align}\int_{0}^{\infty} dx \frac{\sinh (a x)  \sinh (b x)}{\cosh{c x}} &= \frac{\pi}{2 c} \frac{\sin \left(\frac{\pi  a}{2 c}\right) \sin \left(\frac{\pi  b}{2 c}\right )}{\cos^2 \left(\frac{\pi  a}{2 c}\right) \cos^2 \left(\frac{\pi  b}{2 c}\right) - \sin^2 \left(\frac{\pi  a}{2 c}\right) \sin^2 \left(\frac{\pi  b}{2 c}\right) } \\ &= \frac{\pi}{4 c}  \frac{\cos{\left(\frac{\pi  (a-b)}{2 c}\right)}-\cos{\left(\frac{\pi  (a+b)}{2 c}\right)}}{\cos{\left(\frac{\pi  (a-b)}{2 c}\right)} \cos{\left(\frac{\pi  (a+b)}{2 c}\right)}}\\ &= \frac{\pi}{4 c}  \left [\sec{\left(\frac{\pi  (a+b)}{2 c}\right)}-\sec{\left(\frac{\pi  (a-b)}{2 c}\right)} \right ] \end{align}$$
where, again, $|a|+|b|\lt|c|$.
A: Assuming that all the parameters are positive, you could first show that for $a<b$,   $$ \int_{0}^{\infty} \frac{\cosh (ax)}{\cosh (bx)} \ dx = \frac{1}{2b}\int_{-\infty}^{\infty} \frac{\cosh (\frac{a}{b}u)}{\cosh (u)} \ du = \frac{\pi}{2b} \sec \left( \frac{\pi a}{2b} \right)$$ by considering the function $ \displaystyle f(z) = \frac{\cosh (\frac{a}{b}z)}{\cosh (z)}$ and a rectangle in the upper half-plane of height $i \pi$.
Then using the identity
$$\cosh \Big((a+b)x \Big) = \cosh(ax) \cosh(bx) + \sinh(ax) \sinh(bx), $$
and assuming  $a + b < c$,
$$ \begin{align} \int_{0}^{\infty} \frac{\sinh(ax) \sinh(bx)}{\cosh(cx)} \ dx &= \frac{1}{2} \int_{0}^{\infty} \frac{\cosh \big[(a+b)x] - \cosh[\big(b-a \big) x]}{\cosh (cx)} \ dx \\ &= \frac{\pi}{4c} \left[\sec \left(\frac{\pi(a+b)}{2c} \right) - \sec \left(\frac{\pi(b-a)}{2c} \right) \right]. \end{align}$$
A: $$I=\frac\pi{8c}\bigg[\cot\bigg(\bigg\{\frac{a+b}c-3\bigg\}\frac\pi4\bigg)-\cot\bigg(\bigg\{\frac{a+b}c-1\bigg\}\frac\pi4\bigg)-2\sec\bigg(\frac{a-b}c\cdot\frac\pi2\bigg)\bigg]$$
