Showing that a discontinuous function is integrable

Faris
Hi,
First, I want to thank you people for the help.

1. Define a function f by setting f(x)=1 if x=1/m for some positive integer m (e.g. f(1)=1, f(1/2)=1, f(1/3)=1,...) and f(x)=0 otherwise. Show that f is integrable on the interval [0,1] by proving that the limit of the lower Riemann sums for the regular partitions P_n equals the limit of the corresponding upper Riemann sums.

2. Lower Riemann sum = L(f,P_n)
Upper Riemann sum = U(f,P_n)

3. I've tried the following argument, but I don't think it's enough for a proof:

L(f,P_n) = 0 because by taking n to infinity, the minimum values for f(x) in the delta x's are zeros, which makes L(f,P_n)=0.

U(f,P_n), however, is the problem here.

Hint: If you have a partition $P_n$, then each piece of a partition that contains a point where f is nonzero has an area of $\frac{1}{n}$. What you need to show is that for any $\epsilon$, there is an $n$ such that no more than $n\epsilon$ of the pieces contain a point where f is nonzero.
Let $\epsilon=0.1$. Show that you can make $U,P_{1000} \le \epsilon$ by covering every value 1/n (for positive integers n) by selecting 100 intervals from $P_{1000}$.