Evaluate the integral $\int_{0}^{\infty} \frac{1}{(1+x^2)\cosh{(ax)}}dx$
Solution 1:
Here is another solution: Let
$$\hat{f}(\xi) = \int_{\Bbb{R}} f(x)e^{-2\pi i \xi x} \, dx$$
denote the Fourier transform of $f$. Then it is well-known that
$$ (\mathrm{sech} \, \pi x)^{\wedge} = \mathrm{sech} \, \pi \xi \quad \text{and} \quad \left( \frac{1}{a^2 + \pi^2 x^2} \right)^{\wedge} = \frac{1}{a} e^{-2a |\xi|}. $$
Also, if both $f$ and $g$ are in $L^2$, then
$$ \int_{\Bbb{R}} \hat{f} g = \int_{\Bbb{R}} f \hat{g}. $$
In particular, plugging $f(x) = \mathrm{sech} \, \pi x$ we have
$$ \int_{\Bbb{R}} \frac{g(x)}{\cosh \pi x} \, dx = \int_{\Bbb{R}} \frac{\hat{g}(x)}{\cosh \pi x} \, dx. $$
This shows that
\begin{align*} \int_{0}^{\infty} \frac{dx}{(x^2 + 1) \cosh a x} &= \frac{\pi a}{2} \int_{-\infty}^{\infty} \frac{dx}{(a^2 + \pi^2 x^2) \cosh \pi x} \\ &= \frac{\pi}{2} \int_{-\infty}^{\infty} \frac{e^{-2a|x|}}{\cosh \pi x} \, dx = \pi \int_{0}^{\infty} \frac{e^{-2a x}}{\cosh \pi x} \, dx \\ &= 2\pi \int_{0}^{\infty} \frac{e^{-(2a+\pi) x} (1 - e^{-2\pi x})}{1 - e^{-4\pi x}} \, dx \\ &= \frac{1}{2} \int_{0}^{1} \frac{t^{\frac{a}{2\pi}+\frac{1}{4}} (1 - t^{\frac{1}{2}})}{1 - t} \, \frac{dt}{t} \qquad (t = e^{-4\pi x}) \\ &= \frac{1}{2} \left[ \psi_{0}\left( \frac{a}{2\pi}+\frac{3}{4} \right) - \psi_{0}\left( \frac{a}{2\pi}+\frac{1}{4} \right) \right], \end{align*}
where we exploited the identity
$$ \psi_{0}(s) = -\gamma + \int_{0}^{1}\frac{t - t^{s}}{1 - t} \, \frac{dt}{t}. $$
Solution 2:
This integral may be evaluated using residue theory. Consider the integral
$$\oint_C \frac{dz}{(1+z^2) \cosh{a z}}$$
where $C$ is a semicircle of radius $R$ in the upper half plane. As $R \to \infty$, the integral about the semicircle vanishes, and we are left with the original integral equaling $i 2 \pi$ time the sum of the residues of the poles of the integrand within $C$. In this case, the poles within $C$ lie at $z_n = i (n+1/2) \pi/a$ for all $n \in \mathbb{N} \cup \{0\}$, and at $z_+ = i$. Evaluating the residues at these poles (which may be accomplished when the integrand is of the form $p(z)/q(z)$ using the formula $p(z_0)/q'(z_0)$ for a pole at $z=z_0$), we find that
$$\int_{-\infty}^{\infty} \frac{dx}{(1+x^2) \cosh{a x}} = \frac{\pi}{\cos{a}} - \frac{2 \pi}{a} \sum_{n=0}^{\infty} \frac{(-1)^n}{(n+1/2)^2 \pi^2/a^2 - 1}$$
The sum unfortunately takes the form of a pair of Lerch transcendents
$$\begin{align}\frac{2 \pi}{a} \sum_{n=0}^{\infty} \frac{(-1)^n}{(n+1/2)^2 \pi^2/a^2 - 1} &= \frac{\pi}{a} \sum_{n=0}^{\infty} (-1)^n \left (\frac{1}{(n+1/2)\pi/a-1}-\frac{1}{(n+1/2)\pi/a+1} \right)\\&= \sum_{n=0}^{\infty} (-1)^n \left (\frac{1}{n+\frac12-\frac{a}{\pi}}-\frac{1}{n+\frac12+\frac{a}{\pi}} \right) \\ &= \Phi\left(-1,1,\frac12-\frac{a}{\pi}\right)-\Phi\left(-1,1,\frac12+\frac{a}{\pi}\right)\end{align}$$
Therefore
$$\int_0^{\infty} \frac{dx}{(1+x^2) \cosh{a x}} = \frac{\pi}{2\cos{a}} - \frac12 \left[\Phi\left(-1,1,\frac12-\frac{a}{\pi}\right)-\Phi\left(-1,1,\frac12+\frac{a}{\pi}\right) \right ]$$
It should be noted that $a \ne (k+1/2) \pi$ for some $k \in \mathbb{Z}$.
ADDENDUM
I should note that, in response to @GrahamHesketh's query, the result above may be shown to be equal to a difference between two digamma functions as follows:
$$\int_0^{\infty} \frac{dx}{(1+x^2) \cosh{a x}} = \frac12 \left [ \psi\left(\frac{3}{4}+\frac{a}{2 \pi} \right)-\psi\left(\frac{1}{4}+\frac{a}{2 \pi} \right) \right ]$$
This may be accomplished by noting that
$$\frac{\pi}{\cos{a}} = \sum_{n=-\infty}^{\infty} (-1)^n \frac{1}{n+\frac12-\frac{a}{\pi}} = \sum_{n=0}^{\infty} (-1)^n \left (\frac{1}{n+\frac12-\frac{a}{\pi}}+\frac{1}{n+\frac12+\frac{a}{\pi}} \right) $$
$$\psi\left(\frac{1}{4}+\frac{a}{2 \pi} \right) = \sum_{n=0}^{\infty}\left (\frac{1}{n+1}- \frac{1}{n+\frac12 \left (\frac12+\frac{a}{\pi}\right)}\right )$$
$$\psi\left(\frac{3}{4}+\frac{a}{2 \pi} \right) = \sum_{n=0}^{\infty} \left ( \frac{1}{n+1}-\frac{1}{n+1-\frac12 \left (\frac12-\frac{a}{\pi}\right)}\right )$$
To establish equality, note that the result I posted above boils down to
$$\frac{\pi}{\cos{a}} - \sum_{n=0}^{\infty} (-1)^n \left (\frac{1}{n+\frac12-\frac{a}{\pi}}-\frac{1}{n+\frac12+\frac{a}{\pi}} \right) = 2 \sum_{n=0}^{\infty} \frac{(-1)^n}{n+\frac12+\frac{a}{\pi}}$$
Equality between the above sum and the difference between the two $\psi$ terms is established by comparing the summands term by term.
Solution 3:
$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}[1]{\left\vert #1\right\rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert} \newcommand{\wt}[1]{\widetilde{#1}}$ $\ds{\int_{0}^{\infty}{1 \over \pars{1 + x^{2}}\cosh\pars{ax}}\,\dd x:\ {\large ?}}$
Zeros of $\ds{\cosh\pars{ax}}$ are given by $\ds{\pars{\! n + \half\!}\,{\pi \over a}\,\ic.\ n \in {\mathbb Z}.\ \mbox{Similarly,}\ \pm\ic\ \mbox{are zeros of}\ \pars{x^{2} + 1}}$.
\begin{align}&\left.\color{#c00000}{% \int_{0}^{\infty}{\dd x \over \pars{1 + x^{2}}\cosh\pars{ax}}} \right\vert_{\,a\ >\ 0} =-\,\half\,\Im\int_{-\infty}^{\infty}{\dd x \over \pars{x + \ic}\cosh\pars{ax}} \\[3mm]&=-\,\half\,\Im\pars{% 2\pi\ic\sum_{n = 0}^{\infty}{1 \over \bracks{\pars{n + 1/2}\pi\ic/a + \ic} \braces{a\sinh\pars{\bracks{n + 1/2}\pi\ic}}}} \\[3mm]&=-\,\half\,\Im\braces{% 2\pi\ic\sum_{n = 0}^{\infty}{1 \over \bracks{\pars{n + 1/2}\pi/a + 1}\ic \bracks{a\,\ic\pars{-1}^{n}}}} =\left.\color{#00f}{\sum_{n = 0}^{\infty}{\pars{-1}^{n} \over n + 1/2 + a/\pi}} \right\vert_{\,a\ >\ 0}\quad\pars{1} \end{align}
\begin{align}\left.\color{#00f}{\sum_{n = 0}^{\infty}% {\pars{-1}^{n} \over n + 1/2 + a/\pi}}\right\vert_{\,a\ >\ 0} &=\sum_{n = 0}^{\infty} \pars{{1 \over 2n + 1/2 + a/\pi} - {1 \over 2n + 3/2 + a/\pi}} \\[3mm]&=\sum_{n = 0}^{\infty} {1 \over \pars{2n + 3/2 + a/\pi}\pars{2n + 1/2 + a/\pi}} \\[3mm]&={1 \over 4}\sum_{n = 0}^{\infty} {1 \over \bracks{n + 3/4 + a/\pars{2\pi}}\bracks{n + 1/4 + a/\pars{2\pi}}} \\[3mm]&=\half\bracks{\Psi\pars{{3 \over 4} + {a \over 2\pi}} -\Psi\pars{{1 \over 4} + {a \over 2\pi}}}_{\,a\ >\ 0} \end{align} where $\ds{\Psi\pars{z}}$ is the Digamma Function.
\begin{align} &\color{#66f}{\large% \int_{0}^{\infty}{\dd x \over \pars{1 + x^{2}}\cosh\pars{ax}} = \half\bracks{% \Psi\pars{{3 \over 4} + {\verts{a} \over 2\pi}} -\Psi\pars{{1 \over 4} + {\verts{a} \over 2\pi}}}} \end{align}