Integral of the form $\int_{-\infty}^{\infty} \frac{e^{-(ax)^2}}{1 + x^2}dx$

Consider the following integral: $$I(a)=\int_{-\infty}^\infty \frac{e^{-a^2(1+x^2)}}{1+x^2}dx$$ Note that initially the constant $e^{-a^2}$ wasn't there, but bringing it helps to simplify the denominator when we take a derivative with respect to $a$. Afterwards we just mutiply by $e^{a^2}$ and everything is unchanged, but let's take a derivative: $$ I'(a)=-2a\int_{-\infty}^\infty e^{-a^2(1+x^2)}dx=-2\sqrt \pi e^{-a^2}$$ Now notice that $I(\infty)=0$ and we're after $I\left(\frac{\zeta }{2}\right)$. $$I\left(\frac{\zeta }{2}\right)=-\left(I(\infty)-I\left(\frac{\zeta}{2}\right)\right)=2\sqrt \pi \int_{\frac{\zeta}{2}}^\infty e^{-a^2}da=\pi\operatorname{erfc}\left(\frac{\zeta }{2}\right)$$ Finally we just need to multiply by $\frac{\zeta }{2\sqrt \pi}e^{\zeta^2/4}$ and the result follows.


Define $$ f(a)=\int_{-\infty}^\infty\frac{e^{-ax^2}}{1+x^2}\,\mathrm{d}x\tag1 $$ then $$ \begin{align} f(a)-f'(a) &=\int_{-\infty}^\infty\frac{e^{-ax^2}}{1+x^2}\,\mathrm{d}x-\frac{\mathrm{d}}{\mathrm{d}a}\int_{-\infty}^\infty\frac{e^{-ax^2}}{1+x^2}\,\mathrm{d}x\\ &=\int_{-\infty}^\infty e^{-ax^2}\,\mathrm{d}x\\ &=\sqrt{\frac\pi{a}}\tag2 \end{align} $$ We can solve $(2)$ using an integrating factor. Note that $$ \begin{align} \left(e^{-a}f(a)\right)' &=-e^{-a}f(a)+e^{-a}f'(a)\\[3pt] &=-e^{-a}(f(a)-f'(a))\\ &=-e^{-a}\sqrt{\frac\pi{a}}\tag3 \end{align} $$ Therefore, using the complementary error function, $$\newcommand{\erfc}{\operatorname{erfc}} \begin{align} f(a) &=e^a\int_a^\infty e^{-t}\sqrt{\frac\pi{t}}\,\mathrm{d}t\\ &=2\sqrt\pi e^a\int_{\sqrt{a}}^\infty e^{-t^2}\,\mathrm{d}t\\ &=\pi e^a\erfc\left(\sqrt{a}\right)\tag4 \end{align} $$ Thus, $$ \begin{align} \int_{-\infty}^\infty\frac{e^{-a^2x^2}}{1+x^2}\,\mathrm{d}x &=f\!\left(a^2\right)\\ &=\pi e^{a^2}\erfc(a)\tag5 \end{align} $$