# Show that the following function is Riemann integrable.

## Homework Statement

Show that the function f: [0,1] -> R defined by:

f(x) = 1, if x=1/k for some k
f(x) = 0, else

is Riemann integrable on [0,1]

## The Attempt at a Solution

I attempted the problem using Cauchy's criterion but found that this function is not Riemann integrable, am i right? or am i going about this the wrong way.

First of all, by looking at the function, you should be able to see immediately what the lower sums should be and therefore what the value of the integral must be. So you just have to prove that the infimum of the upper sums is the right thing. This you do by constructing, for any $$\varepsilon > 0$$, a partition of $$[0,1]$$ such that the upper sum with respect to this partition differs from the value of the integral by less than $$\varepsilon$$.