Math Help - Departing from the moment generating function

1. Departing from the moment generating function

Thanks for all your help, guys! Special thanks to Mr.F!

The previous attempts were discouraging:
http://www.mathhelpforum.com/math-he...-function.html

Now I change approach totally, depart from the moment generating function and use the straight definition of moments. Please follow me...

Bottom line, you will see that I'm not getting to the expected results yet. Therefore I would appreciate if you double check and see what I am doing wrong.

Restating the problem - I need to analytically calculate the even moments of the following pdf:

$
p(x;\lambda) =\left\{\begin{array}{cc}2 \lambda x\ e^{-\lambda{x^2}}& x\geq 0\\0 & x<0\end{array}\right. (\lambda>0)
$

I know that the even moments are these and I need to find a way to prove it:

$
E[x^{2n}]=\frac{n!}{\lambda^n}\ (n=0,1,2, ...)
$

To do so, let's simply calculate the even-moments with the regular integration. By definition:

$E[X^{2n}]=\int_0^\infty x^{2n}\ 2\lambda x\ e^{-\lambda x^2} dx$

Integrating by parts:

$E[X^{2n}]=-\int_0^\infty x^{2n}\ (-2\lambda x)\ e^{-\lambda x^2} dx = \left[-x^{2n}e^{-\lambda x^2}\right]_0^\infty+\ I_1$

$I_1=2n\int_0^\infty x^{2n-1}\ e^{-\lambda x^2} dx = -\frac{n}{\lambda}\int_0^\infty x^{2n-2}\ (-2\lambda x)\ e^{-\lambda x^2} dx =
$

$
\left[-\frac{n}{\lambda}\ x^{2n-2}\ e^{-\lambda x^2}\right]_0^\infty+\ I_2$

$I_2=\frac{n}{\lambda}(2n-2)\int_0^\infty x^{2n-3}\ e^{-\lambda x^2} dx = -\frac{n(n-1)}{\lambda^2}\int_0^\infty x^{2n-4}\ (-2x\lambda)\ e^{-\lambda x^2} dx =
$

$
\left[-\frac{n(n-1)}{\lambda^2}\ x^{2n-4}\ e^{-\lambda x^2}\right]_0^\infty\ +\ I_3$

$I_3\ =-\frac{n(n-1)(n-2)}{\lambda^3} \int_0^\infty x^{2n-6}(-2x\lambda)\ e^{-\lambda x^2} dx$

and, in general:

$I_k\ =-\frac{n!}{(n-k)!\ \lambda^k} \int_0^\infty x^{2(n-k)} d(e^{-\lambda x^2})=-\frac{n!}{(n-k)!\ \lambda^k}\left[x^{2(n-k)}\ e^{-\lambda x^2}\right]_0^\infty+\ I_{k+1}$

The iteration stops when k=n with

$I_n = (n!/\lambda^n)[e^{-\lambda x^2}]_0^\infty$

therefore:

$E[X^{2n}]=-\sum_{k=0}^n\frac{n!}{(n-k)!\ \lambda^k}\left[\frac{x^{2(n-k)}}{e^{\lambda x^2}}\right]_0^\infty\ =\ -\sum_{k=0}^n\frac{n!}{(n-k)!\ \lambda^k}\left[0-0\right]\ =\ 0$

And here I am... ZERO! That cannot be! What's wrong here?

2. Originally Posted by paolopiace
Thanks for all your help, guys! Special thanks to Mr.F!

The previous attempts were discouraging:
http://www.mathhelpforum.com/math-he...-function.html

Now I change approach totally, depart from the moment generating function and use the straight definition of moments. Please follow me...

Bottom line, you will see that I'm not getting to the expected results yet. Therefore I would appreciate if you double check and see what I am doing wrong.

Restating the problem - I need to analytically calculate the even moments of the following pdf:

$
p(x;\lambda) =\left\{\begin{array}{cc}2 \lambda x\ e^{-\lambda{x^2}}& x\geq 0\\0 & x<0\end{array}\right. (\lambda>0)
$

I know that the even moments are these and I need to find a way to prove it:

$
E[x^{2n}]=\frac{n!}{\lambda^n}\ (n=0,1,2, ...)
$

To do so, let's simply calculate the even-moments with the regular integration. By definition:

$E[X^{2n}]=\int_0^\infty x^{2n}\ 2\lambda x\ e^{-\lambda x^2} dx$

Integrating by parts:

$E[X^{2n}]=-\int_0^\infty x^{2n}\ (-2\lambda x)\ e^{-\lambda x^2} dx = \left[-x^{2n}e^{-\lambda x^2}\right]_0^\infty+\ I_1$

$I_1=2n\int_0^\infty x^{2n-1}\ e^{-\lambda x^2} dx = -\frac{n}{\lambda}\int_0^\infty x^{2n-2}\ (-2\lambda x)\ e^{-\lambda x^2} dx =
$
$I_{2n}=\int_0^\infty x^{2n}\ 2\lambda x\ e^{-\lambda x^2} dx = \left[-x^{2n}e^{-\lambda x^2}\right]_0^\infty+\frac{n}{\lambda}\ I_{2(n-1)}=\frac{n}{\lambda}\; I_{2(n-1)}$

and as $I_0=1$ proves the result.

RonL