Finding a pdf with a non-monotone function The approach I am taking involves first finding a CDF, then taking its derivative to find the PDF.   Say I have the function $f_{X}(x)=(x+1)^{2}/2$ such that $x$ is in $(-1,1)$ and $Y=1-X^2$.   I want to find the pdf of $Y$.   I guess the part I'm stuck on in finding the CDF is dealing with the $Y$.   What I want to do is to find $F_{X}(x)$, but I'm not sure if I should complete the squares or maybe I should be summing up probabilities.
Can I get some advice on this?  
 A: $P(Y\leq x)=P(1-X^2\leq x)=P(X^2\geq 1-x)$
Now if $x<0$ then $1-x>1$ so $P(X^2\geq 1-x)=0$ (since $X$ is in $(-1,1)$). So taking derivative w.r.t.$x$ also yields $0$.
So let's have $x>0$. If $x\in (0,1)$ then $1-x\in(0,1)$ so $P(X^2\geq 1-x)=P(X\geq\sqrt{1-x})+P(X\leq -\sqrt{1-x})$, each of which you can find since the pdf of $X$ is given to you. Taking derivative w.r.t. $x$ will yield the pdf of $$ within this range. 
To do the computation, taking $\sqrt{1-x}=a$ we have $P(X\geq a)+P(X\leq-a)=\int_a^1(x+1)^2/2 dx+\int_{-1}^{-a}(x+1)^2/2dx=\int_a^1(x+1)^2dx=\dfrac{2^3-(a+1)^3}{3}=\dfrac{8-(a+1)^3}{3}=\dfrac{8-(\sqrt{1-x}+1)^3}{3}$.
Taking derivative w.r.t. $x$ we have $\dfrac{-3(\sqrt{1-x}+1)^2(-1)}{2\times3\sqrt{1-x}}=\dfrac{(\sqrt{1-x}+1)^2}{2\sqrt{1-x}}$
If $x>1$ then $1-x<0$ so $P(X^2>1-x)=1$ (since $X^2\geq0>1-x)$. Taking derivative w.r.t. $x$ you end up with the pdf on this range being $0$.
So the pdf is $f_Y(x)=\dfrac{(\sqrt{1-x}+1)^2}{2\sqrt{1-x}}$ if $x\in(0,1)$ and $0$ otherwise.
A: By change of variables $f_Y(y) = f_X(g^{-1}(y))\left\lvert\frac{\operatorname d g^{-1}(y)}{\operatorname d y}\right\lvert$ if $Y=g(X)$ and $g(x)$ is an invertable function (a one-to-one mapping).
The "trick" here is that $1-X^2$ is not strictly invertable in the interval $X\in(-1;1)$, it folds the interval onto $[-1;0)$.
The solution is to treat it as two functions, one mapping $(-1;0)$ to $(-1;0)$ and the other mapping $[0;1)$ to $[-1;0)$.
$$\begin{align}
g_1(x) & = (1-(-\lvert x\rvert)^2)\mathbf 1_{x\in(-1;0)} \\[1ex] g_2(x) & = (1-(+\lvert x\rvert)^2)\mathbf 1_{x\in[0;1)} 
\\[2ex] g_1^{-1}(y) & = -\sqrt{1-y\;} \mathbf 1_{y\in(-1;0)}
\\[1ex] g_2^{-1}(y) & = +\sqrt{1-y\;}\mathbf 1_{y\in[-1;0)}
\\[3ex] f_Y(y) & = f_X(g_1^{-1}(y))\;\left\lvert\frac{\operatorname d g_1^{-1}(y)}{\operatorname d y}\right\lvert\;\mathbf 1_{y\in(-1;0)} + f_X(g_2^{-1}(y))\;\left\lvert\frac{\operatorname d g_2^{-1}(y)}{\operatorname d y}\right\lvert\;\mathbf 1_{y\in[-1;0)}
\\[1ex] ~ & = {\tfrac 1 2{\left(1+\left(-\sqrt{1-y^2\;}\right)\right)}^2\;\left\lvert \frac{\operatorname d -\sqrt{1-y^2\;}}{\operatorname d y}\right\rvert\;\mathbf 1_{y\in(-1;0)} + \\ \quad \tfrac 1 2{\left(1+{\left(+\sqrt{1-y^2\;}\right)\right)}^2\;\left\lvert \frac{\operatorname d +\sqrt{1-y^2\;}}{\operatorname d y}\right\rvert\;\mathbf 1_{y\in[-1;0)}}
\end{align}$$
Derivate and simplify to obtain the pdf.   Then integrate the result to get the CDF.
