Let X be a continuous random variable with density function $f(x)=xe^{-x}$ if $x\geq 0$ and $0$ otherwise. Then the distibution function of X is $F_X(x)=1-(x+1)e^{-x}$. Let $Y = X^2$. Find the cumulative distribution function of $Y$.
My result is $F_Y (z)=P(Y≤z)=P(-\sqrt z≤X≤\sqrt z)=F_X (\sqrt z)-F_X (-\sqrt z)=((1-√z) e^{2\sqrt z}-√z-1) e^{-\sqrt z}$.
But $((1-√z) e^{2\sqrt z}-√z-1) e^{-\sqrt z}$ takes negativ values. Isn't that a problem?
The distribution function $F_X(x)$ is zero for $x<0$ if its density is zero for $x<0$. So $F_X(-\sqrt{z})=0$ for $z\geq 0$