[Math] The probability density of $X^2$

probabilityprobability distributionsrandom variablesuniform distribution

Here is a question about probability density. I am trying to work it out using a different method from the method on the textbook. But I get a different answer unfortunately. Can anyone help me out?

Question:
Let $X$ be uniformly distributed random variable in the internal $[ 0, 1]$. Find the probability density of $X^2$?

My trial:
$$\begin{align} F_Y(y) & = P(Y\leq y) \\ & = P(X^2\leq y) \\ & = P(X\leq\surd y)\\ & = F_X(\surd y) \\ & = \int_0^{\surd y} t \;\mathrm d t \\ & = 0.5 y\\ \therefore f_Y(y) & =0.5
\end{align}$$
This is actually inspired by https://math.stackexchange.com/questions/

Solution on the textbook:
$$\begin{align}
y & = x^2
\\ \mathrm dy & = 2x \;\mathrm dx
\\ h(y)\;\mathrm dy & = 1 \mathrm dx
\\ h(y) 2x \;\mathrm dx & = \mathrm dx
\\ h(y) & = 0.5/x \\ & = 0.5/\surd y
\end{align}$$

Best Answer

The method is fine in principle, but the wrong density function for $X$ was used..\ As in your argument, we have, for $0\lt y\lt 1$, $$F_Y(y)=\Pr(X\le \sqrt{Y}).$$ However, if you really want to use an integral, $$F_X(\sqrt{y})=\int_0^{\sqrt{y}} 1\cdot dt=\sqrt{y}.$$ This is because the density function of $X$ on $(0,1)$ is $1$.

Differentiating, we find that $f_Y(y)=\frac{1}{2y^{1/2}}$ for $0\lt y\lt 1$.

Related Question