Riemann integral of a function nonzero at countable points is zero

63 Views Asked by At

The problem is as follows.

Let $E = \left\{\frac{1}{n}: n \in \mathbb{N}\right\}$ and let $f: [0,1] \mapsto \mathbb{R}$ be such that $f(x) = 1 \text{ for } x \in E$, zero otherwise. Show that $f$ is integrable on [0,1] and find $ \int\limits_0^1 f $

My proof is as follows:

Let $\epsilon >0$. Construct a partition $P =$ {$x_{1},.. , x_{n}$} such that each interval $x_{i} -x_{i-1} < \epsilon$.

Now consider $U(P,f)$ Note that for each $\epsilon >0$, only finitely many points of E lie in $[x_{2},1]$. Let the number of points be M. Then $U(P,f) \leq \epsilon + m\epsilon$ and since $L(P,f) = 0$ for all partitions we have that for $P$, $U(P,f) - L(P,f) \leq (M+1)\epsilon$. Since $\epsilon >0$ was arbitrary, $f$ is integrable. then it also follows that $\inf U(P,f)=\sup L(P,f)=0 \text{ and thus } \int\limits_0^1 f = 0$

The solution that I found for this problem involved quite carefully creating the partitions, but I was wondering if this was sufficient, or if theres any important things that I've missed out.