<s>[INST] Finding PDF of $Y = 1 - X^2$, piecewise monotonic Have been banging my head against this question from Casella and Berger for some time, not understanding where my gap in knowledge is here: 
Given:
$f_X(x)=\frac38 (x+1)^2 \qquad Y = 1-X^2 $
Find the pdf of $Y$, seems simple enough...
Method: Given that $g(x)$ is not monotonic, we split it into two monotonic partitions, ignoring $A_0$:
$A_1 = (-1,0) \qquad g_1(x) = 1 - x^2 \qquad g^{-1}_1(y)=-\sqrt{1-y}$
$A_2= (0,1) \qquad\ \ \ g_2(x)=1-x^2 \qquad g^{-1}_2(y)=\sqrt{1-y}$ 
Using the theorem:
$f_Y(y) = \sum f_Xg^{-1}_i(y) \left\lvert {\frac{d}{dy}g^{-1}_i(y)} \right\rvert$
We have: 
$f_Y(y) = \frac38(\sqrt{(1-y)}+1)^2 
\left\lvert {\frac{1}{2\sqrt{1-y}}}\right\rvert 
+ 
\frac38(-\sqrt{(1-y)}+1)^2 
\left\lvert {-\frac{1}{2\sqrt{1-y}}}\right\rvert
$
Simplifying: 
$f_Y(y) = \frac{3}{16\sqrt{1-y}}\left[ (\sqrt{1-y} + 1)^2 + (-\sqrt{1-y}+1)^2\right]$
$f_Y(y) = \frac{3}{16\sqrt{1-y}}\left[ 
1 - y +2\sqrt{1-y}+1 + 1-y - 2\sqrt{1-y}+1\right]$
$f_Y(y) = \frac{3}{16\sqrt{1-y}}\left[ 
4 - 2y\right]$
$f_Y(y) = \frac{3}{8\sqrt{1-y}}\left[ 
2 - y\right]$
Unfortunately it doesn't match the answer:
$f_Y(y)=\frac38(1-y)^{-\frac{1}{2}} + \frac38(1-y)^{\frac{1}{2}}$
I also tried doing this using the CDF of X, which is where the theorem comes from but giving it a shot anyway: $P(Y \le y) = P(-\sqrt{1-y} \le X \le \sqrt{1-y}) = F_X(\sqrt{1-y}) - F_X(-\sqrt{1-y})$
Then taking the derivative, but that gave me the same end result... Where am I going wrong?
EDIT: Forgot support of X, $-1 \lt x \lt 1$
 [/INST] $$\frac{2-y}{\sqrt{1-y}} = \frac{1}{\sqrt{1-y}} + \frac{1-y}{\sqrt{1-y}} = \frac{1}{\sqrt{1-y}} + \sqrt{1-y}.$$
</s>