$U$ and $V$ are uniform random variables over $0<u<1$ and $1<v<2$ respectively; the question is to calculate the density function for $W=V-U$. How would we go about this?
My method was to graph the square where the PDFs of $U$ and $V$ are 1, graph the line giving the region for $V<U+W$ (plotting $U$ as x and $V$ as y) and just take the area of the overlap region as the CDF for $W$ (then differentiate it to find the PDF). I finally ended up with
$f(w) = 0$ for $w<0$, $f(w) = w$ for $0<w<1$, $f(w)=2-w$ for $1<w<2$, $f(w)=0$ for $w>0$.
Is this correct? If not, what have I done wrong in the method?