|
Let $[a,b]$ be any closed interval and consider the Dirichlet's function $f\colon [a,b]\to\mathbb R$ $$ f(x) = \begin{cases} 1 &\text{if $x$ is rational}\\ 0 &\text{otherwise}. \end{cases} $$
Then $f$ is not Riemann integrable. In fact given any interval $[x_1,x_2]\subset [a,b]$ with $x_1<x_2$ one has $$ \sup_{[x_1,x_2]} f(x) = 1,\qquad \inf_{[x_1,x_2]} f(x) = 0 $$ because every interval contains both rational and irrational points. So all upper Riemann sums are equal to $1$ and all lower Riemann sums are equal to $0$
|