TITLE: Prove that $\int_0^\infty \frac{e^{\cos(ax)}\cos\left(\sin (ax)+bx\right)}{c^2+x^2}dx =\frac{\pi}{2c}\exp\left(e^{-ac}-bc\right)$
QUESTION [11 upvotes]: In my course, I have to prove formula below
$$I=\int_0^\infty \frac{e^{\cos(ax)}\cos\left(\sin (ax)+bx\right)}{c^2+x^2}dx =\frac{\pi}{2c}\exp\left(e^{-ac}-bc\right)$$
for $a,b,c>0.$
I know that this integral can be easily solved with complex analysis using
$$f(z)=\frac{1}{2} \ \mathbb{R} \left(\int_{-\infty}^\infty \frac{\exp\left(e^{iaz}+ibz\right)}{c^2+z^2}dz\right)$$
but right now I am in a course dealing with real analysis. I tried to use parametrization integral method
$$I'(a)=-\int_0^\infty \frac{xe^{\cos(ax)}\sin(\sin(ax)+(a+b)x)}{c^2+x^2}dx $$
but it doesn't look easier to handle. I tried to differentiate it again, but I just got a horrible form. An idea came to mind to differentiate with respect to parameter $b$ and set a differential equation
$$I''(b)+x^2I(b)=0$$
plugging this ODE to W|A, I got
$$I(b)=c_1\cos(bx^2)+c_2\sin(bx^2)$$
It's definitely wrong! After seeing Samrat's answer, I tried to plug in again to W|A and I got
$$I(b)=c_1 D_{-1/2}((i+1)b)+c_2 D_{-1/2}((i-1)b)$$
where $D_n(z)$ is the parabolic cylinder function but I have no idea what does that mean.
Any idea? Thanks in advance.

REPLY [9 votes]: As a generalization of Pranav's answer, let us assume that $f(z)$ has a Maclaurin series expansion with real coefficients that converges absolutely on the unit circle on the complex plane.
Then for $a, b, c >0$,
$$ \begin{align}  \text{Re} \int_{0}^{\infty} \frac{e^{ibx} f(e^{i a x}) }{c^{2}+x^{2}} \ dx &= \text{Re} \int_{0}^{\infty} \frac{e^{ibx}}{c^{2}+x^{2}} \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} e^{ianx}\ dx \\ &= \text{Re} \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} \int_{0}^{\infty} \frac{e^{i(an+b)x}}{c^{2}+x^{2}} \ dx \tag{1} \\ &= \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} \int_{0}^{\infty} \frac{\cos[(an+b)x]}{c^{2}+x^{2}} \ dx \\ &= \sum_{n=0}^{\infty}  \frac{f^{(n)}(0)}{n!} \frac{\pi}{2c} e^{-c(an+b)} \\ &= \frac{\pi}{2c} e^{-bc} \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} e^{-acn} \\ &= \frac{\pi}{2c} e^{-bc} f(e^{-ac}). \end{align} $$
Your integral is the case $f(z) = e^{z}$.
$ $
$(1)$ When can a sum and integral be interchanged?