For the density function below, I need to find $E(X)$ and $E(X^2)$. For $E(X)$, I did the following steps and got the answer of $-2/\sqrt{2\pi}$. However, this is incorrect as the correct answer is $\sqrt{\frac{2}{\pi}}$. I am unsure what I did incorrectly. For $E(X^2)$, is there any easier way to do it than by integration by parts? Thanks for the help.
Also, I tried a different approach that didn't work at all and I was wondering why it was incorrect. I split it up into two standard normals by adding them. Then, I used the theorem that the sum of two normals is also normal with a mean that is the sum of the two original normals and a variance that is a sum of the variances of the original normals. Going by that logic, I should get a normal with a mean of $0$ and a variance of $2$; however, that is obviously incorrect, so I am just wondering why.
$ f(x) = \frac{2}{\sqrt{2\pi}} e^{-\frac{x^2}{2}} dx, \ \ \ \ \ 0 < x < \infty $ $ E(X) = \frac{2}{\sqrt{2\pi}} \int_0^\infty x e^{-\frac{x^2}{2}} dx. $ Let $u = \frac{x^2}{2}$. $ = - \frac{2}{\sqrt{2\pi}}. $