The PDF for $Y$ is $f_Y(y) = \begin{cases} 0 & |y|> 1 \\ 1-|y| & |y|\leq 1 \end{cases}$
How do I find the corresponding CDF $F_Y(y)$? I integrated the above piecewise function to get $F_Y(y)=\begin{cases} 1/2 -y/2-y^2/2 & [-1,0] \\ 1/2-y/2+y^2/2 & [0,1] \end{cases} $ by using the fact that $F_Y(y)=\int _{-\infty}^{y}{f_Y(y)}\,dy$, however my text claims the answer is $F_Y(y)=\begin{cases} 1/2 +y+y^2/2 & [-1,0] \\ 1/2+y-y^2/2 & [0,1] \end{cases} $ I am struggling with pdf and cdfs, so I asssume I did something wrong other than the simple integration. Who's correct? Me or the Text!?? $:)$