Riemann integrable functions continuous except on a set of measure zero?

1. Dec 16, 2009

AxiomOfChoice

Is it true that a function is Riemann integrable on a bounded interval only if it's equal to a continuous function almost everywhere? I'd imagine this is the case, given the Riemann-Lebesgue lemma, which says that a function is RI iff its set of discontinuities has measure zero. (So the "continuous function" is then just f restricted to the complement of its set of discontinuities.) But I might be wrong. Help?

2. Dec 16, 2009

AxiomOfChoice

I've just discovered this is incorrect. Consider the function

$$f(x) = \begin{cases} 1 & \text{ if } 0\leq x \leq 1/2\\ 0 & \text{ if } 1/2 < x \leq 1 \end{cases}$$

Then $$f$$ is continuous almost everywhere, but it cannot be equal to a continuous function almost everywhere by an argument involving inverse images of open sets, etc. Bummer.

3. Dec 16, 2009

Hurkyl

Staff Emeritus
However, for every e>0, there exists a set A of measure less than e and a continuous function g such that, outside of A, f and g are equal.