The question says $X = \frac{1}{2}(1+x)$ for $-1<x<1$. Its asking us to find the PDF of the random variable $Y = X^2$.
When I apply change of variable rule, I get $(\frac{1}{4 \sqrt y }+\frac{1}{2})$ and when I apply the CDF rule I get something else. My textbook says the answer is $\frac{1}{2\sqrt y }$. Can someone explain??
The textbook is correct. I think you meant to say that the pdf for $X$ is given by $f(x)={1\over2}(1+x)$. Consider $y=x^2$. For a given $y$ there are two solutions, $x_+=\sqrt{y}$ and $x_-=-\sqrt{y}$. As usual, $$g(y) = f(x_+)\left\vert{\partial y\over\partial x}\vert_{x=x_+} \right\vert^{-1}+f(x_-)\left\vert{\partial y\over\partial x}\vert_{x=x_-} \right\vert^{-1}$$ So, $$g(y)={1\over2}\left(1+\sqrt{y}\right){1\over2\sqrt{y}}+{1\over2}\left(1-\sqrt{y}\right){1\over2\sqrt{y}}={1\over2\sqrt{y}}$$