I need help with the following problem. Suppose $Z=N(0,s)$ i.e. normally distributed random variable with standard deviation $\sqrt{s}$. I need to calculate $E[Z^2]$. My attempt is to do something like \begin{align} E[Z^2]=&\int_0^{+\infty} y \cdot Pr(Z^2=y)dy\\ =& \int_0^{+\infty}y\frac{1}{\sqrt{2\pi s}}e^{-\frac y{2s}}dy\\ =&\frac{1}{\sqrt{2\pi s}}\int_0^{\infty}ye^{-\frac y{2s}}dy. \end{align}
By using integration by parts we get
$\int_0^{\infty}ye^{-\frac y{2s}}dy=\int_0^{+\infty}2se^{-\frac y{2s}}dy=4s^2.$
Hence $E[Z^2]=\frac{2s\sqrt{2s}}{\sqrt{\pi}},$ which does not coincide with the answer in the text. Can someone point the mistake?