# Does such a function exist? What is a good example?

Does there exist a function $f$ such that it is continuous a.e. on a measurable subset $E$ $\subseteq$ $R$ (the set of real numbers), Lebesgue integrable, but not Riemann integrable? I was thinking maybe the Dirichlet function, because it is Lebesgue integrable but not Riemann integrable, but it is nowhere continuous! Any ideas?

-
The Riemann integrable functions on E are precisely the functions which are continuous a.e. on E. –  bobobinks Mar 27 '11 at 23:44
I'm not sure what $E$ is, but it seems you haven't seen Lebesgue's criterion for Riemann integrability: en.wikipedia.org/wiki/Riemann_integral#Integrability –  Jonas Meyer Mar 27 '11 at 23:44
@bobobinks How can we prove that if $f$ is continuous a.e. and Lebesgue integrable, then it is Riemann integrable? –  Libertron Mar 27 '11 at 23:46
If there is such a function, it should probably get added to this list, if it isn't already there. –  Isaac Mar 28 '11 at 3:10

Firstly, the Riemann integral doesn't even make sense unless the domain of definition of $f$ is a bounded interval. Secondly, no unbounded function is Riemann integrable. These, however, are the only obstructions: Lebesgue's criterion states that a function from $[a,b]$ to $\mathbb{R}$ is Riemann integrable if and only if it is bounded and almost everywhere continuous