comparison between Lebesgue and Riemann Integration

The Riemann and Lebesgue integralMathworldPlanetmath are defined in different ways, with the latter generally perceived as the more general. The aim of this article is to clarify this claim by providing a number of, hopefully simple and convincing, examples and argumentsMathworldPlanetmath. We restrict this article to a discussion of proper and improper integrals. For extensionsPlanetmathPlanetmath and even more general definitions of the integral we refer to

1 Proper Integrals

The Dirichlet Function

Our first example shows that functions exists that are Lebesgue integrable but not Riemann integrablePlanetmathPlanetmath.

Consider the characteristic functionMathworldPlanetmathPlanetmathPlanetmath of the rational numbers in [0,1], i.e.,

1(x)={1,if x rational,0,elsewhere.

This function, known as the Dirichlet functionMathworldPlanetmath, is not Riemann integrable. To see this, take an arbitrary partitionPlanetmathPlanetmathPlanetmath of the interval [0,1]. The supremumMathworldPlanetmathPlanetmath of 1 on any interval (with non-empty interior) is 1, whereas its infimumMathworldPlanetmath is 0. Hence, the upper Riemann sum of 1 is 1 while the lower Riemann sum is 0. Clearly, the upper and lower Riemann sums convergePlanetmathPlanetmath to 1 and 0, respectively, in the limit of the size of largest interval in the partition going to zero. Obviously, these limits are not the same. As a bounded function is Riemann integrable if and only if the upper and lower Riemann sums converge to the same number, the Riemann integral of 1 cannot exist.

On the other hand, 1 turns out to be Lebesgue integrable, which we now show. Let us enumerate the rationals in [0,1] as {q0,q1,}. Now cover each qi with an open set Oi of size ϵ/2i. Hence, the set {q0,q1,} is contained in the set Gϵ:=i=0Oi. Now it is known that every countableMathworldPlanetmath union of open sets forms a Lebesgue measurable set. Therefore, Gϵ is also a Lebesgue measurable set. Consequently, the Lebesgue integral of this set’s characteristic function, i.e.,

1Gϵ(x)={1,if xO,0,elsewhere,


In fact, the integral of 1Gϵ is less than or equal to ϵi=02-i=ϵ as the total length of the union of sets Oi is less than or equal to ϵ. (There might be overlaps between the Oi.) Now taking the limit ϵ0 it follows that for all ϵ,


Since this holds for all ϵ>0, the left hand side must be 0.

A ’Worse’ Kind of Dirichlet Function

The above is, arguably, somewhat simple. The only reason that the Dirichlet function is Lebesgue, but not Riemann, integrable, is that its spikes occur on the rationals, a set of numbers which is, in comparison to the irrational numbers, a very small set. By modifying the Dirichlet function on a set of measure zeroMathworldPlanetmath, that is, by removing its spikes, it becomes the zero function, which is evidently Riemann integrable. This reasoning might lead us to conjecture that it is possible to turn any Lebesgue integrable function into a Riemann integrable function by modifying it on a set of measure zero. This conjecture, however, is false as the next example shows.

Interestingly, the function we seek can be obtained in a more or less direct way from the previous example. First cover the rationals by open sets Oi of length yi, where the sequenceMathworldPlanetmath of numbers of {yi}i=0, is such that yi>0 for all i but such that iyi=1/2. Observe that Gy:=iOi is a measurable setMathworldPlanetmath with measureMathworldPlanetmathPlanetmath (length) less than or equal to 1/2. But this implies that the complementPlanetmathPlanetmath Gyc of Gy, which contains only irrational numbers, has length at least 1/2.

Observe that the characteristic function 1Gy is nowhere continuousMathworldPlanetmathPlanetmath on Gyc, as the rationals lie dense in the reals. Since, also, Gyc has measure at least equal to 1/2 it is impossible to remove these discontinuity points by a mere modification on a countable number of measure zero sets.

Now there is a theoremMathworldPlanetmath by Lebesgue stating that a bounded function f is Riemann integrable if and only if f is continuous almost everywhere. Apparently, 1Gy is boundedPlanetmathPlanetmathPlanetmathPlanetmathPlanetmath and discontinuousMathworldPlanetmath on a set with measure larger than 0. Thus, we may conclude that 1Gy is not Riemann integrable.

To prove that 1Gy is Lebesgue integrable follows easily if we approach the subject of integration from a somewhat more abstract point of view. This is the topic of the next sectionPlanetmathPlanetmath.

Exchanging Limits and Integrals

Let us first present one further example: the sequence of characteristic functions of i=1nOi, where Oi,i=1n and n<, are the open sets appearing in the definition of the ’worse Dirichlet function’. Clearly, any such function has a finite number of discontinuities, hence is Riemann integrable. However, these functions converge point-wise to 1Gy, which is not Riemann integrable. Apparently, sequences of Riemann integrable functions may converge to non-Riemann integrable functions. Interestingly, the sequence of integrals of 1i=1nOi, i.e. a sequence of reals, has a limit as it is increasing and bounded by 1/2. This somewhat disturbing inconsistency is satisfactory resolved by Lebesgue’s theory of integration.

As a matter of fact, the advantage of Lebesgue integration is perhaps best appreciated by interpreting this example from a more abstract (functional analysisMathworldPlanetmathPlanetmath) point of view. Stated a bit differently, we might approach the subject not from the bottom up (looking at individual functions) but from the top down (looking at classes of functions). In more detail, suppose we are allowed to apply an operator T to any function that is an element of some function space. It would be nice if this space is closed underPlanetmathPlanetmath taking (point-wise) limits. In other words, besides being allowed to apply T to some sequence of functions fn, we are also allowed to apply T to the function f obtained as the limit of fn. It would be even nicer if limnTfn is the same as Tlimnfn=Tf. (This is, for instance, useful when it is simple to compute Tfn for each n, but difficult to compute Tf, while the latter might be what really interests us.)

In the present case, i.e, integration, we perceive the integral of a function as a (continuous linear) operator. The class of Lebesgue integrable functions has the desired abstract properties (simple conditions to check whether the exchange of integral and limit is allowed), whereas the class of Riemann integrable functions does not.

Applying this to the above example, viz. the integration of 1Gy, we use Lebesgue Dominated Convergence TheoremMathworldPlanetmath, which states that when a sequence {fn} of Lebesgue measurable functions is bounded by a Lebesgue integrable function, the function f obtained as the pointwise limit fn is also Lebesgue integrable, and limnfn=f=limnfn. Since, for all n, 1inOi is bounded and Lebesgue integrable, 1Gy is also Lebesgue integrable, and reversing the (pointwise) limit and the integral is allowed.

1.1 Fubini’s Theorem

Admittedly the function 1Gy is rather artificial. A really powerful example of the consequences of being allowed to reverse integral and limit is provided by (the proof of) Fubini’s theorem applied to the rectangle Q=[a,b]×[c,d]. Compare the following two theorems. See, for instance, [Apo69] or [Lan83] for proofs of the first theorem, and [Jon00] for the second theorem.

Theorem 1.1.

Riemann Case. Assume f to be Riemann integrable on Q. Assume also that the one-dimensional function xf(x,y) is Riemann integrable for almost all y[c,d]. Then the function yabf(x,y)𝑑x is Riemann integrable and Qf(x,y)𝑑x𝑑y=cd(abf(x,y)𝑑x)𝑑y. Note: both conditions are satisfied if f is continuous on Q.

Theorem 1.2.

Lebesgue Case. Assume that f is Lebesgue integrable on Q. Then the function xf(x,y) is Lebesgue integrable for almost all y on [c,d]. As a consequence, the function yabf(x,y)𝑑x is Lebesgue integrable and Qf(x,y)𝑑x𝑑y=cd(abf(x,y)𝑑x)𝑑y.

Observe that the second assumptionPlanetmathPlanetmath in the Riemann case has turned into a consequence in the Lebesgue case. The main reason behind this differencePlanetmathPlanetmath is precisely that the class of Lebesgue measurable functions is closed under taking limits (under a bounded condition), whereas the class of Riemann integrable functions is not.

2 Improper Integrals

From the above the reader may conclude that whenever a function is Riemann integrable, it is Lebesgue integrable. This is true as long we only include proper integrals. If, on the other hand, we also consider improper integrals the statement is no longer valid. There exist functions whose improper Riemann integral exists, whereas the Lebesgue integral does not. Concentrating on functions defined on subsets of n the situation is as shown by the following Venn DiagramMathworldPlanetmath:

Figure 1: R, RI, and L, are the classes of Riemann, improper Riemann, and Lebesgue integrable functions, respectively.

In the previous we already discussed the inclusion RL.

Let us now integrate the function 1/x over [0,1] to show that some functions exist RIL but are not in R. As 1/x is not bounded on [0,1] every upper Riemann sum is infiniteMathworldPlanetmathPlanetmath. On the other hand, both the improper Riemann integral and the Lebesgue integral exist, and give the same result.

Secondly, L is not contained in RI as follows from the fact that the Dirichlet function is not RI.

Finally, RI is also not a subset of L. Define f:[0,)[-1,1] as 1 on [0,1), -1/2 on [1,2), 1/3 on [2,3), -1/4 on [3,4), etc. The Riemann integral and the Lebesgue integral of f over [0,n) are both equal to k=1n(-1)k+11/k. It is well known that this alternating sum converges, implying the existence of the improper Riemann integral. However, since a function is Lebesgue integrable if and only if its absolute valuePlanetmathPlanetmathPlanetmath is also Lebesgue integrable, f is not in L.


  • Apo69 T.M. Apostol. Calculus, volume 2. John Wiley & Sons, 1969.
  • Jon00 F. Jones. Lebesgue Integration on Euclidean Spaces. Jones and Bartlett, revised edition edition, 2000.
  • Lan83 S. Lang. Undergraduate AnalysisMathworldPlanetmath. Springer-Verlag, 1983.
Title comparison between Lebesgue and Riemann Integration
Canonical name ComparisonBetweenLebesgueAndRiemannIntegration
Date of creation 2013-03-22 15:29:14
Last modified on 2013-03-22 15:29:14
Owner Mathprof (13753)
Last modified by Mathprof (13753)
Numerical id 7
Author Mathprof (13753)
Entry type Example
Classification msc 28-00