## Iterated Integrals III

I recently heard a characterization (if someone remembers the source, please let me know) of the situation in analysis as being that there are no theorems — only conjectures that don’t yet have counterexamples. Today’s counterexample is adapted from one in Apostol’s book, but it’s far simpler than his seems to be.

We might guess that we can always evaluate double integrals by iterated integrals as we’ve been discussing. After all, that’s exactly what we do in multivariable calculus courses as soon as we introduce iterated integrals, never looking back to all those messy double and triple Riemann sums again. Unfortunately, the existence of the iterated integrals — even if both of them exist and their values agree — is not enough to guarantee that the double integral exists. Today, we will see a counterexample.

Let be the set of points in the unit square so that and , where and are two fractions with the same denominator, each of which are in lowest terms. That is, it contains the point , but not the point , since when we write these latter two fractions in lowest terms they are no longer over a common denominator. We will consider the characteristic function , which is on points in and elsewhere in the unit square.

First, I assert that both iterated integrals exist and have the same value. That is

Indeed, the set is symmetric between the two coordinates, so we only need to evaluate one of these iterated integrals and the other one will automatically have the same value.

If is an irrational number in , then there is no at all so that . Thus we can easily calculate the inner integral

On the other hand, if is a rational number, we can write it in lowest terms as . Then there are only a finite number of points having the same denominator at all. Thus we can break the interval into a finite number of pieces, on each of which the characteristic function has the constant value zero. Thus we can calculate the inner integral

And so we see that for any the inner integral evaluates to . Then it’s easy to calculate the outer integral

and, as we said before, the other iterated integral also has the value .

On the other hand, the double integral does *not* exist. Yes, is countable, and so it has measure zero. However, it’s also dense, which means is discontinuous *everywhere* in the unit square.

Saying that is dense in the square means that every neighborhood of every point of the square contains some point of . Indeed, consider a point in the square and some radius . Since the real numbers are Archimedean, we can pick some , and as many people on Nick‘s Twitter experiment (remember to follow @DrMathochist!) reminded us, there are infinitely many prime numbers. Thus we can pick a *prime* . Then we can round up to the next larger fraction of the form , which will be in lowest terms unless , in which case we round down to . Similarly, we can round up (or down) to a fraction in lowest terms. This gives us a new point , and we can calculate the distance

So there is a point in within any radius of .

But now when we try to set up the upper and lower integrals to check Riemann’s condition we find that *every* subinterval of any partition must contain some points in and some points not in . The points within tell us that the upper sum gets a sample value of for each subinterval, giving a total upper sum of . Meanwhile the points outside of tell us that the lower sum gets a sample value of for each subinterval, giving a total lower sum of . Clearly Riemann’s condition fails to hold, and thus the double integral

fails to exist, despite the iterated integrals existing and agreeing.

[...] mask we’ll use is the characteristic function of , which I’ve mentioned before. I’ll actually go more deeply into them in a bit, but for now we’ll recall that the [...]

Pingback by Integrals Over More General Sets « The Unapologetic Mathematician | December 22, 2009 |

Isn’t this an example of where Lebesgue integration is “better” than Riemann integration? Since S is a measurable set and it has measure zero, the Lebesgue integral of its characteristic function exists and is zero. Period. No messing with iterated integrals, etc. Or am I missing something here?

Comment by Anon 1 | December 26, 2009 |

Anon, yes the Lebesgue integral would handle this example right away, but that’s not what I’m trying to illustrate.

The point is that in multivariable calculus classes we tend to introduce iterated integrals and show that when the double integral exists the iterated integral yields its value. This much is fine, but then we commit the converse error and act as if the existence of the iterated integral (much less the existence and equality of all of them) justifies the existence of the double integral. This is true for pretty much any of the examples such classes see, but it’s very much not the case in general.

Comment by John Armstrong | December 26, 2009 |