# Show this silly function is Riemann-integrable and find the integral

1. Sep 20, 2007

### quasar987

1. The problem statement, all variables and given/known data
See the title. The silly function in question is f:[0,1]-->R with f(x)=0 if x is irrational, and f(x)=1/q if x is rational and of the form x=p/q where p and q have no common factor.

2. Relevant equations

3. The attempt at a solution

I'm like 100% sure that I must show it is integrable by showing that the set of discontinuities is of measure zero and the natural assumption is that this set of discontinuities is the rationals in [0,1], but how do I show that?

I feel there is something I am missing about the p/q representation thing. If f is continuous on the irrational, then it must be that given an e>0 and an irrational y, there is a little disk around it y such that all rationals in that disk have 1/q<e. How come???

2. Sep 20, 2007

### genneth

How many rationals are there in an interval?

3. Sep 20, 2007

### Dick

Ok, if y is irrational and you are given e>0, let Q be an integer such that Q>1/e. Now let S be the set of rationals {p/q} where q<=Q. S is a finite set. So let the radius of the disk be delta=inf(|y-S|)>0.

4. Sep 20, 2007

### quasar987

That is ingenious!