Fubini's Theorem
The reasoning of the previous pages can be summarized in a famous
theorem:
Fubini's Theorem: If $f(x,y)$ is
a continuous function on a rectangle $R = [a,b] \times
[c,d]$, then the double integral $\iint_R f(x,y)\,
dA$ is equal to the iterated integral $$\int_c^d
\left( \int_a^b f(x,y) \,dx\right )\, dy$$ and also to the iterated
integral $$\int_a^b \left(\int_c^d f(x,y)\,dy \right
)\, dx.$$ 
Example: Compute $\displaystyle\iint_R xe^y \,dA,$
where $R$ is the rectangle $[0,2] \times [0,1]$.
Solution: We can integrate
first over $x$.
\begin{eqnarray}
\iint_R xe^y \, dA & = & \int_0^1 \left (\int_0^2 xe^y\,
dx \right )\, dy\\
&=& \int_0^1 \left . \frac{x^2}{2} e^y \right _{x=0}^2 \,
dy \\
& = & \int_0^1 2 e^y\, dy \ = \ 2e2
\end{eqnarray}
Another solution: We can
integrate first over $y$. \begin{eqnarray}
\iint_R xe^y \, dA & = & \int_0^2 \left (\int_0^1 xe^y
\,dy \right )\, dx \cr \cr &=& \int_0^2 \left . x e^y
\right_{y=0}^1 \, dx \cr \cr & = & \int_0^2 (e1)x\, dx
\cr & = & \left . \frac{(e1)x^2}{2} \right _0^2 = 2e2.
\end{eqnarray}
Examples of unbounded and
discontinuous functions
$f(x,y)$ can be constructed where the iterated integral in one
order is different from the iterated integral in the opposite
order. But for any reasonable
function, you can integrate in either order.
