I am trying to solve this type of problems for my next exam. The problem goes something like this. Let X be a random variable with density of $$p(x)=\frac{1}{8}(x+2) , x\in(-2,2)$$ $$\text{and}$$ $$p(x)=0 ,\text{ otherwise}$$
Let $$Y=3X\ \text{ and }\ Z=1-X^{2}.$$ I have to find the CDF and PDF of both of the this functions of random variables.
In the books with examples i have i find 2 ways of solving this examples.
First method is: if the function is monotonously increasing then I have to find the inverse function and plug it in
$$P(\text{ inverse function })\cdot|(\text{derivative of inverse})|.$$
The second method i find is that i should do the $$P(Y<y)=P(1-X^{2}<y)=1-P(X^{2}<1-y)=1-P\left(X<\pm\sqrt{1-y}\right)=\cdots$$
After this i cannot determinate the bounds of the integral of the density function.
That's $\mathsf P(Z<z)~{=\mathsf P(1−X^2<z)\\=\mathsf P(X^2>1−z) \\ =\mathsf P(X<−\sqrt{1−z}\cup X>+\sqrt{1-z}) \\ = 1-\mathsf P({-}\sqrt{1-z}\leqslant X\leqslant {+}\sqrt{1-z})}$
and if $X∈(−2;0)∪[0;2)$ then $1−X^2∈\big(1−(−2)^2;1-0^2\big)\cup\big(1-2^2;1-0^2\big]$. In other words, the support for $X$ is folded onto the support for $Z$ (which comlicates the first method; the function is not invertable).
Further, the integration region we're most interested in is $X\in[-\sqrt{1-z};0)∪[0;+\sqrt{1-z})$
By the second method, the CDF is: $$F_Z(z) ~=~ {{\left(1-\int_{-\sqrt{1-z}}^{\sqrt{1-z}}\dfrac{(x+2)\operatorname d x}8\right) \mathbf 1_{z\in(-3;1]}}}+{\mathbf 1_{z\in(1;\infty)}}$$
To find the pdf you can take the unsigned differential of this integral, or apply the first method (which is the same result without the differentiate-an-integral task).
$$f_Z(z) ~=~ {{\dfrac{(2-\sqrt{1-z})}{8}\cdot\begin{vmatrix}\dfrac{\mathrm d ({-}\sqrt{1-z})}{\mathrm d z\qquad}\end{vmatrix}\mathbf 1_{z\in(-3;1)}}+{\dfrac{(2+\sqrt{1-z})}{8}\cdot\begin{vmatrix}\dfrac{\mathrm d ({+}\sqrt{1-z})}{\mathrm d z\qquad}\end{vmatrix}\mathbf 1_{z\in(-3;1]}}}$$