Probability question (CDF , PDF etc) 
Possible Duplicate:
Please correct my answer (Probability) 

I have to calculate the density function of the random variable 
$Y= 1-X^2$, given that: $f(x) = \frac{1}{9}(x+1)^2$, where $-1 < x < 2$.
So I finally understood that the domain of Y is $-3 < Y < 1$.
But it seems that i cant continue further...  My method is to find the distribution of 
Y  by using the density function of X , and finally ill find the density function of Y 
by taking the derivative of Y's distribution func.
Its not working at all, i am taking wrong integral, wrong spaces, everything wrong...
Could someone please explain me what is the correct way?
Thanks

It is easiest to start with CDF:
$$
   F_Y(y) = \mathbb{P}(Y \leqslant y) = \mathbb{P}(1-X^2 \leqslant y) = \mathbb{P}(X^2 \geqslant 1 - y) = \mathbb{P}(X \geqslant \sqrt{1 - y}) + \mathbb{P}(X \leqslant -\sqrt{1 - y})
$$
Since $$F_X(x) = \begin{cases} 0 & x < -1 \\ 1 &x > 2 \\ \left(\frac{x+1}{3}\right)^3 & -1 \leqslant x  \leqslant 2 \end{cases}$$
one easily arrives as $F_Y(y)$
$$
    F_Y(y) = F_X(-\sqrt{1-y}) + 1 - F_X(\sqrt{1-y}) = \begin{cases} 1 & y \geqslant 1 \\ 0 & y \leqslant -3 \\ \frac{23 + 3 y}{27} + \frac{y-4}{27} \sqrt{1-y}  & y \leqslant 0 \\ 
  1 + 2 \sqrt{1-y} \frac{y-4}{27} & 0 < y < 1
\end{cases}
$$
Now, differentiating with respect to $y$:
$$
    f_Y(y) = \begin{cases} \frac{\left(1 + \sqrt{1-y}\right)^2}{18 \sqrt{1-y}} & -3 < y \leqslant 0 \\ \frac{2-y}{9 \sqrt{1-y}} & 0 < y< 1 \\ 0 & \text{otherwise}\end{cases}
$$
