# Definite Integral to Infinity of Cosine of a x over Hyperbolic Cosine of b x

## Theorem

$\displaystyle \int_0^\infty \frac {\cos a x} {\cosh b x} \rd x = \frac \pi {2 b} \sech \frac {a \pi} {2 b}$

where:

$a$ and $b$ are positive real numbers
$\sech$ denotes the hyperbolic secant function.

## Proof

 $\displaystyle \int_0^\infty \frac {\cos a x} {\cosh b x} \rd x$ $=$ $\displaystyle \int_0^\infty \frac {e^{-b x} \paren {e^{i a x} + e^{-i a x} } } {1 - \paren {-e^{-2 b x} } } \rd x$ Cosine Exponential Formulation, Definition of Hyperbolic Cosine $\displaystyle$ $=$ $\displaystyle \int_0^\infty \paren {e^{\paren {i a - b} x} + e^{-\paren {i a + b} x} } \paren {\sum_{n \mathop = 0}^\infty \paren {-1}^n e^{-2 n b x} } \rd x$ Sum of Infinite Geometric Sequence $\displaystyle$ $=$ $\displaystyle \sum_{n \mathop = 0}^\infty \int_0^\infty \paren {-1}^n \paren {e^{\paren {i a - \paren {2 n + 1} b} x} + e^{-\paren {i a + \paren {2 n + 1} b} x} } \rd x$ Fubini's Theorem $\displaystyle$ $=$ $\displaystyle \sum_{n \mathop = 0}^\infty \paren {-1}^n \paren {\intlimits {-\frac {e^{\paren {i a - \paren {2 n + 1} b} x} } {\paren {2 n + 1} b - i a} } 0 \infty + \intlimits {-\frac {e^{-\paren {i a + \paren {2 n + 1} b} x} } {\paren {2 n + 1} + i a} } 0 \infty}$ Primitive of $e^{a x}$

We have, as $b, n > 0$:

 $\displaystyle \size {\lim_{x \mathop \to \infty} e^{\paren {i a - \paren {2 n + 1} b} x} }$ $=$ $\displaystyle \lim_{x \mathop \to \infty} \size {e^{\paren {i a - \paren {2 n + 1} b} x} }$ Modulus of Limit $\displaystyle$ $=$ $\displaystyle \lim_{x \mathop \to \infty} \size {e^{i a x} } \size {e^{-\paren {2 n + 1} b x} }$ Exponential of Sum $\displaystyle$ $=$ $\displaystyle \lim_{x \mathop \to \infty} e^{-\paren {2 n + 1} b x}$ $\displaystyle$ $=$ $\displaystyle 0$ Exponential Tends to Zero and Infinity

We similarly have:

 $\displaystyle \size {\lim_{x \mathop \to \infty} e^{-\paren {i a + \paren {2 n + 1} b} x} }$ $=$ $\displaystyle \lim_{x \mathop \to \infty} \size {e^{-\paren {i a + \paren {2 n + 1} b} x} }$ Modulus of Limit $\displaystyle$ $=$ $\displaystyle \lim_{x \mathop \to \infty} \size {e^{-i a x} } \size {e^{-\paren {2 n + 1} b x} }$ Exponential of Sum $\displaystyle$ $=$ $\displaystyle \lim_{x \mathop \to \infty} e^{-\paren {2 n + 1} b x}$ $\displaystyle$ $=$ $\displaystyle 0$ Exponential Tends to Zero and Infinity

So:

 $\displaystyle \sum_{n \mathop = 0}^\infty \paren {-1}^n \paren {\intlimits {-\frac {e^{\paren {i a - \paren {2 n + 1} b} x} } {\paren {2 n + 1} b - i a} } 0 \infty + \intlimits {-\frac {e^{-\paren {i a + \paren {2 n + 1} b} x} } {\paren {2 n + 1} + i a} } 0 \infty}$ $=$ $\displaystyle \sum_{n \mathop = 0}^\infty \paren {-1}^n \paren {\frac 1 {\paren {2 n + 1} b - i a} + \frac 1 {\paren {2 n + 1} b + i a} }$ Exponential of Zero $\displaystyle$ $=$ $\displaystyle \sum_{n \mathop = 0}^\infty \paren {-1}^n \paren {\frac {2 \paren {2 n + 1} b} {\paren {2 n + 1}^2 b^2 + a^2} }$ Difference of Two Squares $\displaystyle$ $=$ $\displaystyle \frac 2 b \sum_{n \mathop = 0}^\infty \paren {-1}^n \frac {2 n + 1} {\paren {2 n + 1} + 4 \paren {\frac a {2 b} }^2}$
$\displaystyle \pi \map \sech {\pi z} = 4 \sum_{n \mathop = 0}^\infty \paren {-1}^n \frac {2 n + 1} {\paren {2 n + 1} + 4 z^2}$

Setting $z = \dfrac a {2 b}$ gives:

$\displaystyle \pi \map \sech {\frac {a \pi} {2 b} } = 4 \sum_{n \mathop = 0}^\infty \paren {-1}^n \frac {2 n + 1} {\paren {2 n + 1} + 4 \paren {\frac a {2 b} }^2}$

We therefore have:

 $\displaystyle \int_0^\infty \frac {\cos a x} {\cosh b x} \rd x$ $=$ $\displaystyle \frac 2 b \sum_{n \mathop = 0}^\infty \paren {-1}^n \frac {2 n + 1} {\paren {2 n + 1} + 4 \paren {\frac a {2 b} }^2}$ $\displaystyle$ $=$ $\displaystyle \frac {\pi} {2 b} \sech \frac {a \pi} {2 b}$

$\blacksquare$