# 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.

• I just noticed that some of the answers to this question solve this integral as an intermediate step. – Mårten W Dec 12 '13 at 21:30

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$
• I don't understand your final equation. For me $I(0)=\pi$, isn't it ? – saposcat Apr 23 '13 at 16:54
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)).$$
• I believe it is right now. I use the following version of the Fourier transform, $\displaystyle (\mathcal{F}f)(\xi)=\int_{-\infty}^\infty e^{-i\xi x}f(x)\,dx.$ – Mårten W Apr 23 '13 at 17:25
• @CameronWilliams: Ah, yes, I get $\sqrt{\pi}$ from the Gaussian. But the $\pi$ inside is correct, since indeed $\mathcal{F}\left(\frac{1}{1+x^2}\right)=\pi e^{-|\xi|}$. – Mårten W Apr 23 '13 at 17:31