# Show that f is Riemann integrable

Let $f:[0,1] \rightarrow R$ defined by $f(x) = 2$ if $x = \frac{1}{n}$ for some $n∈ℕ$, $0$ otherwise. Determine if $f$ is Riemann integrable.

My attempt: Let $ε > 0$. Construct a partition P as follows: let $x_0 = 0, x_1 = ε$, and let $x_1, x_2, . . . , x_m = 2$ be a uniform partition of $[ε, 2]$ of norm $δ = \frac{ε^2}2$. We need to estimate the difference between the upper and lower sums of h with respect to P. The contribution to $$U(h, P) − L(h, P) (∗)$$ from the interval $[0, ε]$ is, at most $ε$. The contribution to (∗) from the interval $[ε, 2]$ is bounded above, by $δ$ times the number of points of the form $\frac1n$ in the interval $[ε, 2]$, which in turn is at most $4ε^{−1}$. It follows that (∗) is at most $\fracε2 + δ · 4ε^{−1} = ε$. By the Criterion of Integrability we conclude that $f$ is integrable.

1. There will usually not be a uniform partition of $[\varepsilon/2,1]$ of norm exactly $\varepsilon^2/4$, but any finer partition than that will do the job. For clarity you might simply calculate an $m$ large enough for the job.
3. You forgot that $f=2$, not $1$, at the points where it is nonzero. Thus your estimates are actually all off by a factor of $2$.
• @Leaf You haven't fixed the $2$ issue at all. You need to go back through everything and insert factors of $2$ pretty much everywhere. Anyway, the norm of a uniform partition of $[\varepsilon/2,1]$ containing $m-1$ subintervals is what? How big must $m$ be for this to be less than some given positive number $\gamma$? – Ian Jul 21 '16 at 14:56
• @Leaf Nope; now you've tried to make a partition of $[0,2]$ and your estimates still don't go through quite how you say they do. (When I said "insert factors of $2$", I didn't actually mean by multiplication; in most places it actually winds up being by division. You need smaller $\delta$ to control the spikes than you thought because the spikes are bigger than you thought.) It was actually better (but not quite correct) before. – Ian Jul 21 '16 at 15:37