Consider a standard normal random variable $X \sim p(x) = \frac{1}{\sqrt{2\pi}} e^{-\frac{x^2}{2}}$.Show that $\mathbb{E}[X^n] = (n-1) \mathbb{E}[X^{n-2}]$ for $n \geq 2$.
I have tried to compute the integration: $\mathbb{E}[X^n] = \int_{-\infty}^{\infty} x^n p(x) dx$, but without success because I can't arrive into a final conclusion, therefore I need some help.
It is a simple integration by parts.
$$\mathbb{E}[X^{n}]:=\int_{-\infty}^{\infty} x^{n} e^{-x^{2}/2}\mathrm{d}x=\\\int_{-\infty}^{\infty} x^{n-1} [xe^{-x^{2}/2}]\mathrm{d}x=-x^{n-1} e^{-x^{2}/2}|_{-\infty}^{\infty}+(n-1)\int_{-\infty}^{\infty} x^{n-1} [e^{-x^{2}/2}]\mathrm{d}x=(n-1)\mathbb{E}[X^{n-2}]$$