# Prove the following function is Riemann Integrable on $[0,1]$.

Suppose that $f:[0,1] \to \mathbb{R}$ is defined by $f(x) = 1$ when $x = \frac{1}{n}$ for some positive integer $n$ and $f(x) = 0$ otherwise. How can I prove that $f$ is Riemann integrable on $[0,1]$?

-

3
Cover each $x = \frac1n$ by interval of size $\frac{\epsilon}{2^n}$ i.e. consider intervals around $\frac1n$ as $\left(\frac1n - \frac{\epsilon}{2^{n+1}}, \frac1n + \frac{\epsilon}{2^{n+1}} \right)$ – user17762 Dec 9 '11 at 2:51
@Sivaram Perhaps I am missing something, but I am unsure how to proceed from your hint. Doesn't Riemann integration consider only finite partitions of $[0,1]$? – Srivatsan Dec 9 '11 at 2:55

2
@Srivatsan: This should go with the previous hint. Choose $N$ such that $\frac1N < \frac{\epsilon}{2}$. For all $n < N$, cover each $x = \frac1n$ by interval of size $\frac{\epsilon}{2^{n+1}}$ i.e. consider intervals around $\frac1n$ as $\left(\frac1n - \frac{\epsilon}{2^{n+2}}, \frac1n + \frac{\epsilon}{2^{n+2}} \right)$ and for the rest use an interval of the form $[0,\epsilon/2)$ – user17762 Dec 9 '11 at 2:59
– Henry Shearman Dec 9 '11 at 3:00

## 2 Answers

Here's a more elementary argument. We show that for every tagged partition $P$ of $[0,1]$ of norm at most $\varepsilon \gt 0$, the lower and upper Riemann sums $L(f; P)$ and $U(f;P)$ of $f$ satisfy $$0 \leqslant L(f, P) \leqslant U(f;P) \leqslant 2\sqrt{\varepsilon} . \tag{1}$$ The Riemann integrability of $f$ follows as a consequence. The lower bound is obvious; we show only the upper bound of $O(\sqrt{\varepsilon})$ here.

Fix a parameter $t \in (0,1)$ (to be determined later). Without loss of generality With a modest loss in generality, assume that $t$ is the endpoints of two intervals in $P$. [I leave it to the OP to remove this assumption.] The strategy is to bound the contributions of the two types of intervals individually:

• Those that fall to the left of $t$ (i.e., those that are a subset of $[0, t]$). The contribution from these intervals to the Riemann sum is at most $t$, the total length of the left part (since the function is always bounded above by $1$ in magnitude).

• Those that fall to the right of $t$ (i.e., those that are a subset of $[t, 1]$). Of all such intervals, at most $1/t$ of them contain a point of the form $1/n$. Therefore, all but $1/t$ of them contribute zero to the Riemann sum. Since each of these intervals is of length at most $\varepsilon$, the total contribution of these to the Riemann sum is at most $\varepsilon \cdot \frac{1}{t} = \frac{\varepsilon}{t}$.

Adding the two contributions above, we get that the total Riemann sum is at most $t + \frac{\varepsilon}{t}$. Picking $t = \sqrt{\varepsilon}$ to optimise this upper bound, we get $(1)$.

-

The discontinuities of the function are in the form $x=\frac{1}{n}$. Using the given hint by Sivaram Ambikasaran in the comments to construct covering intervals, you can show that the set

$$D=\left\{x\in[0,1]:x=\frac{1}{n}\right\}$$

has measure zero which satisfies the Lebesgue criterion for integrability.

-

4
Applying the Lebesgue criterion for this problem seems like an overkill. :-) – Srivatsan Dec 9 '11 at 3:01

2
This is a nice and probably the efficient way to go provided the OP knows Lebesgue integral in the first place. – user17762 Dec 9 '11 at 3:07
Probably is overkill, but the interval construction works very nicely in showing that the sets have measure zero. – Henry Shearman Dec 9 '11 at 3:08

2
The extra work to get a finite partition is so small, why not go ahead and do it? – GEdgar Dec 9 '11 at 20:07
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 47, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9154782891273499, "perplexity_flag": "head"}