# a non-monotonic function on [0,1] with infinitely many points of discontinuity such that the function is bounded & Riemann integrable on [0,1].

could any one Give an example of a non-monotonic function on $[0,1]$ with infinitely many points of discontinuity such that the function is bounded & Riemann integrable on $[0,1].$?

-
Let $C$ be the Cantor set, and let $f=\chi_{C}$ be its indicator function. It is discontinuous at every point of $C$, which in particular shows that the set of discontinuities of $f$ is uncountable. But it is an easy exercise that it is Riemann integrable on $[0,1]$ with the integral value 0. – sos440 Aug 25 '12 at 15:31
Dirichlet's function is one. – David Mitra Aug 25 '12 at 16:58
Perhaps the simplest example is $f:[0,1]\rightarrow\Bbb R$ defined by $f(x)=\cases{1,&$x=1/n$\cr 0,& \text{otherwise}}$. – David Mitra Aug 25 '12 at 17:18

Try $f=\sum\limits_{n=1}^{+\infty}(-1)^na_n\mathbf 1_{[0,x_n]}$ with $(a_n)_{n\geqslant1}$ and $(x_n)_{n\geqslant1}$ decreasing to $0$.