definite integral of $x^2e^{-x^2}$ I am trying to calculate the integral of this form:
$\int_{-\infty}^{+\infty}e^{-x^2}\cdot x^2dx$  
I am stuck. I know the result, but I'd like to know the solution step-by-step, because, as some great mind said, you should check for yourself. Any ideas on how to solve this? Maybe somebody knows a tricky substitution?
 A: Another chance is given by the substitution $x=\sqrt{u}$ and the definition of the $\Gamma$ function:
$$ \int_{\mathbb{R}}x^2 e^{-x^2}\,dx = 2\int_{0}^{+\infty}x^2 e^{-x^2}\,dx = \int_{0}^{+\infty}u^{1/2}e^{-u}\,du = \Gamma\left(\frac{3}{2}\right)=\frac{1}{2}\Gamma\left(\frac{1}{2}\right)=\frac{\sqrt{\pi}}{2}.$$
A: Since the complete answer has been given, I will complete my hint.
$$
\begin{align}
\int_{-\infty}^\infty e^{-x^2}x^2\,\mathrm{d}x
&=\frac12\int_{-\infty}^\infty e^{-x^2}x\,\mathrm{d}x^2\tag{1}\\
&=-\frac12\int_{-\infty}^\infty x\,\mathrm{d}e^{-x^2}\tag{2}\\
&=\frac12\int_{-\infty}^\infty e^{-x^2}\,\mathrm{d}x\tag{3}\\
&=\frac12\sqrt\pi\tag{4}
\end{align}
$$
Explanation:
$(1)$: $\mathrm{d}x^2=2x\,\mathrm{d}x$
$(2)$: $\mathrm{d}e^u=e^u\,\mathrm{d}u$
$(3)$: integrate by parts
$(4)$: common integral (usually done by squaring the integral and changing variables in $\mathbb{R}^2$)

The Common Integral in $\boldsymbol{(4)}$
I was looking through my posts to see if I had ever given a proof on this site for the "common integral" I mentioned in $(4)$ above, but I could not find one.  To complete the proof, I should give a proof of $(4)$.
$$
\begin{align}
\left(\int_{-\infty}^\infty e^{-x^2}\,\mathrm{d}x\right)^2
&=\int_{-\infty}^\infty\int_{-\infty}^\infty e^{x^2+y^2}\,\mathrm{d}x\,\mathrm{d}y\tag{5}\\
&=\int_0^{2\pi}\int_0^\infty e^{-r^2}r\,\mathrm{d}r\,\mathrm{d}\theta\tag{6}\\
&=\int_0^{2\pi}\frac12\int_0^\infty e^{-r^2}\,\mathrm{d}r^2\,\mathrm{d}\theta\tag{7}\\
&=\int_0^{2\pi}\frac12\,\mathrm{d}\theta\tag{8}\\[6pt]
&=\pi\tag{9}
\end{align}
$$
Explanation:
$(5)$: write the square of the integral as an integral over $\mathbb{R}^2$
$(6)$: change to polar coordinates
$(7)$: $\mathrm{d}r^2=2r\,\mathrm{d}r$
$(8)$: $\int_0^\infty e^{-t}\,\mathrm{d}t=1$
$(9)$: left to the reader
A: You have nice answers already. I add this, since (to me) it is more elementary.
Integrating by parts,
$$
\int \frac{1}{2}x\times 2x e^{-x^2}\,dx = -\frac{1}{2}xe^{-x^2}+\int \frac{1}{2}e^{-x^2}\,dx.
$$
With the bounds the "out-integrated" part vanishes, and we find that
$$
\int_{-\infty}^{+\infty}x^2e^{-x^2}\,dx=\frac{1}{2}\int_{-\infty}^{+\infty}e^{-x^2}\,dx=\frac{1}{2}\sqrt{\pi},
$$
where the last integral must be considered folklore.
A: Hint: Let $I(a)=\displaystyle\int_{-\infty}^\infty e^{-ax^2}~dx$, and then evaluate $I'(1)$.
A: Note that
$$\left( \int_{-\infty}^{\infty} x^2e^{-x^2}\, dx \right)^2 = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} x^2y^2e^{-(x^2+y^2)}\, dx\, dy$$
In polar coordinates, that is $x=r\cos \theta$ and $y=r\sin \theta$, this integral becomes
$$\int_0^{2\pi} \int_0^{\infty} r^4 \sin^2\theta \cos^2\theta e^{-r^2}\, \cdot r\, dr\, d\theta$$
which in turn is equal to
$$\left( \int_0^{2\pi} \sin^2\theta \cos^2\theta\, d\theta \right) \left( \int_0^{\infty} r^5e^{-r^2}\, dr \right)$$
This can be evaluated using elementary methods. Then take square roots, noting that your integral must be positive.
The function $x^2e^{-x^2}$ has no elementary antiderivative, so usual techniques like integration by parts or by substitution won't work.
