Also, I have a problem to understand the integration by parts when solving for E(X^2).

Again I attached the solution. In don't understand how the first term in the second row is integrated:

I would use f(x)=y^2 ; f'(x)=2y; g'(x)=exp(-0.5(y^2) ; g(x) = (2*pi)^0.5

However I would get 0 with this approach for that term

...In the solution, I dont get what was used for f(x), g'(x) etc...

Again, thanks for any help. This forum is great!