A split random variable problem

Let $X$ be a random variable with the density function: \begin{equation} f_{X}(t) = \begin{cases} \dfrac{1}{2}, & 1 \leq t < 0 \\ \dfrac{1}{9}t, & 0 \leq t \leq 3 \\ 0, & \text{else} \end{cases} \end{equation}

and $Y$ a random variable defined as \begin{equation} Y = \begin{cases} X + 1, & \quad X \leq 0 \\ -X, & \quad 0 \leq X \leq \dfrac{1}{2}\\ 2, & \quad \dfrac{1}{2} < X < 1\\ 4 - X, & \quad X \geq 1 \end{cases} \end{equation}

How can I find the CDF of $Y$? I'm having a hard time since it is split this way.

Hint: Plot $Y$ against $X$ as in the figure, and compute $F_Y(y)$. For example, $$\Pr\{Y \le 1/2\} = \Pr\{-1\le X\le-1/2\} + \Pr\{0\le X\le1/2\}.$$ • @stos1512 Can I say $Y \le 1/2$ iff $-1 \le X \le -1/2$ or $0\le X \le 1/2$? – Math Lover Feb 28 '18 at 22:24
• @stos1512 This is the sketch of the function $Y$ as defined by you. You have to find the CDF of $Y$ from this sketch by considering appropriate regions for the preimages of $Y$ for different $X$. – StubbornAtom Mar 1 '18 at 4:19