Let $f$ be defined and bounded on $[a,b]\subset\mathbb{R}$, let $D$ be its set of discontinuities. I want to prove if $D$ has Lebesgue measure $0$ then $f$ is Riemann-integrable.
My approach is that I want to prove $D$ is compact, which reduce to $D$ being closed. If $D$ compact then $D$ has Jordan measure $0$, which means $f$ is Riemann-integrable. I proved everything but I get stuck at $D$ is closed (or $[a,b]\backslash$ is open), I am wondering whether this statement is true to begin with, if so please help me a bit?
Thank you!