Finding the probability density function... I've found the probability density function for other functions, but this one seems rather difficult.
$$F(x)=P(X\le x)=1-e^{-x^2}$$
My teacher's solution manual is showing:
$$
\begin{cases} 0, & x<0 \\ 2xe^{-x}, &  x>0 \end{cases}
$$
Maybe I am just having a hard time finding this integral, but I don't seem to get the same results. If I use u-substitution I am setting $u = x^2$ where $du = 2x$ then, but how does that get into the answer, am I selecting a wrong $u$? Is it integration by parts maybe?
Thanks.

If the density function is given by
$$
f(x) =
\begin{cases}
0,  & \text{if $x<0$,} \\[2ex]
2xe^{-x^2}, & \text{if $x\ge0$,}
\end{cases}
$$ then we have, by the change of variable, $u=t^2$, $du=2tdt$,
$$
F(x)=\int_0^x2t e^{-t^2}dt=\int_0^{x^2}e^{-u}du=\left[-e^{-u}\right]_0^{x^2}=1-e^{-x^2}
$$ as announced.
