Skip to main content
Logo image

Section 5.1 The Riemann integral

Note: 1.5 lectures
An integral is a way to “sum” the values of a function. There is sometimes confusion among students of calculus between the integral and the antiderivative. The integral is (informally) the area under the curve, nothing else. That we can compute an antiderivative using the integral is a nontrivial result we must prove. We will define the Riemann integral
 1 
Named after the German mathematician Georg Friedrich Bernhard Riemann (1826–1866).
using the Darboux integral
 2 
Named after the French mathematician Jean-Gaston Darboux (1842–1917).
, an equivalent but technically simpler definition.

Subsection 5.1.1 Partitions and lower and upper integrals

We want to integrate a bounded function defined on an interval [a,b]. We first define two auxiliary integrals that are defined for all bounded functions. Only then can we talk about the Riemann integral and the functions which it can integrate, the Riemann integrable functions.

Definition 5.1.1.

A partition P of [a,b] is a finite set of numbers {x0,x1,x2,,xn} such that
a=x0<x1<x2<<xn1<xn=b.
We write
Δxi:=xixi1.
Suppose f:[a,b]R is bounded and P is a partition of [a,b]. Define
mi:=inf{f(x):xi1xxi},Mi:=sup{f(x):xi1xxi},L(P,f):=i=1nmiΔxi,U(P,f):=i=1nMiΔxi.
We call L(P,f) the lower Darboux sum and U(P,f) the upper Darboux sum.
The geometric idea of Darboux sums is indicated in Figure 5.1. The lower sum is the area of the shaded rectangles, and the upper sum is the area of the entire rectangles, shaded plus unshaded parts. The width of the ith rectangle is Δxi, the height of the shaded rectangle is mi, and the height of the entire rectangle is Mi.

Figure 5.1. Sample Darboux sums.

Proof.

Let P be a partition of [a,b]. Note that mmi for all i and MiM for all i. Also, miMi for all i. Finally, i=1nΔxi=(ba). Therefore,
m(ba)=m(i=1nΔxi)=i=1nmΔxii=1nmiΔxii=1nMiΔxii=1nMΔxi=M(i=1nΔxi)=M(ba).
Hence we get (5.1). In particular, the sets of lower and upper sums are bounded sets.

Definition 5.1.3.

As the sets of lower and upper Darboux sums are bounded, we define
abf(x)dx:=sup{L(P,f):P a partition of [a,b]},abf(x)dx:=inf{U(P,f):P a partition of [a,b]}.
We call the lower Darboux integral and the upper Darboux integral. To avoid worrying about the variable of integration, we often simply write
abf:=abf(x)dxandabf:=abf(x)dx.
If integration is to make sense, then the lower and upper Darboux integrals should be the same number, as we want a single number to call the integral. However, these two integrals may differ for some functions.

Example 5.1.4.

Take the Dirichlet function f:[0,1]R, where f(x):=1 if xQ and f(x):=0 if xQ. Then
01f=0and01f=1.
The reason is that for any partition P and every i, we have mi=inf{f(x):x[xi1,xi]}=0 and Mi=sup{f(x):x[xi1,xi]}=1. Thus
L(P,f)=i=1n0Δxi=0,andU(P,f)=i=1n1Δxi=i=1nΔxi=1.

Remark 5.1.5.

The same definition of abf and abf is used when f is defined on a larger set S such that [a,b]S. In that case, we use the restriction of f to [a,b] and we must ensure that the restriction is bounded on [a,b].
To compute the integral, we often take a partition P and make it finer. That is, we cut intervals in the partition into yet smaller pieces.

Definition 5.1.6.

Let P={x0,x1,,xn} and P~={x~0,x~1,,x~} be partitions of [a,b]. We say P~ is a refinement of P if as sets PP~.
That is, P~ is a refinement of a partition if it contains all the numbers in P and perhaps some other numbers in between. For example, {0,0.5,1,2} is a partition of [0,2] and {0,0.2,0.5,1,1.5,1.75,2} is a refinement. The main reason for introducing refinements is the following proposition.

Proof.

The tricky part of this proof is to get the notation correct. Let P~={x~0,x~1,,x~} be a refinement of P={x0,x1,,xn}. Then x0=x~0 and xn=x~. In fact, there are integers k0<k1<<kn such that xi=x~ki for i=0,1,2,,n.
Let Δx~q:=x~qx~q1 for q=0,1,2,,. See Figure 5.2. We get
Δxi=xixi1=x~kix~ki1=q=ki1+1kix~qx~q1=q=ki1+1kiΔx~q.

Figure 5.2. Refinement of a subinterval. Notice Δxi=Δx~q2+Δx~q1+Δx~q, and also ki1+1=q2 and ki=q.

Let mi be as before and correspond to the partition P. Let m~q:=inf{f(x):x~q1xx~q}. Now, mim~q for ki1<qki. Therefore,
miΔxi=miq=ki1+1kiΔx~q=q=ki1+1kimiΔx~qq=ki1+1kim~qΔx~q.
So
L(P,f)=i=1nmiΔxii=1nq=ki1+1kim~qΔx~q=q=1m~qΔx~q=L(P~,f).
The proof of U(P~,f)U(P,f) is left as an exercise.
Armed with refinements, we prove the following. The key point of this next proposition is that the lower Darboux integral is less than or equal to the upper Darboux integral.

Proof.

By Proposition 5.1.2, for every partition P,
m(ba)L(P,f)U(P,f)M(ba).
The inequality m(ba)L(P,f) implies m(ba)abf. The inequality U(P,f)M(ba) implies abfM(ba).
The middle inequality in (5.2) is the main point of the proposition. Let P1,P2 be partitions of [a,b]. Define P~:=P1P2. The set P~ is a partition of [a,b], which is a refinement of P1 and a refinement of P2. By Proposition 5.1.7, L(P1,f)L(P~,f) and U(P~,f)U(P2,f). So
L(P1,f)L(P~,f)U(P~,f)U(P2,f).
In other words, for two arbitrary partitions P1 and P2, we have L(P1,f)U(P2,f). Recall Proposition 1.2.7, and take the supremum and infimum over all partitions:
abf=sup{L(P,f):P a partition of [a,b]}inf{U(P,f):P a partition of [a,b]}=abf.

Subsection 5.1.2 Riemann integral

We can finally define the Riemann integral. However, the Riemann integral is only defined on a certain class of functions, called the Riemann integrable functions.

Definition 5.1.9.

Let f:[a,b]R be a bounded function such that
abf(x)dx=abf(x)dx.
Then f is said to be Riemann integrable. The set of Riemann integrable functions on [a,b] is denoted by R([a,b]). When fR([a,b]), we define
abf(x)dx:=abf(x)dx=abf(x)dx.
As before, we often write
abf:=abf(x)dx.
The number abf is called the Riemann integral of f, or sometimes simply the integral of f.
By definition, a Riemann integrable function is bounded. Appealing to Proposition 5.1.8, we immediately obtain the following proposition. See also Figure 5.3.

Figure 5.3. The area under the curve is bounded from above by the area of the entire rectangle, M(ba), and from below by the area of the shaded part, m(ba).

A weaker form of this proposition is often useful: If |f(x)|M for all x[a,b], then
|abf|M(ba).

Example 5.1.11.

We integrate constant functions using Proposition 5.1.8. If f(x):=c for some constant c, then we take m=M=c. In inequality (5.2) all the inequalities must be equalities. Thus f is integrable on [a,b] and abf=c(ba).

Example 5.1.12.

Let f:[0,2]R be defined by
f(x):={1if x<1,1/2if x=1,0if x>1.
We claim f is Riemann integrable and 02f=1.
Proof: Let 0<ϵ<1 be arbitrary. Let P:={0,1ϵ,1+ϵ,2} be a partition. We use the notation from the definition of the Darboux sums. Then
m1=inf{f(x):x[0,1ϵ]}=1,M1=sup{f(x):x[0,1ϵ]}=1,m2=inf{f(x):x[1ϵ,1+ϵ]}=0,M2=sup{f(x):x[1ϵ,1+ϵ]}=1,m3=inf{f(x):x[1+ϵ,2]}=0,M3=sup{f(x):x[1+ϵ,2]}=0.
Furthermore, Δx1=1ϵ, Δx2=2ϵ, and Δx3=1ϵ. See Figure 5.4.

Figure 5.4. Darboux sums for the step function. L(P,f) is the area of the shaded rectangle, U(P,f) is the area of both rectangles, and U(P,f)L(P,f) is the area of the unshaded rectangle.

We compute
L(P,f)=i=13miΔxi=1(1ϵ)+02ϵ+0(1ϵ)=1ϵ,U(P,f)=i=13MiΔxi=1(1ϵ)+12ϵ+0(1ϵ)=1+ϵ.
Thus,
02f02fU(P,f)L(P,f)=(1+ϵ)(1ϵ)=2ϵ.
By Proposition 5.1.8, 02f02f. As ϵ was arbitrary, 02f=02f. So f is Riemann integrable. Finally,
1ϵ=L(P,f)02fU(P,f)=1+ϵ.
Hence, |02f1|ϵ. As ϵ was arbitrary, we conclude 02f=1.
It may be worthwhile to extract part of the technique of the example into a proposition. Note that U(P,f)L(P,f) is exactly the total area of the white part of the rectangles in Figure 5.1.

Proof.

If for every ϵ>0 such a P exists, then
0abfabfU(P,f)L(P,f)<ϵ.
Therefore, abf=abf, and f is integrable.

Example 5.1.14.

Let us show 11+x is integrable on [0,b] for all b>0. We will see later that continuous functions are integrable, but let us demonstrate how we do it directly.
Let ϵ>0 be given. Take nN and let xi:=ib/n form the partition P:={x0,x1,,xn} of [0,b]. Then Δxi=b/n for all i. As f is decreasing, for every subinterval [xi1,xi],
mi=inf{11+x:x[xi1,xi]}=11+xi,Mi=sup{11+x:x[xi1,xi]}=11+xi1.
Then
U(P,f)L(P,f)=i=1nΔxi(Mimi)=bni=1n(11+(i1)b/n11+ib/n)==bn(11+0b/n11+nb/n)=b2n(b+1).
The sum telescopes, the terms successively cancel each other, something we have seen before. Picking n to be such that b2n(b+1)<ϵ, the proposition is satisfied, and the function is integrable.

Remark 5.1.15.

A way of thinking of the integral is that it adds up (integrates) lots of local information—it sums f(x)dx over all x. The integral sign was chosen by Leibniz to be the long S to mean summation. Unlike derivatives, which are “local,” integrals show up in applications when one wants a “global” answer: total distance travelled, average temperature, total charge, etc.

Subsection 5.1.3 More notation

When f:SR is defined on a larger set S and [a,b]S, we say f is Riemann integrable on [a,b] if the restriction of f to [a,b] is Riemann integrable. In this case, we say fR([a,b]), and we write abf to mean the Riemann integral of the restriction of f to [a,b].
It is useful to define the integral abf even if ab. Suppose b<a and fR([b,a]), then define
abf:=baf.
For any function f, define
aaf:=0.
At times, the variable x may already have some other meaning. When we need to write down the variable of integration, we may simply use a different letter. For example,
abf(s)ds:=abf(x)dx.

Exercises 5.1.4 Exercises

5.1.1.

Define f:[0,1]R by f(x):=x3 and let P:={0,0.1,0.4,1}. Compute L(P,f) and U(P,f).

5.1.2.

Let f:[0,1]R be defined by f(x):=x. Show that fR([0,1]) and compute 01f using the definition of the integral (but feel free to use the propositions of this section).

5.1.3.

Let f:[a,b]R be a bounded function. Suppose there exists a sequence of partitions {Pk}k=1 of [a,b] such that
limk(U(Pk,f)L(Pk,f))=0.
Show that f is Riemann integrable and that
abf=limkU(Pk,f)=limkL(Pk,f).

5.1.5.

Suppose f:[1,1]R is defined as
f(x):={1if x>0,0if x0.
Prove that fR([1,1]) and compute 11f using the definition of the integral (but feel free to use the propositions of this section).

5.1.6.

Let c(a,b) and let dR. Define f:[a,b]R as
f(x):={dif x=c,0if xc.
Prove that fR([a,b]) and compute abf using the definition of the integral (but feel free to use the propositions of this section).

5.1.7.

Suppose f:[a,b]R is Riemann integrable. Let ϵ>0 be given. Then show that there exists a partition P={x0,x1,,xn} such that for every set of numbers {c1,c2,,cn} with ck[xk1,xk] for all k, we have
|abfk=1nf(ck)Δxk|<ϵ.

5.1.8.

Let f:[a,b]R be a Riemann integrable function. Let α>0 and βR. Then define g(x):=f(αx+β) on the interval I=[aβα,bβα]. Show that g is Riemann integrable on I.

5.1.9.

Suppose f:[0,1]R and g:[0,1]R are such that for all x(0,1], we have f(x)=g(x). Suppose f is Riemann integrable. Prove g is Riemann integrable and 01f=01g.

5.1.10.

Let f:[0,1]R be a bounded function. Let Pn={x0,x1,,xn} be a uniform partition of [0,1], that is, xi=i/n. Is {L(Pn,f)}n=1 always monotone? Yes/No: Prove or find a counterexample.

5.1.11.

(Challenging)   For a bounded function f:[0,1]R, let Rn:=(1/n)i=1nf(i/n) (the uniform right-hand rule).
  1. If f is Riemann integrable show 01f=limnRn.
  2. Find an f that is not Riemann integrable, but limnRn exists.

5.1.12.

(Challenging)   Generalize the previous exercise. Show that fR([a,b]) if and only if there exists an IR, such that for every ϵ>0 there exists a δ>0 such that if P is a partition with Δxi<δ for all i, then |L(P,f)I|<ϵ and |U(P,f)I|<ϵ. If fR([a,b]), then I=abf.

5.1.13.

Using Exercise 5.1.12 and the idea of the proof in Exercise 5.1.7, show that Darboux integral is the same as the standard definition of Riemann integral, which you have most likely seen in calculus. That is, show that fR([a,b]) if and only if there exists an IR, such that for every ϵ>0 there exists a δ>0 such that if P={x0,x1,,xn} is a partition with Δxi<δ for all i, then |i=1nf(ci)ΔxiI|<ϵ for every set {c1,c2,,cn} with ci[xi1,xi]. If fR([a,b]), then I=abf.

5.1.14.

(Challenging)   Construct functions f and g, where f:[0,1]R is Riemann integrable, g:[0,1][0,1] is one-to-one and onto, and such that the composition fg is not Riemann integrable.

5.1.15.

Suppose that f:[a,b]R is a bounded function, and P is a partition of [a,b] such that L(P,f)=U(P,f). Prove that f is a constant function.
For a higher quality printout use the PDF versions: https://www.jirka.org/ra/realanal.pdf or https://www.jirka.org/ra/realanal2.pdf