# Let $X$ be uniformly distributed over $[-a , a]$. Let $Y=X^2$. Find the p.d.f of $Y$.

Given, $$f(x) = \begin{cases} \frac{1}{2a} &,& -a \leqslant x \leqslant a\\ 0 &,& otherwise \\ \end{cases}$$ and $Y=X^2$ , therefore , $y\in [0 , \frac{1}{4a^2}]$.

Then, $$F_Y(y) = P(Y \leqslant y) = P(-\sqrt{y} \leqslant X \leqslant +\sqrt{y} )$$ $$\Rightarrow F_Y(y) = F_X(X \leqslant +\sqrt{y}) - F_X(X \leqslant -\sqrt{y})$$

On differentiating the above equation, $$\frac{d}{dy}F_Y(y) = \frac{d}{dy} \left[F_X(X \leqslant +\sqrt{y}) - F_X(X \leqslant -\sqrt{y}) \right]$$

$$\Rightarrow f_Y(y) = \left(\frac{1}{2\sqrt{y}} \right). \left(f_X(\sqrt{y}) - f_X(-\sqrt{y}) \right)$$

What will be the final expression of $f_Y(y)$? I am having difficulty in determining it because as $y\to0$ , $f_Y(y)\to\infty$.

$$\mathbb{P}(Y<y)=\mathbb{P}(-\sqrt{y}<X<\sqrt{y})=\int_{-\sqrt{y}}^{\sqrt{y}}f_X(x)dx$$
If $\sqrt{y}>a$, then $\mathbb{P}(Y<y)=\int_{-a}^{a}f_X(x)dx =1$
If $\sqrt{y}\leq a$, then $\mathbb{P}(Y<y)=\int_{-\sqrt{y}}^{\sqrt{y}}f_X(x)dx =\int_{-\sqrt{y}}^{\sqrt{y}}\frac{1}{2a}dx=\frac{\sqrt{y}}{a}$
Then for the pdf $f_Y(y)=\frac{1}{2a\sqrt{y}}$ for $y\in [0,a^2]$