Let $X$ have the pdf $$f_X(x)=\begin{cases}\frac29(x+1)&,-1<x<2 \\ 0&,\text{ otherwise}\end{cases}$$ Find the pdf of $Y=X^2$.
The transformation isn't one-to-one so I’m a bit confused as to how to split the range of y and derive the pdf. In a previous question, the range of y included both negative and positive values. So I found out the corresponding range of X for negative and positive y’s respectively. But here the range of y is from 0 to 4. How do I go about it?
Since $X$ has CDF $\frac19(x+1)^2$ on $[-1,\,2]$, each $y\in[0,\,4]$ satisfies$$P(X^2\le y)=P(X\in[-\sqrt{y},\,\sqrt{y}])=\frac{(\sqrt{y}+1)^2-(1-\min\{\sqrt{y},\,1\})^2}{9}.$$The PDF is obtained from this CDF by differentiation, viz.$$\frac{1+y^{-1/2}-1_{[0,\,1]}(y)(1-y^{-1/2})}{9}$$in terms of an indicator function. In particular, for $y\in[0,\,1]$ the PDF is $\frac29y^{-1/2}$, while for $y\in[1,\,4]$ it's $\frac19(1+y^{-1/2})$. We can equivalently rewrite it as $\frac19(y^{-1/2}+\min\{1,\,y^{-1/2}\})$.