Find CDF of uniformly distributed variable Suppose $X$ is uniformly distributed over $[-1,3]$ and $Y=X^2$. Find the CDF $F_{Y}(y)$
From definition, I know that X's PDF is 
$\displaystyle f_{X}(x)=\begin{cases}
\frac{1}{4}, & -1\leq x\leq 3,  \\
0, & \text{otherwise}. 
\end{cases}$
Thus $\displaystyle F_{Y}(y)=P(X^2\leq y)=\int_{-\sqrt{y}}^{\sqrt{y}}f_{X}(x)dx$. Besides, $0\leq Y \leq9$, thus $F_{Y}(y)=0$, when $y<0$ and $F_{Y}(y)=1$, when $y>9$
Due to fact, that integral depends on $y$, I need to split interval into few parts. Any tips, on how to choose $y$ intervals? Thanks.
 A: For $0\le y\le 1$, we have $Y\le y$ if and only if $-\sqrt{y}\le X\le \sqrt{y}$.  But for $0\le y\le 1$, 
$$\Pr(-\sqrt{y}\le X\le \sqrt{y})=\frac{2\sqrt{y}}{4}.$$ 
The reason is that the interval from $-\sqrt{y}$ to $\sqrt{y}$ has length $2\sqrt{y}$.
For $1\lt y\lt 9$, we still want the probability that $-\sqrt{y}\le X\le \sqrt{y}$. However, $X$ "can't" be below $-1$. So equivalently we want the probability that $-1\le X\le \sqrt{y}$. The interval now has length $\sqrt{y}-(-1)=\sqrt{y}+1$, so the required probability is 
$$\frac{\sqrt{y}+1}{4}.$$
Remark: For the uniform distribution, setting up integrals is unnecessary. However, the cdf is always given by 
$$F_Y(y)=\Pr(Y\le y)=\int_{-\sqrt{y}}^{\sqrt{y}} f(x)\,dx$$
where $f(x)$ is the density function of $X$. But we must take account of the fact that the density function is $0$ to the left of $-1$. so for $0\le y\le 1$, we have
$$F_Y(y)=\int_{-\sqrt{y}}^{\sqrt{y}}\frac{dx}{4},$$
while for $1\lt y\le 9$ we get 
$$F_Y(y)=\int_{-1}^{\sqrt{y}}\frac{dx}{4}.$$
(The lower bound is $1$, not $-\sqrt{y}$, because the density function of $X$ to the left of $-1$ is $0$, not $\frac{1}{4}$.)
