If $X ∼ N(0, σ^2)$, use the moment generating function of X to show that $E(X^r)= 0$ for r odd, and $E(X^{2r} ) = \frac{(2r)!σ^{2r}}{2^r(r!)}$ for $r=0,1,2,3.....$
Attempt:
$m_X(u) = E(e^{Xu}) = E(1+\frac{Xu}{1!}+\frac{(Xu)^2}{2!}+\frac{(Xu)^3}{3!}+...)$ by Taylor expansion
$=1+E(X)u+E(X^2)\frac{u^2}{2!}+...$
We also know that moment generating function of normal distribution is given by
$m_X(u) = e^{\frac{1}{2}\sigma^2u^2} = 1+\frac{\frac{1}{2}\sigma^2u^2}{1}+\frac{(\frac{1}{2}\sigma^2u^2)^2}{2!}+\frac{(\frac{1}{2}\sigma^2u^2)^3}{3!}+....$ by Taylor expansion.
Here I'm a bit confused where to go now. I have two expressions for $m_X(u)$ and I probably have to equate them somehow, but not sure how to answer the question. Thanks :)
The moment generating function of $X$ is
$$M_X(t)=E(\exp(tX))=\exp\left(\frac{\sigma^2t^2}{2}\right)$$
$$=\sum_{r=0}^\infty \frac{\sigma^{2r}t^{2r}}{2^r r!}$$
Coefficient of $t^r/r!$ in the expansion of the MGF provides $r$th order raw moment about zero.
So $E(X^{2r+1})=0$ for all $r=0,1,2,\cdots$
And $E(X^{2r})$ is the coefficient of $\displaystyle\frac{t^{2r}}{(2r)!}$ in $M_X(t)$, which equals $\displaystyle\frac{(2r)!\,\sigma^{2r}}{r!\, 2^r}$.