Evaluating the integral $\int_{0}^{\infty} \frac{\cos(ax^{2}) \cosh(bx)}{\cosh (\pi x)} \ dx $ There are at least two ways to show that   $$\int_{-\infty}^{\infty} \frac{\cos (ax^{2}) \cosh(ax)}{\cosh( \pi x)} \ dx = \cos \left( \frac{a}{4}\right) \ , \ |a| \le \pi $$ using contour integration.
One way is to integrate $ \displaystyle f(z) = \frac{e^{iaz^{2}}e^{az}}{\cosh (\pi z)}$ around a rectangle with vertices at $z=R, z= R+i$, $z=-R+i$ and $z=-R$.
A second less obvious way is to integrate $\displaystyle g(z) = \frac{e^{iaz^{2}}}{\sinh (\pi z)}$ around a rectangle with vertices at $z= \pm R \pm \frac{i}{2}$.
But what if we replace $\cosh(ax)$ with $\cosh (bx)$?
Can $$\int_{-\infty}^{\infty} \frac{\cos(ax^{2}) \cosh(bx)}{\cosh(\pi x)} \ dx \ , \ |b| \le \pi $$ be evaluated in closed form?
Simply letting $ \displaystyle f(z) = \frac{e^{iaz^{2}} e^{bz}}{\cosh (\pi z)}$ and integrating around the first contour won't work.
And I'm interested in any approach, not necessarily one that involves contour integration.
 A: A general approach to tackle both problems is to exploit the fact that:
$$ f(x) = \frac{1}{\cosh(x\sqrt{\pi/2})}\tag{1}$$
is a fixed point for the Fourier transform $\mathcal{F}:f\to\widehat{f}$:
$$ \widehat{f}(s) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{+\infty}f(x)\,e^{-isx}\,dx.$$
If $g(x)=\cos(ax^2),h(x)=\cosh(bx)$ we have:
$$ \widehat{g}(s) = \frac{1}{2\sqrt{a}}\left(\cos\frac{s^2}{4a}+\sin\frac{s^2}{4a}\right),$$
$$\widehat{h}(s) = \sqrt{\frac{\pi}{2}}\left(\delta(s-ib)+\delta(s+ib)\right)\tag{2}$$
so we have:
$$ \int_{-\infty}^{+\infty}\frac{\cosh(bx)}{\cosh(\pi x)}\,dx = \frac{1}{\cos\frac{b}{2}}=\sum_{n\geq 0}\frac{(-1)^n E_{2n}}{4^n(2n)!}b^{2n}\tag{3}$$
for any $b\in\mathbb{C}$ such that $|b|<\pi$. 
For instance, by differentiating $(3)$ with respect to $b$ twice, we get:
$$ \int_{-\infty}^{+\infty}x^2\,\frac{\cosh(bx)}{\cosh(\pi x)}\,dx = \frac{d^2}{db^2}\frac{1}{\cos\frac{b}{2}}=\frac{3-\cos b}{8\cos^3\frac{b}{2}}\tag{4}$$
so:
$$\begin{eqnarray*} \int_{-\infty}^{+\infty}\cos(ax^2)\frac{\cosh(bx)}{\cosh(\pi x)}\,dx &=& \sum_{m=0}^{+\infty}\frac{(-1)^m a^{2m}}{(2m)!}\int_{-\infty}^{+\infty}x^{4m}\frac{\cosh(bx)}{\cosh(\pi x)}\,dx\\&=& \sum_{m=0}^{+\infty}\frac{(-1)^m a^{2m}}{(2m)!}\cdot\frac{d^{4m}}{db^{4m}}\frac{1}{\cos\frac{b}{2}}\tag{5}\end{eqnarray*}$$
and now it is sufficient to exploit the identity:
$$ \sec\frac{b}{2}=2\sum_{n\geq 0}(-1)^n\left(\frac{1}{b+(2n+1)\pi}-\frac{1}{b-(2n+1)\pi}\right)\tag{6}$$
that follows from the residue theorem.
