Contour integration problem from probability Can integrals of the form
$$
\int_{-\infty}^{\infty}{\exp\left(-\left[x - c\right]^{2}\right) \over 1 + x^{2}}\, {\rm d}x
$$
be computed in closed form using contour integration (or any other technique)?  If
$c = 0$, the integral is $\pi{\rm e\ erfc}\left(1\right)$, but I'm interested in
$c$ real and non-zero.
( In probability terms, the integrand is a product of normal and Cauchy densities. )
 A: $$ J(c)=\int_{-\infty}^{\infty}\frac{\exp[-(x-c)^2]}{1+x^2}dx=e^{-c^2}\int_{-\infty}^{\infty}\frac{\exp[-x^2]}{1+x^2} e^{2cx}dx $$
The integral on the right can be treated as the Fourier transform $\mathcal{F}(\exp[-x^2]/(1+x^2))$, with the transform parameter equal to $\mbox{i}2c$. The function is actually symmetric wrt $x$, thus, it is the cosine Fourier transform we are talking about. The necessary transform is available in Vol. 1 of Bateman & Erdelyi's "Tables of Integral Transforms" (1954). I used a shortcut and computed the transform using Maple. The resulting expression is:
$$ J(c)=\frac{\pi\mbox{e}}{2}\left( \mbox{erfc}(1+\mbox{i}c)e^{\mbox{i}2c}+\mbox{erfc}(1-\mbox{i}c)e^{-\mbox{i}2c} \right) $$
It is easy to check that this answer satisfies the ODE obtained by fedja. Written as the sum of conjugate terms, the function $J(c)$ is clearly real-valued for real $c$. It remains an open question whether this is a "nicer" form compared to what you had originally!
A: Now, since you call erfc(1) "a closed form expression", I should confess I do not understand the rules of this game. What's the big difference between $\int_1^\infty e^{-x^2/2} dx$ and the original integral? Or, do you ask if it is an elementary function of the parameter $c$?
If the latter, note that the function $J(c)=e^{c^2}\int_{-\infty}^\infty\frac{e^{-(x-c)^2}}{1+x^2}dx$ satisfies the equation $J''+4J=4\sqrt\pi e^{c^2}$, which, if you try to solve it by the method of variation of parameters, leads to the indefinite integrals like $\int e^{c^2}\cos 2c\ dc$. Those are not elementary, but not much worse than your erfc.
