TITLE: Prove that $\int_a^b \left( \int_c^d f(x,y)dy\right) dx=\int_c^d \left( \int_a^b f(x,y)dx\right) dy$
QUESTION [7 upvotes]: Let $f$ be continuous function on $[a,b]\times [c,d]$. Prove that
Prove that $$\int_a^b \left( \int_c^d f(x,y)dy\right) dx=\int_c^d
 \left( \int_a^b f(x,y)dx\right) dy$$

First of all, note that $ \int_c^d f(x,y)dy$ is continuous in $x$ and $ \int_a^b f(x,y)dx$ is continuous in $y$ so both integrals exist.
We have
$$\frac{d\left[\int_a^b \left( \int_c^t f(x,y)dy\right) dx \right]}{dt}=\int_a^b f(x,t) dx$$
(We used differentiation under the integral sign and the fundamental theorem of calculus)
Also
$$\frac{d\left[\int_c^t
 \left( \int_a^b f(x,y)dx\right) dy \right]}{dt}=\int_a^b f(x,t) dx$$
(Here we used the fundamental theorem of calculus)
Thus $$\int_a^b \left( \int_c^t f(x,y)dy\right) dx-\int_c^t
 \left( \int_a^b f(x,y)dx\right) dy$$
as a function of $t$ is constant on $(c,d)$.
It remains to show that this constant is $0$. How can I do this?

REPLY [5 votes]: Denote by $g$ the function $g \colon [c,d] \to \mathbf R$ 
$$ g(t) = \int_a^b \left(\int_c^t f(x,y)\, dy\right)\, dx - \int_c^t \left( \int_a^b f(x,y)\, dx\right) \, dy $$
you consider. Then $g$ is continuous on $[c,d]$, differentiable on $(c,d)$ and has $g'(t) = 0$ for $t \in (c,d)$ (you've proven this above). Hence (by the mean value theorem), $g$ is constant on $[c,d]$ (this also follows by continuity from the constantness on $(c,d)$). Therefore, for all $t$: $g(t) = g(c)$. But $g(c) = 0$, as both summands are $0$.