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.