In this blog I want to document a useful technique for evaluating integrals of the form
$$I_n(a) = \int_{-\infty}^{\infty}x^n e^{-ax^2}\ dx,$$
for any integer \(n\). Recall the Gaussian integral is given by
$$I_0(1) = \int_{-\infty}^{\infty}e^{-x^2}\ dx = \sqrt{\pi},$$
from which we easily deduce
$$ I_0(a) = \sqrt{\frac{\pi}{a}}.$$
Now note that for odd \(n\) the integrand is precisely anti-symmetric, thus the integral vanishes over the real line, e.g.
$$I_n(a) = 0, \ \ n\text{ odd}. $$
To see this analytically, simply recognize
$$ \frac{(-1)^{n+1}}{(2a)^n}\frac{\partial^n}{\partial x^n}e^{-ax^2} = x^n e^{-ax^2}, \ \ n\text{ odd}, $$
and apply the fundamental theorem of calculus.
Wonderful!
For even \(n\) we need only apply the trick commonly known as differentiation under the integral sign or otherwise Feynman integration, though Prof. Feynman did not originate it. We select a parameter of the integrand and evaluate its partial to sufficient order so that the integral is trivial, then we simply integrate with respect to the parameter itself to obtain the true value of the integral. Thus
$$ \int_{-\infty}^{\infty}x^n e^{-ax^2}\ dx = \int_{-\infty}^{\infty}\frac{\partial^{n/2}}{\partial a^{n/2}}e^{-ax^2}\ dx = \frac{\partial^{n/2}}{\partial a^{n/2}}\int_{-\infty}^{\infty}e^{-ax^2}\ dx$$
from which we obtain
$$I_n(a) = \sqrt{\pi}\frac{\partial^{n/2}}{\partial a^{n/2}}a^{-1/2} = \frac{\sqrt{\pi}(n+1)!!}{2^{n/2}a^{(n+1)/2}}, \ \ n\text{ even}$$
where we define
$$k!! = 1\cdot 3\cdot 5 \cdots (k-2)\cdot k.$$
Exercise:
Let \(\nu\) be a random white noise parameter which is Gaussianly distributed, e.g.
$$\nu \sim \frac{1}{\sqrt{2\pi}\sigma}e^{-\nu^2/(2\sigma^2)}.$$
Show that the RMS value of \(\nu\) is \(\sigma\). In other words, show
$$\sqrt{\bar{\nu^2}} = \sigma.$$