Which one is right: Riemann integrable iff the set of discontinuity is countable or a null set?

When I was studying calculus (I used Purcell's book), it is stated that the bounded function $f$ on closed bounded interval is Riemann integrable if and only if $f$ has countable discontinuity points, which means if $f$ is discontinuous on Cantor set, then it is not Riemann integrable.

However, when I was learning real analysis (I used Bartle's book Introduction to Real Analysis 3rd ed.), in the section 7.3, the Lebesgue's Integrability Criterion said that the bounded function $f$ on closed bounded interval is Riemann integrable if and only if the set of discontinuity points is a null set (the measure of such set is $0$), which means if $f$ is discontinuous on the Cantor set, then it is still Riemann integrable.

Which one is the truth?

I remember (a long time ago) I asked this question to my folks to discuss, and he gave me an example when $f$ is discontinuous on the Cantor set and it is not Riemann integrable, and I didn't find any fault in his argument.

I am sorry I cannot give you that example guys, I lost the notes.

• Countable sets have measure zero. Perhaps the book said "if the set of discontinuities is countable then...", and didn't state it as an equivalence (which it is not). – Pedro Tamaroff Sep 13 '16 at 1:49
• thank you, i'll check the book when I go to the library, and may be there was some faults in my friend's argument, thank you – Rizky Reza Fujisaki Sep 13 '16 at 1:54

Having only countably many discontinuities implies a bounded function on a closed bounded interval is Riemann integrable, but it is certainly possible to have a function that is Riemann integrable that has uncountable many discontinuities.

One example would be the characteristic function of the usual Cantor set in $[0,1]$.

See these related questions:

Characteristic function of Cantor set is Riemann integrable

Example of Riemann integrable $f: [0,1] \to \mathbb R$ whose set of discontinuity points is an uncountable and dense set in $[0,1]$

• thank you so much!!! Then, does it mean the theorem "riemann integrable if and only if discontinuity points are countable" is a bit wrong? so the right one is "if discont points are countable, then reimann integrable"? (only one sided) – Rizky Reza Fujisaki Sep 13 '16 at 1:51
• Right. The implication only goes one way in the countable case. – Alexis Olson Sep 13 '16 at 1:52
• okay, then there must be some faults in my friend's argument, thank you – Rizky Reza Fujisaki Sep 13 '16 at 1:55