If you are looking for a good reason to prefer the Lebesgue integral over the Riemann integral and remember something like “Lebesgue goes better with limits” but could not memorize a specific example, then you should have a look on this stunning sequence of functions (which I found in Brenner and Scotts “Mathematical Theory of Finite Element Methods”):
Let be a dense subset of (e.g. an enumeration of the rational numbers) and build the functions
However, each function is (improper) Riemann-integrable (note that is Riemann-integrable over any compact interval) Moreover, even the integrals stay bounded for . Of course, the functions are also Lebesgue measurable.
To see why this sequence of functions is problematic for Riemann integration, consider the potential limit function
which has “the value on a dense subset”. Hence, the Riemann integral can not be finite.
However, it is clear that for (due to exponentially decaying weights) and since the -spaces are Banach spaces, .