Let $\displaystyle f: \mathbb {R} \rightarrow \mathbb {R} $ be defined by $\displaystyle f(x) = 1 $ if $\displaystyle x= \frac {1}{n} \ \ \ n \in \mathbb {N} $, and $\displaystyle f(x) = 0$ otherwise.

Prove that $\displaystyle \int ^1 _0 f $ exist and find its value.

Question so far:

Define a partition P on [0,1] with $\displaystyle P = \{ a_0=0 , a_1,a_2,...,a_{N-1},a_N=1 \} $

Define $\displaystyle M_j = sup \{ f(x) : x \in [x_j,x_{j+1}]$

$\displaystyle m_j = inf \{ f(x) : x \in [x_j,x_{j+1}]$

So I need to show that for any given $\displaystyle \epsilon > 0 $, we will have $\displaystyle U(f,P)-L(f,P)< \epsilon $, but how should I process? Thanks.