Transformation of Random Variable $Y=X^4$ where $X\sim R(-2,1)$  I have this past exam question that I am a bit lost on.  The question asks for the probability density and distribution function of $Y$ if $Y=X^4$, where $X\sim R(-2,1)$.  To find the probability distribution $F_Y(y)$, my understanding is that: $$F_Y(y) = P(Y\le y)$$ $$F_Y(y) = P(X^4\le y)$$ $$F_Y(y) = P(X\le y^\frac {1}{4})$$ $$F_Y(y) = P(X\le y^\frac {1}{4}) - P(X\le -y^\frac {1}{4})$$ $$F_Y(y) = F_X( y^\frac {1}{4}) - F_X(-y^\frac {1}{4})$$  At this stage I am lost as to how to proceed to the piecewise distribution function for all values $y$ can take.  Similarly, to find the probability density $f_Y(y)$, my understanding is that: $$f_Y(y)=\frac{d}{dy}[ F_X(y^\frac {1}{4})-F_X(-y^\frac {1}{4})]$$ Using chain rule, we get: $$f_Y(y)=\frac{1}{4y^\frac{3}{4}}[f_X(y^\frac {1}{4})+f_X(-y^\frac {1}{4})] $$ Again, at this stage I am lost as to how to proceed to the piecewise density function for all values $y$ can take.  I don't have the past exam solutions answer for the distribution function, but I do have the solution to the density function, which is as follows: $$ f_Y(y)=\begin{cases} 0 & y\lt 0,\\\frac{1}{6y^\frac{3}{4}} & y\in[0,1), \\\frac{1}{12y^\frac{3}{4}} & y\in[1,16),\\0 & y\ge 16. \end{cases}$$  So my main issue is how to obtain both piecewise functions and how did they get the domains of y for which they are valid for.  Any advice is greatly appreciated.
 A: First of all the cdf of X is 
$$F_X(x)=\begin{cases} 0, \  x<-2 \\ \frac13 x+\frac23, \  -2\leq x \leq 1 \\ 1, \  x>1  \end{cases}$$

Now we split it in two cases:
First case: $x\in [-1,1) \Rightarrow y\in [0,1)$
We have $x=y^{1/4} $ for $x\in [0,1)$ and $x=-y^{1/4}$ for $x\in [-1,0)$
Second case: $x\in [-2,-1] \Rightarrow y\in [1,16]$

$\texttt{First case:}$ 
$$F_Y (y) = P(Y ≤ y) = P(X^4 ≤ y) = P(−y^{1/4} ≤ X ≤y^{1/4})$$
Here you can see symmetry of the limits for X. 
$$= P(X ≤ y^{1/4}) − P(X ≤ −y^{1/4}) = F_X(y^{1/4}) − F_X(−y^{1/4})$$.
The cdf of $Y$ is
$$F_Y(y)=F_X\left(y^{1/4}\right)-F_X\left(-y^{1/4}\right)=\frac13y^{1/4}+\frac23-\left(\frac13 (-y^{1/4})+\frac23 \right)=\frac23y^{1/4}$$
$\texttt{Second case:}$ 
Here $X$ is negative and $Y$ is positive Therefore 
$$F_Y(y)=F((-X)^4<y)=F(-X\leq y^{1/4})=P(X\geq -y^{1/4})=1-P(X\leq -y^{1/4})$$
$$F_Y(y)=1-\frac13\cdot \left(-y^{1/4}\right)-\frac23=\frac13\cdot y^{1/4}+\frac13$$
Finally you differentiate to obtain the pdf.
A: Here is an alternative approach. The idea is that PDF's can be obtained by computing means of functions of random variables. Let $X$ be as given and $Y=h(X)=X^4$. Let $g$ be any bounded measurable function. Then, $(g\circ h)(X)$ is even because $h$ is even. Write,
$$E(g(X^4))=\int_{-2}^1 g(x^4)f_X(x)\mathrm{d}x=\int_{-2}^{-1} +\int_{-1}^{1}$$
where I am omitting the integrands for brevity. The second integral, since $f_X(x)$ is constant (since it is a uniform density) and $g(x^4)$ is even, can be written, explicitly, as
$$2 \int_0^1 g(x^4) f_X(x) \mathrm{d}x.$$ Use change of variables, to obtain
$$2\int_0^1 g(y)f_X(y^{1/4})\frac{\mathrm{d}y}{4y^{3/4}}=\int_0^1 g(y)\frac{1}{6y^{1/4}}\mathrm{d}y$$
where we have used the fact that $f_X(x)=1/3$ for any $x\in (-2,1)$. Thus by identification the PDF of $Y$ on $(0,1)$ is $\frac{1}{6y^{3/4}}$. By performing the same change of variables on the integral, $\int_{-2}^{-1}$, we obtain, by identification again, $f_Y(y)=\frac{1}{12y^{3/4}}$. The domain for $y$ can be obtained by considering how we split up the intervals: $x\in (-2,-1)$ implies $y\in (1,16)$ and $x\in(-1,1)$ implies $y\in(0,1)$. 
The justification of this method is that if $Y=h(X)$ and $g$ is any bounded measurable function and $E(g(Y))=\int g(y) f(y) \mathrm{d}y$ then $f(y)$ is the PDF of $Y$. In our case, since the change of variables requires some bijectivity, one must split up the intervals and then one can only identify the PDF on that interval (so we get a piecewise defined density). Hope this helps.
