Computing a gaussian integral involving both real and imaginary coefficients in a stochastic system I am stuck with the integral:
$$\int_{-\infty}^{\infty} \frac{\exp[-a(x-b)^2]}{1+cx^2} dx$$ where $a,c$ are real and $b$ is purely imaginary.
I tried to solve it by contour integration but the integral along the semicircular edge of the contour does not end up as 0. So the method doesnt work.
I dont have any idea about other ways to solve this. I am thinking about expanding the gaussian in terms of its Taylor series and integrating the respective terms. Still it is becoming complicated.
Does anyone have any idea about this?
 A: Since $b$ is purely imaginary, this is a Fourier Transform.
Assuming $a>0$, $c>0$ ,and $\Re(b) = 0$; make the substitution $- \pi s =  \Im (b)$ or equivalently $-i\pi s =b$ or $\pi s = ib$
$$\begin{align*}\displaystyle & \int_{-\infty}^{\infty} \frac{\exp\left[-a\left(x-b\right)^2\right]}{1+cx^2} dx\\
\\
&= \int_{-\infty}^{\infty} \frac{\exp\left[-a\left(x+i\pi s\right)^2\right]}{1+cx^2} dx\\
\\
&= \int_{-\infty}^{\infty} \frac{\exp\left[-ax^2+a(\pi s)^2-2\pi i axs\right]}{cx^2+1} dx\\
\\
&= \frac{a^2}{c}e^{a(\pi s)^2}\int_{-\infty}^{\infty} \frac{e^{-\frac{1}{a}(ax)^2}}{(ax)^2+\frac{a^2}{c}}e^{-2\pi i (ax)s} dx\\
\\
&= \frac{a}{c}e^{a(\pi s)^2}\int_{-\infty}^{\infty} \frac{e^{-\frac{1}{a}y^2}}{y^2+\frac{a^2}{c}}e^{-2\pi iys} dy\\
\\
&= \frac{a}{c}e^{a(\pi s)^2}(2\pi)^2\frac{1}{2\left(\frac{2\pi a}{\sqrt{c}}\right)}\int_{-\infty}^{\infty} \frac{2\left(\frac{2\pi a}{\sqrt{c}}\right)}{(2\pi y)^2+\left(\frac{2\pi a}{\sqrt{c}}\right)^2}\space e^{-\pi^2\left(\frac{y}{\pi\sqrt{a}}\right)^2}\space e^{-2\pi iys} dy\\
\\
&= \frac{\pi}{\sqrt{c}}e^{a(\pi s)^2}\mathscr{F}\left\{ \frac{2\left(\frac{2\pi a}{\sqrt{c}}\right)}{(2\pi y)^2+\left(\frac{2\pi a}{\sqrt{c}}\right)^2}\space e^{-\pi\left(\frac{y}{\sqrt{\pi a}}\right)^2}\right\} \\
\\
&= \frac{\pi}{\sqrt{c}}e^{a(\pi s)^2}\left[\mathscr{F}\left\{ \frac{2\left(\frac{2\pi a}{\sqrt{c}}\right)}{(2\pi y)^2+\left(\frac{2\pi a}{\sqrt{c}}\right)^2}\right\} * \mathscr{F}\left\{ e^{-\pi\left(\frac{y}{\sqrt{\pi a}}\right)^2}\right\} \right]\\
\\
&= \frac{\pi}{\sqrt{c}}e^{a(\pi s)^2}\left[e^{-\frac{2 a}{\sqrt{c}}|\pi s|} * \sqrt{\pi a} e^{-a\left(\pi s\right)^2}\right] \\
\\
&= \pi \sqrt{\frac{\pi a}{c}}e^{a(\pi s)^2}\int_{-\infty}^{\infty}e^{-\frac{2 a}{\sqrt{c}}|\pi \tau|}  e^{-a\left(\pi s -\pi \tau\right)^2}\space d\tau \\
\\
&= \pi \sqrt{\frac{\pi a}{c}}e^{a(\pi s)^2}\left[\int_{-\infty}^{0}e^{\frac{2 a}{\sqrt{c}}\pi \tau}  e^{-a\left(\pi s -\pi \tau\right)^2}\space d\tau +\int_{0}^{\infty}e^{-\frac{2 a}{\sqrt{c}}\pi \tau}  e^{-a\left(\pi s -\pi \tau\right)^2}\space d\tau \right]\\
\\
&= \pi \sqrt{\frac{\pi a}{c}}\left(\int_{-\infty}^{0}\exp\left[-a\left([\pi\tau]^2-2\left[\pi s+\frac{1}{\sqrt{c}}\right]\pi \tau\right)\right]\space d\tau +\int_{0}^{\infty}\exp\left[-a\left([\pi\tau]^2-2\left[\pi s-\frac{1}{\sqrt{c}}\right]\pi \tau\right)\right]\space d\tau \right)\\
\\
&= \pi \sqrt{\frac{\pi a}{c}}\left(e^{a\left(\pi s+\frac{1}{\sqrt{c}}\right)^2}\int_{-\infty}^{0}\exp\left[-a\left(\pi\tau-\left[\pi s+\frac{1}{\sqrt{c}}\right]\right)^2\right]\space d\tau +e^{a\left(\pi s-\frac{1}{\sqrt{c}}\right)^2}\int_{0}^{\infty}\exp\left[-a\left(\pi\tau-\left[\pi s-\frac{1}{\sqrt{c}}\right]\right)^2\right]\space d\tau \right)\\
\\
&= \pi \sqrt{\frac{\pi a}{c}}\left(e^{a\left(\pi s+\frac{1}{\sqrt{c}}\right)^2}\frac{1}{\pi\sqrt{a}}\int_{-\infty}^{-\sqrt{a}\left(\pi s+\frac{1}{\sqrt{c}}\right)}e^{-u^2}\space du +e^{a\left(\pi s-\frac{1}{\sqrt{c}}\right)^2}\frac{1}{\pi\sqrt{a}}\int_{-\sqrt{a}\left(\pi s-\frac{1}{\sqrt{c}}\right)}^{\infty}e^{-u^2}\space du\right)\\
\\
&= \sqrt{\frac{\pi}{c}}\left(e^{a\left(\pi s+\frac{1}{\sqrt{c}}\right)^2}\int_{-\infty}^{-\sqrt{a}\left(\pi s+\frac{1}{\sqrt{c}}\right)}e^{-u^2}\space du +e^{a\left(\pi s-\frac{1}{\sqrt{c}}\right)^2}\int_{-\sqrt{a}\left(\pi s-\frac{1}{\sqrt{c}}\right)}^{\infty}e^{-u^2}\space du\right)\\
\\
&= \frac{\pi}{2}\frac{1}{\sqrt{c}}\left(e^{a\left(\pi s+\frac{1}{\sqrt{c}}\right)^2}\mathrm{erf}(u)\biggr{|}_{-\infty}^{-\sqrt{a}\left(\pi s+\frac{1}{\sqrt{c}}\right)} +e^{a\left(\pi s-\frac{1}{\sqrt{c}}\right)^2}\mathrm{erf}(u)\biggr{|}_{-\sqrt{a}\left(\pi s-\frac{1}{\sqrt{c}}\right)}^{\infty}\right)\\
\\
&= \frac{\pi}{2}\frac{1}{\sqrt{c}}\left(e^{a\left(\pi s+\frac{1}{\sqrt{c}}\right)^2}\left[\mathrm{erf}\left(-\sqrt{a}\left[\pi s+\frac{1}{\sqrt{c}}\right]\right)+1\right] +e^{a\left(\pi s-\frac{1}{\sqrt{c}}\right)^2}\left[1 -\mathrm{erf}\left(-\sqrt{a}\left[\pi s-\frac{1}{\sqrt{c}}\right]\right)\right]\right)\\
\\
&= \frac{\pi}{2}\frac{1}{\sqrt{c}}\left(e^{\left[-\sqrt{a}\left(ib+\frac{1}{\sqrt{c}}\right)\right]^2}\left[\mathrm{erf}\left(-\sqrt{a}\left[ib+\frac{1}{\sqrt{c}}\right]\right)+1\right] +e^{\left[-\sqrt{a}\left(ib-\frac{1}{\sqrt{c}}\right)\right]^2}\left[1 -\mathrm{erf}\left(-\sqrt{a}\left[ib-\frac{1}{\sqrt{c}}\right]\right)\right]\right)\\
\end{align*}$$
