# integral with hyperbolic cosines

I want to show that $\displaystyle \int_{0}^{\infty} \frac{\cosh (ax) \cosh (bx)}{\cosh (\pi x)} \ dx = \frac{\cos \left( \frac{a}{2} \right) \cos \left( \frac{b}{2} \right)} {\cos (a) + \cos (b)} \ |a|+|b| < \pi$

I was certain I could evaluate the integral by integrating in the complex plane around the rectangle with vertices at $N+0i, N+i, -N+i, \text{and} -N+0i$.

I tried $\displaystyle f(z) = \frac{e^{(a+b)z}}{\cosh \pi z}, f(z) = \frac{e^{az} \cosh bz}{\cosh (\pi z)}$, and $\displaystyle f(z) = \frac{\cosh az \cosh bz}{\cosh \pi z}$. I was unable to extract the above integral using any of these three choices for $f(z)$.

-
@Thomas: take the derivative with respect to what? –  Ron Gordon Jan 30 '13 at 10:42
Note that the addition formula $$\cosh(A+B)=\cosh A\cdot\cosh B + \sinh A\cdot \sinh B$$ together with $\sinh(-x)=-\sinh x$ leads to $$\cosh(A+B) +\cosh(A-B) =2\cosh A\cdot\cosh B.$$ That is $$\cosh(ax)\cosh(bx)=\frac12\cosh((a+b)x)+\frac12\cosh((a-b)x)$$ converting to $\exp$ this leads to four integrals of the form $$\int_0^\infty \frac{\exp Ax}{1+\exp{Bx}}dx$$ which all scream for a geometric series expansion $$\int_0^\infty \frac{\exp Ax}{1+\exp{Bx}}dx=\sum_0^\infty\int_0^\infty(-1)^n\exp((A+nB)x)dx=\sum_0^\infty \frac{(-1)^n}{(A+nB)}$$ –  AD. Jan 30 '13 at 12:57
@rlgordonma: I should have read the question more carefully. –  Thomas Jan 30 '13 at 13:38

I have a way of showing this without contour integration in the complex plane. There is a bit of a trick involved and, frankly, Mathematica misleads. It should be noted that the condition $|a|+|b| < \pi$ is needed for the integral to converge. Basically, rewrite the $\cosh$'s as exponentials:

\begin{align} \int_{0}^{\infty} dx \: \frac{\cosh (ax) \cosh (bx)}{\cosh (\pi x)} &= 2 \int_{0}^{\infty} dx \: \frac{\cosh (ax) \cosh (bx)}{1+e^{-2 \pi x}} e^{-\pi x} \\ &= \frac{1}{2} \sum_{k=0}^{\infty} (-1)^k \int_{0}^{\infty} dx \: (e^{a x}+e^{-a x}) (e^{b x}+e^{-b x}) e^{-(2 k+1) \pi x} \\ \end{align}

Evaluating the integrals, we get

$$= \frac{1}{2} \sum_{k=0}^{\infty} (-1)^k \left [ \frac{1}{(2 k+1)\pi -(a+b)} + \frac{1}{(2 k+1)\pi +(a+b)}\right ]$$ $$+ \frac{1}{2} \sum_{k=0}^{\infty} (-1)^k \left [ \frac{1}{(2 k+1)\pi -(a-b)} + \frac{1}{(2 k+1)\pi +(a-b)} \right ]$$

Here I note that $a+b$ and $a-b$ should not be some multiple of $\pi$, so that the above sums behave properly.

To get the sums into a somewhat familiar form, I rearrange them a bit to get

$$= \frac{1}{4 \pi} \sum_{k=0}^{\infty} (-1)^k \left [ \frac{1}{k +\left (\frac{1}{2} - \frac{a+b}{2 \pi} \right )} + \frac{1}{k +\left (\frac{1}{2} + \frac{a+b}{2 \pi}\right )}\right ]$$ $$+ \frac{1}{4 \pi} \sum_{k=0}^{\infty} (-1)^k \left [ \frac{1}{k +\left (\frac{1}{2} - \frac{a-b}{2 \pi} \right )} + \frac{1}{k +\left (\frac{1}{2} + \frac{a-b}{2 \pi}\right )}\right ]$$

Now, here is the interesting part (at least to me). Let

$$f(z) = \sum_{k=0}^{\infty} \frac{(-1)^k}{k+z}$$

This looks like it should be a trig function of some sort. It is not; rather, it is something called a Hurwitz-Lerch transcendent, which does not look like it will be much help. That said, it almost looks like a trig function, so I instead considered the following:

\begin{align} f(z) + f(1-z) &= \sum_{k=0}^{\infty} \frac{(-1)^k}{k+z} + \sum_{k=0}^{\infty} \frac{(-1)^k}{k+1-z}\\ &= \sum_{k=0}^{\infty} \frac{(-1)^k}{z+k} + \sum_{k=0}^{\infty} \frac{(-1)^{k+1}}{z-(k+1)}\\ &= \sum_{k=-\infty}^{\infty} \frac{(-1)^k}{z+k} \\ &= \frac{\pi}{\sin{\pi z}}\\ \end{align}

This is very helpful, because we have precisely this functional form above, e.g.,

$$\frac{1}{2} - \frac{a+b}{2 \pi} = 1 - \left ( \frac{1}{2} + \frac{a+b}{2 \pi} \right )$$ $$\frac{1}{2} - \frac{a-b}{2 \pi} = 1 - \left ( \frac{1}{2} + \frac{a-b}{2 \pi} \right )$$

So we get for the integral:

\begin{align} \int_{0}^{\infty} dx \: \frac{\cosh (ax) \cosh (bx)}{\cosh (\pi x)} &= \frac{1}{4} \left [ \frac{1}{\sin{\left ( \frac{\pi}{2} - \frac{a+b}{2} \right )}} + \frac{1}{\sin{\left ( \frac{\pi}{2} - \frac{a-b}{2} \right )}} \right ] \\ &= \frac{1}{4} \left [ \frac{1}{\cos{\left ( \frac{a+b}{2} \right )}} + \frac{1}{\cos{\left ( \frac{a-b}{2} \right )}} \right ] \\ &= \frac{\cos{\frac{a}{2}} \cos{\frac{b}{2}}}{\cos{a} + \cos{b}} \end{align}

QED

-
+1) It is hard to get around the $1/\sin$-expansion. –  AD. Jan 30 '13 at 13:00
Actually, I think this integral would work with contour integration. I just think that the OP made it a lot more difficult than it needed to be. My guess is, though, that you are going to have to sum over residues along the imaginary axis, and that will give you a series not unlike what I derived here. In that case, I like what I did because the explanation is accessible to more people. –  Ron Gordon Jan 30 '13 at 15:50