Show that $\boldsymbol 1_{\{1/n\mid n\in\mathbb N^*\}\cup\{0\}}$ Riemann integrable over $[0,1]$. Let $$\mathcal D=\left\{\frac{1}{n}\mid n\in\mathbb N^*\right\}\cup\{0\}.$$
Show that $\boldsymbol 1_{\mathcal D}$ is Riemann integrable over $[0,1]$.

Attempts

Let $f_n(x)=\boldsymbol 1_{\mathcal A_n}$ where $A_n=[0,\frac{1}{2^n}]\cup\bigcup_{k=1}^n\left[\frac{1}{k}-\frac{1}{2^n},\frac{1}{k}+\frac{1}{2^n}\right]\cap[0,1]$. We have that $\bigcup_{n\in\mathbb N^*}A_n=\mathcal D$, and that $(f_n)$ is a sequence of step function that converge pointwise to $\boldsymbol 1_{\mathcal D}$ and $(f_n)$ is decreasing. In particular, $$0\leq \overline{S}(f) \leq \frac{(n+1)}{2^n}\to 0.$$
Since $\underline{S}(f)=0$, the claim follow. I recall that $\overline{S}(f)=\inf_{\sigma }\{\overline{S}_\sigma\mid \sigma \text{ is a subdivision of }[0,1] \} $ and $\underline{S}(f)=\sup_{\sigma }\{\underline{S}_\sigma\mid \sigma \text{ is a subdivision of }[0,1] \} $

and $\overline{S}_\sigma =\sum_{i}M_i(x_{i+1}-x_i)$ and $\underline{S}_\sigma =\sum_{i}m_i(x_{i+1}-x_i)$ where $m_i=\min_{[x_{i},x_{i+1}]}f$ and $M_i=\max_{[x_i,x_{i+1}]}f$.
Here an "easy" construction. Let $\varepsilon&gt;0$ and $N$ s.t. $\frac{1}{N}&lt;\varepsilon$. Let $$\sigma _k : 0&lt;\frac{1}{kN}&lt;\frac{2}{kN}&lt;...&lt;\frac{k}{kN},$$

$$\tilde \sigma _k : \frac{k}{kN}&lt;\frac{k+1}{kN}&lt;...&lt;\frac{kN}{kN}=1,$$
and $$\tau_k: 0&lt;\frac{1}{kN}&lt;...&lt;1.$$

If I denote $S^{\sigma _k}(a,b)$ is the upper Darboux sum on $[a,b]$, we have $$S^{\tau _k}(0,1)=S^{\sigma _k}\left(0,\frac{1}{N}\right)+S^{\tilde \sigma _k}\left(\frac{1}{N},1\right) \leq \frac{k}{kN}+S^{\tilde \sigma _k}\left(\frac{1}{N},1\right)&lt; \varepsilon+S^{\tilde \sigma _k}\left(\frac{1}{N},1\right).$$

Now, you know that your function is piecewise continuous on $\left[\frac{1}{N},1\right]$ and thus integrable, and it's easy to prove that the integral is $0$. Therefore, $$\lim_{k\to \infty }S^{\tilde \sigma _k}\left(\frac{1}{N},1\right)=0,$$
and thus $$0\leq \bar S\leq \lim_{k\to \infty }S^{\tau_k}\leq \varepsilon+\lim_{k\to \infty }S^{\tilde \sigma _k}\left(\frac{1}{N},1\right)=\varepsilon.$$
We therefore proved that $\bar S=0,$ and the claim follow.
hint

Let $\epsilon&gt;0$ given.

at $[\epsilon/2,1] $, $f $ is a step function, and it is integrable .
thus
there exist a subdivision $\sigma $ of $[\epsilon/2,1] $ such that

$U (f,\sigma)-L (f,\sigma)&lt;\frac {\epsilon}{2} $

let $\sigma_1=\sigma \cup \{0\} $.
$$U (f,\sigma_1)-L (f,\sigma_1)=$$
$$\leq \frac {\epsilon}{2}+1.\frac {\epsilon}{2} $$

since $f $ is bounded at $[0,\frac {\epsilon}{2}] $.