Continuity of Intermediate Points I was looking at a proof of
$$\int_a^b \int_c^d f(x,y) \,dx \,dy = \int_c^d \int_a^b f(x,y) \,dy \,dx $$
where $f$ is continuous on $[a,b] \times[c,d]$.  The region is broken up into subrectangles $[x_{j-1},x_j] \times [y_{k-1},y_k]$ and the mean value theorem was used to claim there is a point $(\alpha_j,\beta_k)$ so that
$$\int_{x_{j-1}}^{x_j} \left(\int_{y_{k-1}}^{y_k} f(x,y) \,dy\right) dx = f(\alpha_j,\beta_k)(x_j - x_{j-1})(y_k - y_{k-1}).$$
I know this is always true when $f$ is continuous, but a question came up in my mind.  
If we first say when $x$ is fixed, there is a point $\beta(x)$ depending on $x$ so that
$$f(x, \beta(x))(y_k-y_{k-1}) = \int_{y_{k-1}}^{y_k} f(x,y) \,dy$$
do we know that $\beta(x)$ is continuous? 
Then of course we can apply the mean value theorem again to get
$$f(\alpha_j,\beta(\alpha_j))(x_j - x_{j-1}) = \int_{x_{j-1}}^{x_j} f(x, \beta(x)) dx$$
 A: It does not seem that $\beta(x)$ is necessarily continuous. For instance, suppose that $f$ has a lot of bumps. On the left side of the rectangle that you are integrating on the bumps are small in height, but on the right side the bumps are really high.
The slice at $\{x\} \times [y_{k-1}, y_k]$ will have average: $$\frac{1}{y_k - y_{k-1}}\int_{y_{k-1}}^{y_k}f(x,y)dy,$$ but this average could be satisfied at a point $\beta(x)$, but if $(x,\beta(x))$ is a local maximum for $f$ since it is at the top of a bump, then if the slice increases as $x$ increases, $\beta(x)$ will be stuck and will have to jump to another hill in order for the average on the slice to equal $f(x, \beta(x))$.
There are lots of proofs of this theorem. The main and maybe most easily gotten at is to use uniform continuity. Since $f$ is continuous on the rectangle you are integrating on, it is uniformly continuous. The point of this proof is apply the mean value theorem for integrals on the rectangle when you integrate first in $x$ then in $y$ and also for the integral when you integrate first in $y$ and then in $x$. That gives you two points: $(\alpha_j, \beta_k)$ and $(\tilde \alpha_j, \tilde \beta_k)$, but the important thing is that they are both in the rectangle. Since $f$ is uniformly continuous, $|f(\alpha_j, \beta_k) - f(\tilde \alpha_j, \tilde \beta_k)$ can be made small for all $j$ and $k$ (and even different numbers of "cuts" that you made it breaking the rectangle up into smaller rectangles) as long as you make the diameter of each rectangle small enough. (This is where a $\delta-\varepsilon$ would come in, if you know how to do those.)
You could also try approximating $f$ with a bunch of step functions $f_n$ with the property that $|f_n(x,y) - f(x,y)| < 1/n$, prove the theorem for any step function $f_n$ and then show that the iterated integrals converge to $f$ when the approximation of $f$ gets better (or more precisely, as $n \to \infty$). This is the type of proof that underlies the interchange of integrals for the more advanced theory of Lebesgue integration. (As, it turns out, I was just reading earlier this morning.)
