How do I find the cdf of $X_1 + X_2$? $X_1$ uniform $(0,1)$ and $X_2$ uniform $(0,2)$
$$
\begin{cases}
f(x_1,x_2) = \frac{1}{2}, &\quad  \mbox{for} \  0<x_1<1, 0<x_2<2 \\
0, & \quad \mbox{otherwise}
\end{cases}
$$
The density of $X_1+X_2$:
$$
f(x_1,x_2) =
  \begin{cases}
    \displaystyle \frac{z}{2}       & \quad 0<z<1\\
    \displaystyle \frac{1}{2}  & \quad 1<z<2\\
\displaystyle \frac{3-z}{2} & \quad 2<z<3\\
  \end{cases}
$$
The question is how do I find the cdf of $X_1+X_2$?
I would do:
$$
f(x_1,x_2) =
  \begin{cases}
    \displaystyle \int_0^z \frac{z}{2} dx =\frac{z^2}{4},       & \quad 0<z<1\\
    \displaystyle \int_0^1 \frac{1}{2} dx =\frac{1}{2},    & \quad 1<z<2\\
  \end{cases}
$$
That just seems wrong.. Help
 A: We have been given that: $$~f_{X_1,X_2}(s,t)= \tfrac 12 \mathbf 1_{s\in [0;1],t\in [0;2]}$$
  Where $~\mathbf 1_{E}=\begin{cases}1 & : E\\ 0 & :\textsf{otherwise}\end{cases}~~$ is an indicator function of event $E$.
Are you aware that the density of the sum is the convolution:?
$$\begin{align}f_{X_1+X_2}(z)~=~&\int_\Bbb R f_{X_1,X_2}(s, z-s)\operatorname d s
\\[1ex] =~& \tfrac 12 \int_\Bbb R\mathbf 1_{s\in[0;1], s\in[z-2;z], z\in[0;3]}\operatorname d s
\\[1ex] =~& \tfrac 12 \int_\Bbb R \mathbf 1_{s\in[0,z],z\in[0;1)}+\mathbf 1_{s\in[0,1],z\in[1;2)}+\mathbf 1_{s\in[z-2,1],z\in[2;3]}\operatorname d s
\\[1ex] =~& \tfrac 12\big(z\,\mathbf 1_{z\in[0;1)}+\mathbf 1_{z\in[1;2)}+(3-z)\,\mathbf 1_{z\in[2;3]} \big)
\\[2ex] f_{X_1+X_2}(z)~=~& \begin{cases}z/2 & : 0\leq z< 1\\ 1/2 & : 1\leq z< 2 \\ (3-z)/2 & : 2\leq z\leq 3 \\ 0 & : \textsf{otherwise} \end{cases}
\end{align}$$
Then the CDF is $$\begin{align}F_{X_1+X_2}(z) ~=~& \int_{-\infty}^z f_{X_1+X_2}(u)\operatorname d u
\\[1ex] =~& \tfrac 12 \begin{cases} 0 & : z<0
\\ \int_0^z u\operatorname d u & : 0\leq z< 1
\\ \int_0^1 u\operatorname d u + \int_1^z 1\operatorname d u & : 1\leq z< 2
\\ \int_0^1 u\operatorname d u + \int_1^2 1\operatorname d u + \int_2^z (3-u)\operatorname d u & : 2\leq z\leq 3
\\ 1 & : 3 < z
\end{cases}
\\[1ex] ~=~& \tfrac 12 \begin{cases} 0 & : z<0
\\ z^2/2 & : 0\leq z< 1
\\ 1/2 + (z-1) & : 1\leq z< 2
\\ 1/2 + 1 + (3z-z^2/2)-4 & : 2\leq z\leq 3
\\ 1 & : 3 < z
\end{cases}
\\[2ex] F_{X_1+X_2}(z) ~=~& \tfrac 14 \begin{cases} 0 & : z<0
\\ z^2 & : 0\leq z< 1
\\ 2z-1 & : 1\leq z< 2
\\ 4-(3-z)^2 & : 2\leq z\leq 3
\\ 1 & : 3 < z
\end{cases}
\end{align}$$
A: The PDF of $Y = X_1 + X_2$ is the convolution of the PDFs of $X_1$ and $X_2$
$$f_Y (y) = \begin{cases} \dfrac{y}{2} & \text{if } y \in [0,1]\\\\ \dfrac{1}{2} & \text{if } y \in [1,2]\\\\ \dfrac{3-y}{2} & \text{if } y \in [2,3]\\\\ 0 & \text{otherwise}\end{cases}$$
Integrating, we obtain the CDF
$$F_Y (y) = \begin{cases} 0 & \text{if } y < 0\\\\ \dfrac{y^2}{4} & \text{if } y \in [0,1]\\\\ \dfrac{1}{4} + \dfrac{y-1}{2} & \text{if } y \in [1,2]\\\\ \dfrac{3}{4} + \dfrac{3}{2} (y-2) - \dfrac{1}{4} (y^2 - 2^2) & \text{if } y \in [2,3]\\\\ 1 & \text{if } y \geq 3\end{cases}$$
