Evaluating $\int_{\mathbb{R}}\frac{\exp(-x^2)}{1+x^2}\,\mathrm{d}x$

I would like to evaluate in a closed form the integral $$\int_{\mathbb{R}}\frac{\exp(-x^2)}{1+x^2}\,\mathrm{d}x$$

I tried various methods :

  • integration by parts
  • some changes of variables ($y=x^2$, $x=\tan$)
  • residue calculus (but the factor $\exp(-x^2)$ forbid to send the contour to infinity)
  • developping $\exp(-x^2)$ or $\frac{1}{1+x^2} $ in power series (but in both cases one cannot exchange sum and integral)

Does anyone knows if this integral is known, or how to evaluate it ? At least I would like to find an exact expression.

The reason for me to believe that a closed form exists is that this integral arose in a problem of probability where I expect - if I haven't made any mistake previously - a very simple expression.


Solution 1:

Let $$I(a) = \int_{\mathbb{R}} \dfrac{\exp(-ax^2)}{1+x^2} dx$$ Recall that $$\int_{\mathbb{R}} \exp(-ax^2) dx = \dfrac{\sqrt{\pi}}{\sqrt{a}}$$ We then have \begin{align} I'(a) & = \int_{\mathbb{R}} \dfrac{-x^2\exp(-ax^2)}{1+x^2} dx\\ I(a) - I'(a) & = \int_{\mathbb{R}} \exp(-ax^2) dx = \dfrac{\sqrt{\pi}}{\sqrt{a}}\\ \dfrac{d}{da} \left(I(a) e^{-a}\right) &= -\sqrt{\pi}\dfrac{e^{-a}}{\sqrt{a}}\\ I(a)e^{-a} - I(0) & = - \sqrt{\pi} \int_0^a \dfrac{e^{-t}}{\sqrt{t}}dt \end{align} This gives us $$I(a) = e^a \pi - e^a \pi \cdot \text{erf}(\sqrt{a}) = e^a \pi \left(1-\text{erf}(a)\right)$$ Hence, $$I(1) = e \pi \left(1-\text{erf}(1)\right) \approx 1.34329$$ Wolframalpha integrates this approximately to give $\approx 1.34329$

Solution 2:

Using Parseval's theorem, we get $$ \int_{-\infty}^\infty \frac{e^{-x^2}}{1+x^2}dx= \frac{1}{2\pi}\int_{-\infty}^\infty \sqrt{\pi}e^{-\xi^2/4}\pi e^{-|\xi|}\,d\xi= \sqrt{\pi}\int_0^\infty e^{-\xi^2/4-\xi}\,d\xi= $$ $$ e\sqrt{\pi}\int_0^\infty e^{-(\xi^2+4\xi+4)/4}\,d\xi=\left[u=\frac{\xi+2}{2}\right]= 2e\sqrt{\pi}\int_1^\infty e^{-u^2}du= e\pi(1-\operatorname{erf}(1)). $$