Note that it’s assumed that the reader is familiar with Riemann Darboux integrals. This includes the next theorem:
Theorem (Integrals with Epsilon): Let
be a bounded function on
Then,
is Riemann integrable if and only if for all
there exists a partition of
such that
Where and
are upper and lower sums.
Let’s Begin!
We’ve seen in the past (here) that Thomae’s Function aka The Stars over Babylon aka The Popcorn Function defined below is continuous on irrational numbers and discontinuous on the rational. Today, we will see that Thomae’s function is Riemann integrable using the above theorem.

Very strange indeed. Here’s a great visualization of T before we study it.

By Smithers888 – Own work, Public Domain, https://commons.wikimedia.org/w/index.php?curid=4957683
***Note: The numbers and
are integers***
Theorem (Popcorn is Integrable): Define
as the restriction of the function above. Then
is integrable.
Proof: (Click in the Discovery)
Let First, note that
is bounded on
so it makes sense to ask if it is Riemann integrable. We aim to prove that
is integrable using by showing that there is a partition of
such that,
To this end, consider the such that
We first claim that there are only finitely many such
That is,
is a finite set. To see this, go back to the definition of Without loss of generality, suppose that
then there are
where,
Since there are only a finite number of integers there is only a finite number of
such that
Let’s denote them,
Next, we claim that for all partitions of
This follows from the fact that for all subintervals
there is an irrational number
so that
It follows that
Thus, our task reduces to finding a partition of
such that
With this goal in mind, consider the following partition,
Note, for all intervals of the form: , we have
Also, for the intervals of the form
, we have
Let
, it follows,
Where the first line of terms come from the intervals that do not contain any
For all these intervals we use that
The last sum is for the intervals that contain the
We use 1 as an upper bound of
Note all the cancelation that happen between the terms with
Thus, is Riemann integrable.
That’s a Wrap
We have proven another interesting property of the popcorn function. We know that continuous on irrational numbers and discontinuous on the rational and now we know that it’s Riemann integrable on any closed interval. There was enough information in the proof for you to be able to deduce
leave your answer in the comments!
I hope you had some fun today! Remember math is supposed to be fun!
Be Kind. Be Curious. Be Compassionate. Be Creative.
And Have Fun!

Leave a comment