# Integral of $x^2 \exp(-ax^2)$ using the gamma function?

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 !

• $\int_0^\infty ue^{-u} du = \int_0^\infty x^{2-1} e^{-x} dx = \Gamma(2)$. But note that your change of variables is not quite right: if $u = ax^2$ you have $du = 2ax dx$ so $$\int_0^\infty x^2 e^{-ax^2} dx = \int_0^\infty \frac{u}{a} e^{-u} \frac{du}{2\sqrt{au}}$$... – Willie Wong Mar 26 '12 at 14:26
• Your approach is correct, but not the result. Your substitution should yield $$\frac{1}{a^{3/2}}\int_{0}^{\infty} u^{1/2}e^{-u}\; du.$$ – Sangchul Lee Mar 26 '12 at 14:29
• To get this from the Gaussian painlessly, use differentiation under the integral sign. See math.uconn.edu/~kconrad/blurbs/analysis/diffunderint.pdf, esp. section 5. – KCd Mar 26 '12 at 22:35
• Hi KCd. Thanks. I am curious. So we would evaluate this: $\int_{-\infty}^{\infty}\frac{\partial }{\partial a}x^{2}e^{-ax^{2}}dx$ ? – P Sellaz Mar 27 '12 at 8:10

Summarising the comments, after substitution of $u=ax^2$ and $du=2axdx$, you'll get $$\int_0^\infty x^2 e^{-ax^2}dx=\frac{1}{2a^{3/2}}\int_0^\infty u^{3/2-1}e^{-u} du=\frac{\Gamma(3/2)}{2a^{3/2}}=\frac{\sqrt{\pi}}{4a^{3/2}}.$$
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}$$