# If Riemann integrable, then it has finite number of discontinuities [duplicate]

I know that any bounded function with a finite number of discontinuities is Riemann integrable over some interval. Is vice versa i.e., If a bounded function is Riemann integrable, then it has a finite number of discontinuities?

Thanks.

No: the classic counterexample is Thomae's function, $$f(x) = \begin{cases} 0 & x \text{ irrational} \\ 1/q & x=p/q \text{; p,q integers and (p,q)=1} \end{cases},$$ which is continuous at every irrational and discontinuous at every rational. You can show using basic properties of the rationals that the upper sums converge to zero (lower sums are obviously all zero), and hence the function is Riemann integrable on say, $[0,1]$, with integral $0$.

See also the Riemann-Lebesgue criterion, which says a Riemann-integrable function is only discontinuous on a set of measure zero. Measure zero is easy to understand: a set has measure zero if you can cover it with a set of intervals of arbitrarily small length.

• "discontinuous a" $\: \mapsto \:$ "discontinuous on a" $\;\;\;\;$ – user57159 Apr 10 '15 at 3:27

No. Let $f$ on $[0,1]$ be defined by $f(x)=0$ unless $x=1/n$ for some positive integer $n$, in which case the value of $f$ is 1. Then $f$ is Riemann integrable but discontinuous whenever it takes the value $1$.

A function on a closed interval is Riemann integrable if and only if it is discontinuous only on a set of Lebesgue measure $0$.

No, for instance, the function

$$f(x) = \left\{ \begin{array}{ll} e^{-x^2}, & x \notin \mathbb{Z}, \\ 2, & x \in \mathbb{Z} \end{array}\right.$$

Has countably many discontinuities, but is Riemann integrable over $\mathbb{R}$.

What is true is that a function is Riemann integrable iff the set of discontinuties is a set of Lebesgue measure zero. Very loosely speaking, this implies that you can have at-most countably many discontinuities on sort of "conventional" intervals. If you look for more pathological examples, you can generate uncountably many discontinuities and still be OK; examples are in the comments.

• Very loosely speaking then... Since for example, the Cantor set has measure $0$ but is not countable. See also here or there. – Jean-Claude Arbaut Apr 9 '15 at 22:49
• @MattSamuel Yes, of course. I updated my answer to reflect this. I was attempting to stick to the more familiar basic integration concepts of integrating over intervals, where functions might have some discontinuous points, rather than thinking about functions defined around a more sticky set definition. – Emily Apr 9 '15 at 22:52
• By the way, regulated functions satisfy this property, of having countably many discontinuities. See also Froda's theorem – Jean-Claude Arbaut Apr 9 '15 at 22:55
• This answer is incorrect. The Riemann integral is only defined for functions on a finite compact interval $[a,b]$. This is an improper integral, and the number of discontinuities of your $f$ is finite when restricted to any bounded $[a,b] \subset \mathbb{R}$. – MathematicsStudent1122 Dec 5 '16 at 4:59