Integral $\int_{-\infty}^\infty \frac{\exp{(-x^2)}}{1+x^4}dx$

calculuscomplex-analysisimproper-integralsintegration

I have an integral that I'd like some advice on how to find.
It is: $$\int_{-\infty}^{\infty} \frac{\exp(-x^2)}{1+x^4}dx$$

I have some experience with contour integrals so I tried using a contour integral where the contour is a semi-circle of radius R in the upper half of the complex plane. I think the integral along the arc vanishes as $R \to \infty$ so I used the residue theorem and am getting a value of $\tfrac{\pi}{\sqrt{8}}(\cos(1) – \sin(1))$. But this can't be right as the value is negative whereas the integrand is always positive! I can't work out what is going wrong.

Does anyone have an idea about how to evaluate this integral? Contour integration is the preferred method if possible but I am also open to other methods. Any suggestion is appreciated!

Best Answer

$$\int_{-\infty}^\infty \frac{e^{-x^2}}{\color{blue}{1+x^4}}dx=\int_{-\infty}^\infty e^{-x^2}\color{blue}{\int_0^\infty e^{-x^2 t} \sin t \,dt} dx=\int_0^\infty \sin t\color{red}{\int_{-\infty}^\infty e^{-(1+t)x^2}dx}dt$$ $$=\color{red}{\sqrt \pi} \int_0^\infty\frac{\sin t}{\color{red}{\sqrt{1+t}}}dt\overset{1+t=x^2}=2\sqrt{\pi}\int_1^\infty \sin(x^2-1)dx$$$$=2\sqrt{\pi} \cos 1 \int_1^\infty\sin(x^2)dx-2\sqrt{\pi} \sin 1 \int_1^\infty\cos(x^2)dx $$ $$=\boxed{\pi\cos 1\frac{1-2S\left(\sqrt{\frac{2}{\pi}}\right)}{\sqrt 2}-\pi\sin 1\frac{1-2C\left(\sqrt{\frac{2}{\pi}}\right)}{\sqrt 2}}$$ Where $S(x)$ and $C(x)$ are Fresnel Integrals.

Related Question