Gaussian moment recurrence (source code)

= Gaussian moment recurrence
{c}
{title2=$I_n=\frac{n-1}{2}I_{n-2},\quad I_n=\int_0^\infty x^ne^{-x^2}dx$}

For integers $n\geq2$, <integration by parts> gives
$$
I_n=\left[-\frac12x^{n-1}e^{-x^2}\right]_0^\infty+\frac{n-1}{2}I_{n-2}=\frac{n-1}{2}I_{n-2}.
$$
The boundary term vanishes because $n-1>0$ at zero and <Gaussian decay dominates every power> at infinity. The initial values are $I_0=\sqrt\pi/2$, the half-line <Gaussian integral>, and $I_1=1/2$ by the <substitution rule> $t=x^2$. More generally, for real $n>-1$, that substitution gives $I_n=\tfrac12\Gamma((n+1)/2)$, linking the recurrence to the <Gamma function>.