Evaluate $\int_{-\infty}^{\infty} e^{-ax^2}/(1+x^2) dx$ I'm looking to evaluate $$\int_{-\infty}^{\infty} \frac{e^{-{ax}^2}}{1+x^2} dx$$
where $a$ is real. 
The "obvious" thing to try is a semi-circular contour integral in the upper or lower half plane, but this doesn't work because $e^{-{ax}^2}$ blows up along the imaginary axis. 
 A: We need $a\geq 0$ to ensure convergence. Assuming $a>0$, the Fourier transform of $\frac{1}{1+x^2}$ is $\sqrt{\frac{\pi}{2}} e^{-|s|}$ and the Fourier transform of $e^{-ax^2}$ is $\frac{1}{\sqrt{2a}}e^{-\frac{s^2}{4a}}$, hence the original integral equals
$$\sqrt{\frac{\pi}{a}}\int_{0}^{+\infty}\exp\left(-\frac{s^2}{4a}-s\right)\,ds = \color{red}{\pi e^a\text{Erfc}\sqrt{a}} $$
which is not an elementary function and depends on the CDF of a normal random variable.
A: We can apply Feynmann's Differentiation Under the Integral Trick.
Let
$$
f(a)=\int_{-\infty}^\infty\frac{e^{-ax^2}}{1+x^2}\,\mathrm{d}x
$$
Then $f(a)-f'(a)=\int_{-\infty}^\infty e^{-ax^2}\,\mathrm{d}x=\sqrt{\frac\pi a}$. Multiply by $-e^{-a}$ and get
$$
\left(e^{-a}f(a)\right)'=-e^{-a}\sqrt{\frac\pi a}
$$
Thus,
$$\newcommand{\erf}{\operatorname{erf}}
\begin{align}
e^{-a}f(a)
&=\pi-\int_0^ae^{-t}\sqrt{\frac\pi t}\,\mathrm{d}t\\
&=\pi-2\sqrt\pi\int_0^{\sqrt{a}}e^{-t^2}\,\mathrm{d}t\\[6pt]
&=\pi-\pi\erf\left(\sqrt{a}\right)
\end{align}
$$
So that
$$
f(a)=\pi e^a\left(1-\erf\left(\sqrt{a}\right)\right)
$$
A: Let $F(a)$ be given by the integral
$$F(a)=\int_{-\infty}^\infty \frac{e^{-ax^2}}{1+x^2}\,dx$$
for $a>0$.
Then the derivative $F'(a)$ of $F(a)$ is 
$$\begin{align}
F'(a)&=-\int_{-\infty}^\infty \frac{x^2e^{-ax^2}}{1+x^2}\,dx\\\\
&=F(a)-\int_{-\infty}^\infty e^{-ax^2}\,dx\\\\
&=F(a)-\sqrt{\frac{\pi}{a}}
\end{align}$$
Hence, $F(a)$ satisfies the ODE $F'(a)-F(a)=-\sqrt{\frac{\pi}{a}}$ subject to $F(0)=\pi$.  Solution to that ODE can be written 
$$\begin{align}
F(a)&=e^a \left(\pi -\sqrt \pi \int_0^a \frac{e^{-x}}{\sqrt x}\,dx\right)\\\\
&=e^a\left(\pi -\pi \frac{2}{\sqrt \pi}\int_0^{\sqrt a}e^{-x^2}\,dx\right)\\\\
&=\pi e^a \left(1-\text{erf}(\sqrt a)\right)\\\\
&=\pi e^a \text{erfc}(\sqrt a)
\end{align}$$ 
where $\text{erf(x)}=\frac2{\sqrt \pi}\int_0^x e^{-t^2}\,dt$ is the error function and $\text{erfc}(x)=\frac2{\sqrt \pi}\int_x^\infty e^{-t^2}\,dt=1-\text{erf}(x)$ is the complementary error function.
