TITLE: Integral of $x^2 \exp(-ax^2)$ using the gamma function?
QUESTION [7 upvotes]: I'm struggling with this integral:
$$\int_{-\infty}^{\infty}x^{2}e^{-ax^{2}}dx = \frac{\sqrt{\pi}}{2a^{3/2}}$$
Is there a way to do this integration without using integration by parts and then explicitly relying on the Gaussian integral, instead using the Gamma function $\Gamma(a)=\int_{0}^{\infty}x^{a-1}e^{-x} dx$ ? I had tried the substitution $u=ax^2$ to give $\frac{2}{a}\int_{0}^{\infty}ue^{-u}du$ but that doesn't seem to get me far. 
Thanks in advance for any help or hints !

REPLY [3 votes]: You can write the integral in this form:
$$d/da \int{\exp{(-ax^2)}dx}$$
And we know that
$$\int{\exp{(-ax^2)}dx}=\sqrt{\pi/a}$$
So
$$\int{-x^2\exp{(-ax^2)}dx}=d/da (\sqrt{\pi/a})=\sqrt{\pi}/2a^{3/2}$$