\documentclass[a4paper,12pt]{article}
\begin{document}
\parindent=0pt

{\bf Question}

Let $X$ have pdf $f(x)=\frac{1}{2}(1+x),\ \ -1<x<1.$ Find the pdf
of $Y=X^2$.

\medskip

{\bf Answer}

$f(x)=\frac{1}{2}(1+x),\ \ \ -1<x<1.$

The transformation is $y=x^2$.  It is decreasing in $-1<x \leq 0$
and increasing in $0<x<1$.

Also $0<y<1$ and $x=\pm \sqrt y$

Therefore $\displaystyle \left|\frac{dx}{dy}\right|=\frac{1}{2
\sqrt y}$

The pdf of $Y$ is \begin{eqnarray*} g(y) & = & \frac{1}{2}(1-\sqrt
y) \cdot \frac{1}{2\sqrt y} +  \frac{1}{2}(1+\sqrt y) \cdot
\frac{1}{2\sqrt y},\ \ \ 0<y<1\\ & = & \frac{1}{4\sqrt y}.2,\ \ \
0<y<1\\ & = & \frac{1}{2\sqrt y},\ \ \ 0<y<1. \end{eqnarray*}


Alternative:

\begin{eqnarray*} F(x) & = & \int_{-1}^x f(t) \,dt\\ & = &
\frac{1}{2} \int_{-1}^x (1+t) \,dt\\ & = & \frac{1}{2}
\left[t+\frac{t^2}{2}\right]_{-1}^x\\ & = & \frac{1}{2}
\left\{x+\frac{x^2}{2}+1-\frac{1}{2}\right\}\\ & = &
\frac{1}{2}\left\{x+\frac{x^2}{2}+\frac{1}{2}\right\}
\end{eqnarray*}

\begin{eqnarray*} G(y) & = & P(Y \leq y)\\ & = & P\{x^2 \leq y\}\\
& = & P\{-\sqrt y \leq x \leq \sqrt y\}\\ & = & F(\sqrt
y)-F(-\sqrt y)\\ & = & \frac{1}{2}\left\{\sqrt y
+\frac{y}{2}+\frac{1}{2}+\sqrt y -
\frac{y}{2}-\frac{1}{2}\right\}\\ & = & \sqrt y\end{eqnarray*}

Therefore the pdf of $Y$ is $\displaystyle g(y)=\frac{dG(y)}{dy} =
\frac{1}{2\sqrt y},\ \ \ 0<y<1.$

\end{document}
