I want to compute the expected value of the function $g(X) = X^n$, where $X$ represents a random variable from a Gauss distribution.
I found a proof, but I can't understand it. It is stated that the integration by parts is applied. Can anyone explain to me how the integration by parts is exactly applied? What is the $v$ and $u$ part? See derivation:
$$E(X^n) \,=\, \frac{2\lambda^n}{\sqrt{2 \pi}} \int_{0}^{\infty} t^n \mathrm{e}^{-t^2/2}\, dt \,=\, \frac{2\lambda^n}{\sqrt{2 \pi}} (n-1)\int_{0}^{\infty} t^{n-2} \mathrm{e}^{-t^2/2}\, dt $$
Best regards
$u=t^{n-1}$ and $dv=te^{-t^2/2}$, so that you can easily find the antiderivative of $dv$.