The proof uses the
comparison test, comparing the term f(n) with the integral of f over the intervals [n-1,n) and [n,n+1) respectively. The monotonic function f is
continuous almost everywhere. To show this, let :D=\{ x\in [N,\infty)\mid f\text{ is discontinuous at } x\} For every x\in D, there exists by the
density of \mathbb Q, a c(x)\in\mathbb Q so that c(x)\in\left[\lim_{y\downarrow x} f(y), \lim_{y\uparrow x} f(y)\right]. Note that this set contains an
open non-empty interval precisely if f is
discontinuous at x. We can uniquely identify c(x) as the
rational number that has the least index in an
enumeration \mathbb N\to\mathbb Q and satisfies the above property. Since f is
monotone, this defines an
injective mapping c:D\to\mathbb Q, x\mapsto c(x) and thus D is
countable. It follows that f is
continuous almost everywhere. This is
sufficient for
Riemann integrability.{{Cite journal| issn = 0002-9890| volume = 43 Since is a monotone decreasing function, we know that : f(x)\le f(n)\quad\text{for all }x\in[n,\infty) and : f(n)\le f(x)\quad\text{for all }x\in[N,n]. Hence, for every integer , {{NumBlk|:| \int_n^{n+1} f(x)\,dx \le\int_{n}^{n+1} f(n)\,dx =f(n)|}} and, for every integer , {{NumBlk|:| f(n)=\int_{n-1}^{n} f(n)\,dx \le\int_{n-1}^n f(x)\,dx. |}} By summation over all from to some larger integer , we get from () : \int_N^{M+1}f(x)\,dx=\sum_{n=N}^M\underbrace{\int_n^{n+1}f(x)\,dx}_{\le\,f(n)}\le\sum_{n=N}^Mf(n) and from () : \begin{align} \sum_{n=N}^Mf(n)&=f(N)+\sum_{n=N+1}^Mf(n)\\ &\leq f(N)+\sum_{n=N+1}^M\underbrace{\int_{n-1}^n f(x)\,dx}_{\ge\,f(n)}\\ &=f(N)+\int_N^M f(x)\,dx. \end{align} Combining these two estimates yields :\int_N^{M+1}f(x)\,dx\le\sum_{n=N}^Mf(n)\le f(N)+\int_N^M f(x)\,dx. Letting tend to infinity, the bounds in () and the result follow. ==Applications==