Let $X$ be uniform on $(-1, 2)$ and let $Y = X^2$. Find the pdf of $Y$.
So far I have noted that $F_X(x) = P(X \leq x) = \int_{-1}^x \frac{1}{3} dt = \frac{1}{3}(x+1)$.
Then, since $Y=X^2$, $y \in [0,4]$.
My initial attempt was to do the normal procedure of
$F_Y(y) = P(Y \leq y) = P(X^2 \leq y) = \begin{cases} P(X \geq -\sqrt{y}, \quad x \in [-1,0) \\ P(X \leq + \sqrt{y}, \quad x \in [0,2] \end{cases}$
Continuing,
$F_Y(y) = \begin{cases} F_X(-\sqrt{y}), \quad x \in [-1,0) \\ F_X(+\sqrt{y}), \quad x \in[0,2] \end{cases} = \begin{cases} \frac{1}{3}(1-\sqrt{y}), \quad x \in[-1,0) \\ \frac{1}{3}(1+\sqrt{y}), \quad x \in[0,2] \end{cases}$
I'm fairly happy that the CDF of $Y$ is continuous and well defined but I don't like the fact that I need to specify the x domain since it should after all be a function of y, right? Or is it necessary in this case since $Y=X^2$ is not one-to-one on the domain?