Originally Posted by

**Opalg** Given ε>0, choose n with 1/n < ε/(b–a). In the interval [a,b], there are only finitely many rational numbers with denominator ≤n. Let's say there are N of them. Surround each of these N points with an interval of length ε/N, and use the endpoints of these intervals to form a dissection of the interval [a,b]. It's not hard to check that the upper Riemann sum of the function h(x) for this dissection is less than 2ε (the function has an upper bound 1 in each of the N intervals, whose combined length is ε; and an upper bound 1/n in all the remaining intervals of the dissection, whose combined length is less than b–a). Since the lower Riemann sum for any dissection is zero, you can deduce from this that h is Riemann integrable over [a,b] (with integral zero).