# How to compute $\int^{\infty}_{-\infty } |x| e^{-x²} \ dx$?

Could anyone be able to solve the following integral $\int^{\infty}_{-\infty } |x| e^{-x²} dx$? I know that $\int^{\infty}_{-\infty } |x| e^{-x²} dx = 2 \int^{\infty}_{0 } x e^{-x²} dx$, but I don't know how to solve that. I let this change of variable $u=-x²$, but something was unclear. There is a sign error.

• Hint: What is the derivative of $-\frac 12 e^{-x^2}$ ? – Fnacool Dec 2 '16 at 3:30
• Just do $u=x^2$ as the substitution to avoid the sign error. – NickC Dec 2 '16 at 3:31

$$\int_{-\infty}^\infty|x|e^{-x^2}dx=2\int_0^\infty xe^{-x^2}dx$$ $$=\int_\infty^0 e^{-x^2}d(-x^2)$$ $$=e^{-x^2}\bigg|^0_\infty$$ $$=1$$