I have this problem to determine a density function $f_{Y}(y)$ of $Y$ given $X$ as a random variable with uniform distribution on $[−1, 1]$ and $Y = X^2$. So: $f_X(x) = \frac{1}{2}$ for $x \in [-1, 1]$. I approached this problem with two different ways, 1) through determining first the $F_Y$ as the $CDF$, then derive from it $PDF$ 2) by transformation.
For the first method I got $f_Y(y) = \frac{1}{2\sqrt(y)}$ for $y \in ]0, 1]$ This seems correct. However, for transformation method, I tried the following:
$g(x) = x^2$ and $g'(x) = 2x$
$x_1 = g^{-1}(y) = \sqrt(y)$
so $f_Y(y) = \frac{f_X(x_1)}{|g'(x_1)|} = \frac{1/2}{2\sqrt(y)} = \frac{1}{4\sqrt(y)}$
Also, there is the example of $Y = X^3$, then:
$g(x) = x^3$ and $g'(x) = 3x^2$
$x_1 = g^{-1}(y) = \sqrt[3](y)$
so $f_Y(y) = \frac{f_X(x_1)}{|g'(x_1)|} = \frac{1/2}{3\sqrt[3](y)^2} = \frac{1}{6\sqrt(y)^2}$ but the correct answer is $\frac{1}{3\sqrt(y)^2}$