14

Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be defined by setting $f(x)=1/q$ if $x=p/q$, where $p$ and $q$ are positive integers with no common factor, and $f(x)=0$ otherwise. Show that $f$ is integrable over $[0,1]$.

I'm using the Darboux definition of integration, so I want to prove that for any $\epsilon>0$ there exists a partition $P$ of $[0,1]$ such that $U(f,P)-L(f,P)<\epsilon$. Equivalently, there exists a partition $P$ of $[0,1]$ such that $$\sum_Rv(R)(M_R(f)-m_R(f)) < \epsilon$$ where $M_R(f)$ is the supremum of $f$ inside interval $R$, $m_R(f)$ is the infimum of $f$ inside interval $R$, and $R$ ranges over all intervals in the partition.

So I tried taking $P=[0,\dfrac1n,\dfrac2n,\ldots,1]$. The sum in question becomes $$\dfrac1n\sum_{i=0}^{n-1}(M_{[\frac{i}{n},\frac{i+1}{n}]}(f)-m_{[\frac{i}{n},\frac{i+1}{n}]}(f))$$

I know that $m_{[\frac{i}{n},\frac{i+1}{n}]}(f)=0$, because in the interval $[\dfrac{i}{n},\dfrac{i+1}{n}]$ there is an irrational number, so the sum reduces to $$\dfrac1n\sum_{i=0}^{n-1}M_{[\frac{i}{n},\frac{i+1}{n}]}(f)$$

I don't really know anything about the fraction with lowest denominator inside $[\dfrac{i}{n},\dfrac{i+1}{n}]$. How can I prove that this sum goes to $0$ as $n\rightarrow\infty$?

Paul S.
  • 3,483

3 Answers3

20

In the Darboux version, you don't have to use partitions of the special type where every subinterval has the same length $1/n$. My suggestion: Let $A_n$ be the set of all the fractions whose denominator is at most $n$, then surround each element $a$ of $A_n$ by a small interval $I_a$, in such a way that the total length of these intervals is less than $\epsilon/2$. (or some other sub-part of given $\epsilon$). Now you know that on the complement of these intervals so far chosen, all the denominators exceed $n$. From here it should work out.

Note: the order of choices here is important. We are given $\epsilon$. Next we choose $n$ such that $1/n<\epsilon/2,$ and using that $n$ we look at $A_n$ and make the intervals $I_a$ around each $a \in A_n$ of total length less than $\epsilon/2$. Then on the rest of the interval $[0,1]$ the function is at most $1/n<\epsilon/2$, so we finally get the upper sum for the partition less than $\epsilon.$

coffeemath
  • 30,190
  • 2
  • 34
  • 53
  • +1 But I cannot see why $\varepsilon/2$ would be needed, $\varepsilon$ would be sufficient as I see it. – AD - Stop Putin - Aug 30 '13 at 15:11
  • 1
    @AD. I think it's because our sum is bounded by $\left(1-\frac{\varepsilon}{2}\right)\cdot\frac1n+\frac{\varepsilon}{2}\cdot 1$, so we need the $\varepsilon/2$. – Paul S. Aug 30 '13 at 15:13
  • @AD. I've just added a bit on the logic of the $\epsilon/2$ and $n$ choices. A little care in the order of choices is needed. – coffeemath Aug 30 '13 at 15:39
  • If you get the bound as any fixed multiple of $\epsilon$ (such as $17\epsilon$) that is good enough. This "have to get $\epsilon$ precisely" fetish is, imho, silly. – marty cohen Aug 30 '13 at 15:50
  • @martycohen I agree that one could use say $2\epsilon$, or certain other expressions involving $\epsilon$. The point about the order of choices is that one must somehow pick the $n$ first, so the part obtained by bounding $f$ on the intervals around points of $A_n$ is less than something controllable, and also the rest (bounded by $1/n$) is also controllable. – coffeemath Aug 31 '13 at 00:44
  • @PaulS. Yes, thanks I did not fully think it over. – AD - Stop Putin - Aug 31 '13 at 06:33
  • @martycohen I agree, except best bounding constants which is a good sport. – AD - Stop Putin - Aug 31 '13 at 06:37
  • Can you please explain this proof? How are we finding the supremum of the partitions?? – Alex Jan 27 '21 at 19:58
8

This function is called the Thomae's function and you can show that it is continuous at irrationals and discontinuous at rationals. In Lebesgue theory, we have a theorem which states that a bounded function on $[0, 1]$ is Riemann integrable if and only if it is continuous almost everywhere. Here the set of discontinuities has cardinality that of rationals so it has measure zero. Hence this function is integrable.

I understand that your question was to find partitions in order to prove the Riemann integrability (it's pretty similar to Darboux here). I will update this if I find a better way.

Robert Soupe
  • 14,999
Gautam Shenoy
  • 10,598
1

This problem can be found in Calculus by Michael Spivak, 3rd edition, Chapter 13, problem 34.

I'm commenting here to aid in searches.

Spivak's solution contains possibly misleading wording and some typos. It says to make the intervals have total length $<\varepsilon/2$. He means the total sum of all their lengths. He also writes "$1,\dots,n$" which I think should be "$1,\dots,m$" instead.

Ben
  • 1,595