Suppose $X$ has uniform $[-1,2]$ distribution. I am trying to find the density of $Z=X^2$.
Here is what I have done thus far:
Range($Z$)$=[0,4]$. I began computing the distribution of $Z$ for $z \in [0,4]$ as follows:
$$\begin{align*} P(Z \le z) &= P(X^2 \le z)\\ &= P(X \in [-\sqrt z, \sqrt z]) \end{align*}$$
I am note sure what to do from here. Any help is greatly appreciated. Once I unravel the distribution of $Z$, I can obtain the density of $Z$ by taking the derivative of its distribution function with respect to $z$.
$$ \mathbb{P}(X\in[-\sqrt{z},\sqrt{z}])=\mathbb{P}(X<\sqrt{z})-\mathbb{P}(X<-\sqrt{z})=\boxplus $$ Now since $X$ in uniform on $[-1,2],$ the CDF of it is: $$ F_X(x)=\chi_{x\in(2,\infty)}+\frac{1}{3}(x+1)\chi_{x\in[-1,2]}. $$ Thus by taking the range into consideration, we obtain: $$ \boxplus=\chi_{\sqrt{z}\in(2,\infty)}+\frac{1}{3}(\sqrt{z}+1)\chi_{\sqrt{z}\in[0,2]}-\frac{1}{3}(-\sqrt{z}+1)\chi_{-\sqrt{z}\in[-1,0]}= $$ $$ =\chi_{\sqrt{z}\in(2,\infty)}+\frac{1}{3}(\sqrt{z}+1)\chi_{\sqrt{z}\in[1,2]}+\frac{2\sqrt{z}}{3}\chi_{\sqrt{z}\in[0,1]} $$ Basically we handled the cases $z\geq 4$, $z\in[1,4]$, $z\in[0,1]$ and $z<0$ separately. Thus the PDF is: $$ \begin{cases} 0&z\in(-\infty,0)\cup(4,\infty)\\ \frac{1}{3\sqrt{z}}& z\in(0,1]\\ \frac{1}{6\sqrt{z}}& z\in(1,4]\\ \end{cases} $$