# Homework Help: Thomae Function

1. Mar 1, 2012

### c1fn

1. The problem statement, all variables and given/known data
Show the Thomae's function f : [0,1] → ℝ which is defined by $f(x) = \begin{cases} \frac{1}{n}, & \text{if x = \frac{m}{n}, where m, n \in \mathbb{N} and are relatively prime} \\ 0, & \text{otherwise} \end{cases}$ is Riemann integrable.

2. Relevant equations
Thm: If fn : [a,b] → ℝ is Riemann integrable for each n, and fn → f uniformly on [a,b], then f is Riemann integrable.

Trying to do this without invoking any sort of measure theory/Lebesgue integration.

3. The attempt at a solution
I've been stumped on this one for awhile now. Basically I've been trying to construct a sequence of Riemann integrable functions from [0,1] to ℝ that are continuous (and therefore Riemann integrable) that converge uniformly to Thomae's function. Unfortunately, I haven't been able to construct such a sequence of functions. The function that I'm trying to "tweak" right now is:

gn : [0,1] → ℝ defined by $g_n = x \cos^{2n}(p! \pi x)$.

I need to show that gn is continuous for each n (easy). I need to show that gn converges uniformly to the function g : [0,1] → ℝ given by

$$g(x) = \begin{cases} x, & \text{if x=k/p!, where 0 \leq k \leq p!} \\ 0, & \text{otherwise} \end{cases}$$

Here lies a bit of a mental barrier for me. I know that I haven't showed that g(x) = f(x), but I'm having trouble showing that gn → g uniformly since the value of g depends pointwise on x. I argue that if x is of the form k/p!, where 0 ≤ k ≤ p!, then gn(x) → g(x) uniformly (i can show this). Then I argue that this implies that if y is "otherwise," then gn(y) → g(y) uniformly as well since g(y) ≤ g(x), where x is of the form mentioned above.

Anyways, I'm having a hard time believing my own argument. Does this work? If it doesn,t is it even possible to construct a sequence of continuous functions converging uniformly to Thomae's function?

2. Mar 1, 2012

### Bacle2

Do you know of any results relating the set of points of continuity to Riemann

integrability?

3. Mar 1, 2012

### c1fn

No I don't. I need to show this using uniform convergence (if that is possible).

4. Mar 1, 2012

### Bacle2

A suggestion:

Try defining a sequence that mimicks/approaches the Thomae function.

Start with an enumeration of the rationals, and assume they are given

in reduced/lowest form. Then define f_n(x). You can

start by defining f_1(x)=1/m for x=a_1, and ? otherwise . Does that help?

I'm sorry, I must go for a few hours; if I'm not back tonight, I will be back tomorrow.

Last edited: Mar 1, 2012
5. Mar 1, 2012

### c1fn

Sorry I'm a bit confused when you say an enumeration of the rationals. Arn't the only rationals we're concerned about between 0 and 1? Can you elaborate a bit more on how you're defining f_n and what is a_1?

6. Mar 1, 2012

### Bacle2

Yes, sorry, I meant the rationals in [0,1]. Since the rationals are countable,

we can arrange them as a sequence {rn} , which assigns to n the

n-th rational, and we assume we have these rationals in lowest terms, i.e., if

rn=an/bn, then :

gcd(an,bn)=1

( this reduction is always possible, e.g., by the

fund. thm of arithmetic ). Now, I'm trying to suggest how to construct the sequence : we

want a sequence {f_n} of

functions that converges to the Thomae function uniformly. We can then define the first

term f1 of the sequence like this:

f1(r1)=f(a1/b1):=1/b1, and

f1(x)=0 for x in [0,1]\{r_1}; f_2(a_1)=1/b_1 ; f_2(a_2)=1/b_2 ; f:[0,1]\{r_1\/r_2}=?

Can you see how to continue defining f2(r_n), and then fn?

Does that help?

Last edited: Mar 2, 2012
7. Mar 2, 2012

### c1fn

Yes. That makes perfect sense. Thank you. Currently I'm working on showing fn → f uniformly.