Integral of Hermite polynomial multiplied by $\exp(-x^2/2)$

For probabilists' Hermite polynomials: The Hermite polynomials are the orthogonal polynomials corresponding to the weight function $w(x) = e^{-x^2/2}$. This means that $\int_{-\infty}^{\infty} H_n(x)H_m(x)e^{-x^2/2} \, dx = 0$ whenever $n \not= m$ (or equivalently, $\int_{-\infty}^{\infty} H_n(x) P(x) e^{-x^2/2} \, dx = 0$ for any polynomial $P$ of degree less than $n$). Since $H_0(x) = 1$, it follows that $$\int_{-\infty}^{\infty} H_n(x)e^{-x^2/2} \, dx = \int_{-\infty}^{\infty} H_n(x)H_0(x)e^{-x^2/2} \, dx = 0$$ for all $n > 0$. The only time this integral is non-zero is when $n = 0$, in which case $$\int_{-\infty}^{\infty} H_0(x)e^{-x^2/2} \, dx = \int_{-\infty}^{\infty} e^{-x^2/2} \, dx = \sqrt{2\pi}.$$


Notice that, if $n$ is odd , then the integrand is an odd function which implies that the integral equals to $0$. If $n$ is even, then the integral equals to

$$ {2}^{2\,n+\frac{5}{2}}\Gamma \left( n+ \frac{3}{2} \right),\quad n=0,1,2,\dots. $$

Note this, in the above formula, $n=0$ corresponds to the case $H_{2}(x)$, $n=1$ correspons to the case $H_{4}(x)$ and so on.

One can have instead, the formula which include the case $n=0$

$$ {4}^{n}\sqrt {2}\,\Gamma \left( n+\frac{1}{2} \right), \quad n=0,1,2,\dots. $$

Again, in the above formula, $n=0$ corresponds to the case $H_{0}(x)$, $n=1$ corresponds to the case $H_{2}(x)$ and so on.