Find the CDF of Y based on PDF of X. How to determine the interval? So I am given a PDF of $X$ and it looks like this $f(x)=\frac{1}{2} \cdotp e^{-|x|}$. Now I need to find the CDF of $Y$ which depends on $X$ like this:
$$Y=\begin{cases}\;\;X+1 &,&  X<-1\\-X-1&,& -1\le X < 0\\ X-1&,& 0\le X < 2\\-X+3&,& 2\leq X\end{cases}$$
What I have already attempted is that I have drawn the $Y$ function, but I don't know how to determine the interval of $Y$ from it. If anyone could help out with that, it would be appreciated. 
 A: Let $f_X(x)$ be the pdf of $X$ and $F_Y(t)=P(Y\leq t)$. We will draw line $y=t$ from your figure and see for which $x$ does $y \leq t$ holds. 
First, for $t > 1$, $y \leq t$ holds for all $x \in \mathbb{R}$, so we have $F_Y(t)=1$.
If $0 < t \leq 1 $, the intersection points with your figure and the line would be $x=1+t, 3-t$. That is, $y \leq t \iff x \leq 1+t$ or $x \geq 3-t$, so we have $F_y(t)=\int_{-\infty}^{1+t}f_X(x)dx+\int_{3-t}^{\infty}f_X(x)dx=1+\frac{1}{2}e^{t-3}-\frac{1}{2}e^{-t-1}$.
If $-1 <t \leq 0$, the intersection points would be $x=t-1, -t-1, t+1, -t+3$. (if $t=0$ we have three intersection points, but that case will lead to same result anyway). That is,  $y \leq t \iff x \leq t-1$ or $-t-1 \leq x \leq t+1$ or $x \geq -t+3$, so we have $F_y(t)=\int_{-\infty}^{t-1}f_X(x)dx+\int_{-t-1}^{t+1}f_X(x)dx+\int_{3-t}^{\infty}f_X(x)dx=1-e^{-t-1}+\frac{1}{2}e^{t-1}+\frac{1}{2}e^{t-3}$.
If $t \leq -1$, the intersections points would be $x=t-1, -t+3$. (if $t=-1$ we have three intersections points, but we can ignore it again too). That is, $y \leq t \iff x \leq t-1$ or $x \geq -t+3$, so we have $F_y(t)=\int_{-\infty}^{t-1}f_X(x)dx+\int_{3-t}^{\infty}f_X(x)dx=\frac{1}{2}e^{t-1}+\frac{1}{2}e^{t-3}$.
A: $$Y(x)=\begin{cases}\;\;x+1 &:&  x<-1\\-x-1&:& -1\le x < 0\\ x-1&:& 0\le x < 2\\-x+3&:& 2\leq x\end{cases}$$
The function is not invertable, but we can find the semi-inverses.
$$X(y)\in \begin{cases}\{y-1, -y+3\} &:& y<-1 \\ \{y-1,-y-1, y+1,-y+3\} &:& -1 \leq y < 0 \\ \{y+1,-y+3\} &:&0\leq y\leq 1   \end{cases}$$
Then apply $f_Y(y) {= \sum_{x\in X(y)} \lvert Y'(x)\rvert^{-1} f_X(x) \\ =\begin{cases} f_X(y-1)+f_X(-y+3) &:& y<-1 \\ f_X(y-1)+f_X(-y-1)+f_X(y+1)+f_X(-y+3) &:& -1 \leq y < 0 \\ f_X(y+1)+f_X(-y+3) &:&0\leq y\leq 1 \end{cases}}$
Then perform the relevant integration to obtain the CDF, $F_Y(y)$
