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\}.$$