I am working on the following problem and am struggling with how to come up with the particular limits of integration. I've done some maths voodoo to get part of the same argument as the solution, but I cannot explain why it works or defend that it is correct. I've always had problems with constraints.
Suppose that $X_1$ and $X_2$ are iid random variables and that each has a uniform distribution on the interval $[0,1]$. Find the p.d.f. of $Y = X_1 + X_2$.
I let $Z = X_1 \implies X_1 = Z$ and thus $X_2 = Y - Z$. To the the PDF of $Y$, I then use the following form an integrate out $Z$ since I want a function of $Y$.
\begin{align} \int_{-\infty}^\infty f(z, y - z) \,dz &= \int_{-\infty}^\infty f(z) f(y-z)\,dz \\ &= \int_{-\infty}^\infty\,dz \end{align}
Since $X_1$ and $X_2$ are both from $U[0,1$, I know that
(1) $0 \lt x_1 \lt 1$
(2) $0 \lt x_2 \lt 1$ and thus,
(3) $0 \lt z \lt 1$ and
(4) $0 \lt y \lt 2$.
This is where I get stuck. I can assume based by subtracting (3) from (4) that
(5) $0 \lt y - z \lt 1$.
The solution says I need to consider two cases: one where $0 \lt y \le 1$ and the other $1 \lt y \lt 2$. First off, I don't understand why.
(1) For $0 \lt y \le 1$, I surmise the integrand is positive if $0 < z < y$ by taking (5) and adding $z$ to both sides of the equation and applying the lower bound from (3). Is this legal?
(2) For $1 \lt y \le 2$, the solution says that the integrand is positive if $y - 1 < z < 1$. I don't know where this comes from.
I need help applying these constraints to get the limits of integration for the two cases.