## Thursday, November 12, 2009

### Thomae's Function and Integrability

Thomae's Function is something we've discussed in advanced calc a few times - it's basically a sort of pathological function that is discontinuous at every rational number. I've drawn a picture here, along with the definition:

For irrational numbers, the value of f(x) is zero, and for rational numbers (other than 0), it's 1 over the denominator in reduced terms, so for instance f(1/5) = f(2/5) = f(3/5) = 1/5.

Between any two real numbers, there is a rational number, and between any two real numbers, there is an irrational number, so there are two things to notice here, to wit:
1. the x-axis is extra black because there are infinite irrational points on this interval [0, 1] that are irrational so that f(x) = 0
2. points below 0.1 on the y axis aren't shown, but would continue this sort of ever-thickening pyramid structure all the way down

When Newton and Leibniz invented caculus, they conceived of integration solely as using antiderivatives. That is, if you have two functions, F and f, such that the slope of F at a point x is the value of f(x) -- i.e., F'(x) = f(x) -- then f is the derivative of F, and F is the antiderivative of f. By the Fundamental Theorem of Calculus, you can use an antiderivative to calculate a definite integral of f - that is, to find the area under the f(x) curve between two points (the area of S in this picture):

Now, obviously, you can't conceive of integration in quite the same way for something like Thomae's function. It can't possibly have an antiderivative - even if you can make a function with that kind of infinitely discontinuous slope, which I can't imagine you could, it wouldn't have a derivative.

So in the 19th century, a different way of conceiving of integrals was conceived. In calculus, you learn about Riemann sums. Basically, if you divide the area under the curve into vertical boxes, and then calculate the area of each box, that's an approximation of the area under the curve. The more boxes you have, the closer your approximation gets to the actual value, and the limit of those approximations is the area under the curve, as in this picture:
It turns out that using a method similar to this, Thomae's function can be integrated on the interval [0, 1]. The method is called "Darboux Sums."

One question when you use Riemann sums is how to calculate the height of each box. An easy way to do it is to use the leftmost or rightmost edge of the box as the height. As long as you use some method, it actually doesn't really matter what it is -- the approximations will still get better and better -- but Darboux does it a particular way.

Specifically, for Darboux sums you get an upper sum and a lower sum. For the upper sum, you use, as the height of each box, the highest value inside of that box, and for the lower sum, you use the lowest value inside of each box. You then add up the areas of all of the boxes, and that gives you an upper sum and a lower sum for the integral.

What next? Darboux's Criterion for Integrability is a theorem that says that if, given an error amount (epsilon), there is a way to divide up the function (i.e., a placement of the boxes - they don't all have to be the same width) such that the difference between the upper and lower sums is less than epsilon, the function is integrable.

If we apply this method to Thomae's function, no matter how we partition the function, the lower Darboux sum will always be 0, because every interval will contain irrational numbers. Since, if it's integrable, the upper sum has be able to be made arbitrarily close to the lower sum, it's clear that, if we can integrate Thomae's function on [0, 1], the result (the area under the "curve," if you will) must be 0.

And it turns out that we can indeed get the upper sum to be as close as we want to 0 (though never actually 0 - but that is never required in calculus, which deals in limits). I won't go through the proof of that, but it relies on the fact that, basically, if you draw a horizontal line somewhere above 0 in this function, there will only be a finite number of points above that line. Then you can just make the boxes that contain those points skinny enough that their overall area is arbitrarily low, and there you go.

Anonymous said...

It's not very easy to realize there's only a finite number of numbers with f(x)=1/q who are bigger than 1/N

its a major step of the proof, so you should say more about it

Tam said...

Sure.

What I said in my summary above is that, if you draw a horizontal line between 0 and 1, there are a finite number of points of the form 1/n above that line, for some natural number n.

Let's say you draw the line y = 0.21. Then the 1/n values that work are 1/1, 1/2, 1/3, and 1/4. Any larger n's lead to numbers that are less than 0.21 (for instance, 1/5 is 0.2).

Even if you choose a very low value, there are still a finite number. For instance, y = 0.01 is 1/100, so for 1/n to be higher than 0.01, n must be lower than 100. And so on.

Anonymous said...

Anonymous,

This should be clear by the well-ordering principle of positive integers. If 1/q > 1/N, then q < N. Since N is finite, then there only a finite number of possible q such that 0 < q < N. Remember, we are choosing q such that q is an integer, so this works.