Let $\{a_n\}$ be a sequence of distinct points in $[0,1]$ and let $f:[0,1]\to\mathbb R$ be given by $f(x)=\frac{1}{n}$ provided $x=a_n$ and $f(x)=0$ otherwise. Using only definitions, prove that $$\int_0^1 f(x)dx$$ exists in the sense of Riemann and Darboux.
Darboux. The lower sum $L(f,P)$ is zero for any partition $P$ because any interval of partition contains points other than $a_n$ (since $(a_n)$ is countable whereas intervals are uncountable). It suffices to show that $U(f,P) < \epsilon$ for any $\epsilon > 0$ and some partition $P$. Obviously $U(f,P)$ is bounded by $1$: $U(f,P)=\sum_{i=1}^nM_i\Delta x_i\le \sum_{i=1}^n1\cdot \Delta x_i=1$, but I'm not sure how it can be done $< \epsilon$.
Riemann. We need to show that the limit $\lim_{n\to \infty} \sum_{i=1}^nf(\xi_i)\Delta x_i$ exists. Here I have a doubt: can the sample points $\xi_i$ be chosen as we wish? If so, then we could choose points other than $a_n$, and then $f(\xi_i)$ will be zero, and the limit will be zero. But I have the feeling that this doesn't work.
It's obvious that $$\underline{\int_0^1} f(x) \,\text{d}x \geq0.$$ Since for any $2$ functions, $g$ and $h$, that have the property that the set $\{x: g(x)\neq f(x) \}$ is finite, their upper integrals are equal (same for lower integrals), we know that for any $n\in\mathbb{N}$, $$\overline{\int_0^1} f(x)\,\text{d}x = \overline{\int_0^1} \min\{f(x), \frac{1}{n}\}\,\text{d}x \leq\frac{1}{n}. $$ Since $n$ is arbitrary, $$\overline{\int_0^1} f(x)\,\text{d}x \leq0. $$ From definition of Darboux integral: $$ \int_0^1 f(x)\,\text{d}x =0.$$ Of course it means the integral exists.