Help Understanding Evaluation of Integral Please help me to understand the evaluation of this integral.
$$\int_0^1\int_u^{\mathrm{min(1,u+z)}} 2\;dv\;du$$
I know that the correct answer is
$$
   f(z) = \left\{
     \begin{array}{lr}
       1 & & z \geq 1\\
       2z & &  z \leq 0\\
       -(z-2)z && \mathrm{else}
     \end{array}
   \right.
$$
But I've been staring at this for a while and I don't understand the evaluation when $z$ is greater than or equal to 1. It seems like it should be $2-2u$. And in the "else" case, I don't know how to evaluate that.
Any help would be appreciated.

Note that the limits of integration on $u$ are $u \in [0,1]$.  So for $u$ in this interval, and for $z \ge 1$, it follows that $u + z \ge 1$, hence $\min\{1, u+z \} = 1$, and the integral becomes $$\int_{u=0}^1 \int_{v = u}^1 2 \, dv \, du = \int_{u=0}^1 2(1-u) \, du = 1.$$
