CDF technique and uniform distribution Let X have the uniform distribution over$ (-1,3)$. Find the  Pdf of $Y=X^2$. 
I use CDF technique. $$F_Y(y)=P(Y \leq y)=P(u(X) \leq y)= P(x^2 \leq y)=X^2$$. Then I differentiate  and solve for PDF. Am I doing right in terms of steps?
 A: First of all the cdf of X is 
$$F_X(x)=\begin{cases} 0, \  x<-1 \\ \frac14 x+\frac14, \  -1\leq x \leq 3 \\ 1, \  x>3  \end{cases}$$

Now we split it in two cases:
First case: $x\in [-1,1) \Rightarrow y\in [0,1)$
We have $x=y^{1/2} $ for $x\in [0,1)$ and $x=-y^{1/2}$ for $x\in [-1,0)$
Second case: $x\in [1 ,3] \Rightarrow y\in [1,9]$
$\texttt{First case:}$ 
$$F_Y (y) = P(Y ≤ y) = P(X^2 ≤ y) = P(−y^{1/2} ≤ X ≤y^{1/2})$$
Here you can see symmetry of the limits for X. 
$$= P(X ≤ y^{1/2}) − P(X ≤ −y^{1/2}) = F_X(y^{1/2}) − F_X(−y^{1/2})$$.
The cdf of $Y$ is
$$F_Y(y)=F_X\left(y^{1/2}\right)-F_X\left(-y^{1/2}\right)=\frac14 \sqrt y+\frac14-\left(\frac14 (-\sqrt y)+\frac14 \right)=\frac12y^{1/2}$$
$\texttt{Second case:}$ 
Here $X$ is positive and $Y$ is positive as well. Therefore 
$$F_Y(y)=F(X^2<y)=F(X\leq y^{1/2})$$
$$F_Y(y)=\frac14 \cdot  y^{1/2}+\frac14=\frac14\cdot y^{1/2}+\frac14$$
Finally you differentiate to obtain the pdf.
A: Since $X$ takes values in $(-1,3)$ and $x\mapsto x^2$ is a continuous function, by the intermediate value theorem $Y=X^2$ takes values in $(0,9)$. Now, for $0<t<1$ we have
$$
\mathbb P(Y\leqslant t) = \mathbb P(-\sqrt t\leqslant X\leqslant \sqrt t) = \int_{-\sqrt t}^{\sqrt t} \frac 14\ \mathsf ds =  \frac{\sqrt t}2
$$
and for $1<t<9$ we have
$$
\mathbb P(Y\leqslant t) = \mathbb P(Y\leqslant 1) + \mathbb P(1\leqslant Y\leqslant t) = \frac12 + \int_1^{\sqrt t}\frac 14\ \mathsf ds = \frac{1}{4} \left(\sqrt{t}+1\right).
$$
Hence,
$$
F_Y(t) = \frac{\sqrt t}2\mathsf 1_{[0,1)}(t) + \frac14(\sqrt t+1)\mathsf 1_{[1,9)}(t)  + \mathsf 1_{[9,\infty)}(t),
$$
and differentiating yields the density:
$$
f_Y(t) = \frac1{4\sqrt t}\mathsf 1_{(0,1)}(t) + \frac{1}{8 \sqrt{t}}\mathsf 1_{(1,9)}(t).
$$
