= Solution
Since $X\geq0$, the <function> $X\mapsto X^2$ is <strictly increasing> on its support. For $y\geq0$,
$$
F_Y(y)=\mathbb P(X^2\leq y)=F_X(\sqrt y)=1-e^{-y/2},
$$
and $F_Y(y)=0$ for $y<0$. Differentiating the <cumulative distribution function> gives
$$
\boxed{f_Y(y)=\begin{cases}\tfrac12e^{-y/2},&y\geq0,\\0,&y<0.\end{cases}}
$$
The density value at the single point $y=0$ is immaterial. Hence $Y$ has an <exponential distribution> with rate $1/2$. Direct <integration by parts>, or its standard <expected value>, yields
$$
\boxed{\mathbb E[X^2]=\mathbb E[Y]=\int_0^\infty\frac y2e^{-y/2}\,dy=2.}
$$
Back to article page