Suppose $X$ is a continuous random variable with p.d.f. $f(x) = 2x$ for $0 < x < 1$.
Find the p.d.f. $g(y)$ of $$Y = X^2$$
I tried $$G(y) = \int_{-\sqrt{y}}^{\sqrt{y}} 2x \,dx = 0$$ which gives me $0$. Then I should take first derivative to get p.d.f. and it is again $0$, but $0$ is not among homework answers.
What am I doing wrong?
Note that $0\le X\le 1 \implies 0\le Y=X^2 \le 1$.
Find the cumulative distribution of $Y$ first, namely for $y\in (0,1]$
$G(y)=\Bbb{P}(Y\le y)=\mathbb{P}(X^2\le y)=\mathbb{P}(0\le X\le \sqrt{y}) = \int_0^{\sqrt{y}} 2xdx=y$
and for $y=0$, since $Y=X^2$ is a continuous distribution,
$G(0)=\Bbb{P}(X^2\le 0)=\Bbb{P}(X=0)=0$
so that for $y\in [0,1],\ G(y)=y$