The Definition of The Riemann Integral
The Definition of The Riemann Integral
These points are called mesh points. We will denote this partition by P . A partition Q is called a refinement of
P if P ⊂ Q. The graph of the the function f lies in a vertical strip in the xy-plane: {(x, y) : a ≤ x ≤ b}. This
strip consist of N panels {(x, y) : xi−1 ≤ x ≤ xi }. Loosely speaking, on this panel the graph of f varies between a
minimum height mi and a maximum height Mi . More precisely
We can now define the lower Riemann sum L(P, f ) and the upper Riemann sum U (P, f ):
∑
N ∑
N
L(P, f ) := mi ∆xi , U (P, f ) := Mi ∆xi .
i=1 i=1
Note that
m(b − a) ≤ L(P, f ) ≤ U (P, f ) ≤ M (b − a) (1)
Suppose we refine the partition P by adjoining one more mesh point z. Suppose j is the integer such that
xj−1 ≤ z ≤ xj and let P̃ denote the refined partition: P̃ = P ∪ {z}. The extra point z divides the j th panel of the
original partition into a left panel and a right panel. Let
i = inf{f (x) | z ≤ x ≤ xi },
mR MiR = sup{f (x) | z ≤ x ≤ xi }.
When we compute the upper and lower Riemann sums for the refined partition we see that the only difference is
that the j th term is replaced by two new terms corresponding to the left and right panels:
Note that mj ≤ mL
j ≤ Mj ≤ Mj and mj ≤ mj ≤ Mj ≤ Mj . This implies
L R R
Since we can think of a refinement Q of a partition P as being obtained by successively adding one point at a time
we have:
1
Lemma 1. Let Q be a refinement of P then
Lemma 2. Let P1 and P2 be any two partitions of [a, b] then L(P1 , f ) ≤ U (P2 , f ) and hence
The proof is simply a consequence of the fact that neither suprema nor infima over any subinterval can differ by more
than M − m. If we add an extra mesh point between xi−1 and xi then the contribution from subinterval [xi−1 , xi ] is
not changed by more than (Mi − mi )∆xi ≤ (M − m)µ(P ). So if we adjoin K points the change in either the lower
sum or the upper sum is no more in magnitude than K(M − m)µ(P ).
∫b ∫b
We define the lower Riemann integral a
f (x) dx and the upper Riemann integral a
f (x) dx as follows
∫ b ∫ b
f (x) dx = sup L(P, f ), and f (x) dx = inf U (P, f ).
a P a P
By lemma 2 the lower Riemann integral is less than or equal to the upper Riemann integral. We say that the function
f is Riemann integrable on [a, b] if its lower and upper Riemann integrals have the same value. In that case we denote
∫b
that common value by a f dx, called the Riemann integral of f on [a, b]. We now summarize
Let P denote the partition a = x0 < x1 < x2 < · · · < xN = b and define ∆xi := xi − xi−1 . The mesh or norm of this
partition is defined as |P | := min{∆xi | 1 ≤ i ≤ N }. We define
We define the upper Riemann sum and the lower Riemann sum respectively by
∑
N ∑
N
U (P, f ) := Mi ∆xi , L(P, f ) := mi ∆xi ,
i=1 i=1
and the upper Riemann integral and the lower Riemann integral respectively by
∫ b ∫ b
f (x) dx := inf U (P, f ), f (x) dx := sup U (P, f ).
a P a P
2
We say that f is Riemann integrable on [a, b] if the upper and lower Riemann integrals are equal. Their common
value is then called Riemann integral and is denoted by
∫ b
f (x) dx.
a
Riemann Lemma. f : [a, b] → R is Riemann integrable iff for any ϵ > 0 there exists a partition Q such that
U (Q, f ) − L(Q, f ) < ϵ.
Proof. Suppose that f is Riemann integrable, then by the definitions of lower and upper Riemann integrals (which
now have the same value) there exist partitions P1 and P2 such that
∫ b ∫ b
L(P1 , f ) > f (x) dx − ϵ/2, U (P1 , f ) < f (x) dx + ϵ/2.
a a
Let Q = P1 ∪ P2 , then
( ∫ ) (∫ )
b b
ϵ ϵ
U (Q, f ) − L(Q, f ) ≤ U (P2 , f ) − L(P1 , f ) ≤ U (P2 , f ) − f (x) dx + f (x) dx − L(P1 , f ) < + = ϵ.
a a 2 2
Conversely, if for each ϵ > 0 we can find a partition Q such that U (Q, f ) − L(Q, f ) < ϵ then
∫ b ∫ b
0≤ f (x) dx − f (x) dx ≤ U (Q, f ) − L(Q, f ) < ϵ.
a a
Since ϵ is an arbitrarily small positive number, the upper and lower integrals must have the same value.
Notation. We use C[a, b] to denote the set of all continuous functions from [a, b] to R and R[a, b] to denote the set
of all functions that are Riemann integrable on [a, b].
Proof. Let f ∈ C[a, b]. Then f must, in fact, be uniformly continuous. Given any ϵ > 0 we can find a δ > 0 such
that if u, v ∈ [a, b] with |u − v| < δ then |f (u) − f (v)| < ϵ/(b − a). Let P be any partition with mesh size µ(P ) < δ.
This means that on each panel Mi − mi < ϵ/(b − a). Therefore
∑ ∑
U (P, f ) − L(P, f ) = (Mi − mi )∆xi < [ϵ/(b − a)]∆xi = ϵ.
i i
Proof. We prove the case where f is increasing; the case where f is decreasing is handled similarly. Given any ϵ
choose a positive integer N such that (f (b) − f (a))(b − a)/N < ϵ. Choose the partition P with xi := a + i(b − a)/N
3
so that ∆xi = ∆x := (b − a)/N . From the fact that f is increasing it follows that Mi = f (xi ) and mi = f (xi−1 ).
Hence
∑
N
U (P, f ) − L(P, f ) = (f (xi ) − f (xi−1 ))∆x
i=1
which is a telescoping sum that is equal to (f (xN ) − f (x0 ))∆x = (f (b) − f (a))(b − a)/N < ϵ. Integrability, once
again, follows from the Riemann lemma.
Riemann sums
Let P := {x0 , x1 , · · · , xN } be a partition. A set of points {t1 , t2 , · · · , tN } is called a marking of the partition P if
for each i we have xi−1 ≤ ti ≤ xi . We denote by P T the partition P together with the marking T . We call P T a
marked partition. Sometimes we will simplify the notation and denote P T by Π and define µ(Π) := µ(P ). Given
such a marked partition we define the corresponding Riemann sum as
∑
N
S(Π, f ) = S(P T , f ) := f (ti ) ∆xi .
i=1
lim µ(Pk ) = 0.
k→∞
Proof. Suppose that m ≤ f (x) ≤ M for all x ∈ [a, b]. We assume M > m; the case M = m would make the
proof trivial. By the Riemann lemma, given any ϵ > 0 we can find a partition Q such that U (Q, f ) − L(Q, f ) < ϵ/2.
Suppose that Q consists of K mesh points. Let k0 be an integer such that
ϵ
µ(Pk ) < ∀k ≥ k0 .
4K(M − m)
Let P̃k be the the partition of Pk obtained by adjoining all the mesh points of Q. By our earlier lemma
ϵ ϵ
|L(P̃k , f ) − L(Pk , f )| ≤ K(M − m)µ(Pk ) < , |U (P̃k , f ) − U (Pk , f )| ≤ K(M − m)µ(Pk ) < .
4 4
Moreover, since
∫ b
L(Pk , f ) ≤ f (x) dx ≤ U (Pk , f ), , L(Pk , f ) ≤ S(PkTk , f ) ≤ U (Pk , f )
a
we have for k ≥ k0 : ∫
b
f (x) dx − S(Pk , f ) ≤ U (Pk , f ) − L(Pk , f )
Tk
a
4
Theorem. Suppose f : [a, b] → R is bounded and has the property that for any family of marked partitions {Πk }
with µ(Πk ) → 0 as k → ∞ the sequence {S(Πk , f )}∞
k=1 converges. Then f ∈ R[a, b], i.e. f is Riemann integrable on
[a, b].
We omit the proof but the idea is simple. We can construct partitions Pk such that µ(Pk ) → 0 as k → ∞. Then
we can mark these partitions so that of S(Π2k−1 , f ) − L(Pk , f ) < 1/k and U (Pk , f ) − S(Π2k , f ) < 1/k. This implies
that U (Pk , f ) − L(Pk , f ) will converge to zero and therefore, by the Riemann lemma f ∈ R[a, b]
Lemma A. Let f and g be bounded functions on [a, b] and k a constant. Let Π be a marked partition on [a, b].
Then
1. S(Π, f + g) = S(Π, f ) + S(Π, g).
2. S(Π, kf ) = kS(Π, f ).
3. If f (x) ≤ g(x) ∀x ∈ [a, b] then S(Π, f ) ≤ S(Π, g).
4. |S(Π, f )| ≤ S(Π, |f |).
Lemma B. Let f be bounded function on [a, b] and let c ∈ (a, b). Let P1 be a partition on [a, c] and P2 a partition
on [c, b]. Let P = P1 ∪ P2 . Then P is a partition of [a, b]. Then U (P, f ) = U (P1 , f ) + U (P2 , f ), L(P, f ) =
L(P1 , f ) + L(P2 , f ), and hence U (P, f ) − L(P, f ) ≤ [U (P1 , f ) − L(P, f )] + [U (P2 , f ) − L(p2 , f )]
8. f g ∈ R[a, b].
Proof. Let Πk := Π(Pk , Tk ), k = 1, 2, · · · be marked partitions such that µ(Πk ) → 0 as k → ∞. Then by Lemma A
∫b ∫b
the right hand side converges to a f (x) dx + a f gx) dx as k → ∞. Therefore f + g is integrable and its integral
is the sum of the integrals of f and g. The proofs of (2) and (3) follow similarly. To prove (4) we use the Riemann
Lemma. Given ϵ > 0 we can find a partition P on [a, b] such that U (P, f ) − L(P, f ) < ϵ. We modify this partition
5
by adjoining p and q. This refines the partition P to a partition Q that can be written as a union Q1 ∪ Q2 ∪ Q3
of partitions on each of the intervals [a, p], p, q] and [q, b]. Let U∗ (Q2 , f ) and L∗ (Q2 , f ) be the sum of only those
terms in the upper and lower Riemann sums that correspond to panels that lie between p and q. Then by Lemma
B, 0 ≤ U∗ (Q2 , f ) − L∗ (Q2 , f ) ≤ U (Q, f ) − L(Q, f ) ≤ U (P, f ) − L(P, f ) < ϵ, and hence, by the Riemann lemma, f is
integrable on [p, q]. To prove (5) we arrange it so that c ∈ Pk for all k. That is c = xm(k) ∈ Pk . Then
where SL denotes the sum of terms 1, 2, ·, m(k) and SR denotes the sum of the remaining terms. Clearly
∫ c ∫ b ∫ b
SL (Πk , f ) → f (x) dx, SR (Πk , f ) → f (x) dx, S(Πk , f ) → f (x) dx.
a c a
The proof of (6) is somewhat lengthy and so we will do that last The first part of (7) follows immediately from (6)
with ϕ(s) := |s|. The second part follows from the triangle inequality applied to the Riemann sums Lemma B-4:
Taking limits we have the inequality in (7). We can also use (6) with ϕ(s) := s2 to deduce that f 2 , g 2 and (f + g)2
are all in R[a, b]. Therefore
1[ ]
fg = (f + g)2 − f 2 − g 2 ∈ R[a, b].
2
To prove (6), let ϵ > 0 be given. Since ϕ is uniformly continuous and bounded, there exists a δ > 0 such that
|ϕ(u) − ϕ(v)| < ϵ/[2(b − a)] whenever u, v ∈ [c, d] and |u − v| < δ, and there exist numbers p and q such that
ϕ([c, d]) ⊂ [p, q]. Since f is integrable we can find a partition P := {x0 , x1 , · · · , xN } such that
∑
N
U (P, f ) − L(P, f ) = (Mi − mi )∆xi < η := ϵδ/[2(q − p)],
i=1
We note that
∑
N ∑
η> (Mi − mi )∆xi ≥ δ∆xi .
i=1 i∈Kδ
Let Mi∗ (resp. m∗i ) be the supremum (resp. infimum) of ϕ ◦ f on [xi−1 , xi ], then
∑
N ∑ ∑
U (P, ϕ ◦ f ) − L(P, ϕ ◦ f ) = (Mi∗ − m∗i )∆xi = (Mi∗ − m∗i )∆xi + (Mi∗ − m∗i )∆xi <
i=1 i∈Jδ i∈Kδ
∑ ∑
ϵ∆xi /[2(b − a)] + (q − p)∆xi ≤ ϵ/2 + ϵ/2 = ϵ.
i∈Jδ i∈Kδ
Warning. If |f | is Riemann integrable it does not follow that f is Riemann integrable. Counterexample : f (x) = 0
if x rational, f (x) = −1 if x is irrational.
Remark. In general composition of two Riemann integrable functions is not integrable as can be seen from the
following example. Let
f (x) = 0 ∀x > 0 and f (x) = 1 ∀x ≤ 0,
6
ψ(x) = 0 ∀x ∈
/ Q, ψ(p/q) = 1/q ∀p ∈ Z, ∀q ∈ N,
where we assume that p and q have no common factors in N except 1. The function ψ is continuous at all irrationals.
It is a fact (not proven here) that a bounded function that is continuous on [a, b] except at countably many points
is Riemann integrable, and hence ψ is Riemann integrable on any bounded interval. The function f is integrable
on [0, 1], but the function f ◦ ψ is the Dirichlet function (f (x) is zero on all rationals and 1 on all irrationals). The
Dirichlet function is not Riemann integrable on any interval [a, b] with a < b, since all upper sums have the value
b − a while all lower sums are zero. This provides an example of a composition of two Riemann integrable functions
that is not Riemann integrable. There are even examples where f is Riemann integrable, ψ is continuous, but f ◦ ψ
fails to be Riemann integrable.
Theorem. Suppose f : [a, b] → R is a differentiable function and suppose f ′ is Riemann integrable on [a, b]. Then
∫ b
f ′ (x) dx = f (b) − f (a).
a
The last equality follows from the fact that the sum is a telescoping series. Now, letting n tend to infinity we obtain
the result we wanted.
Notation.
f (x)|ba := f (b) − f (a).
The formula for the Fundamental Theorem of Calculus then reads
∫ b
f ′ (x) dx = f (x)|ba .
a
7
Leibniz’s Rule
Lemma. Let g : [a, b] → R be Riemann integrable on [a, b] and suppose that g is continuous at c ∈ [a, b]. Let
∫ x
G(x) := g(s) ds.
a
Given any ϵ > 0 we can find a δ > 0 such that |g(c + s) − g(c)| < ϵ whenever |s| < δ. Hence, if |t| < δ then
∫ t
1
[g(c + s) − g(c)] ds < ϵ.
t
0
Leibniz’s Rule Let g : [a, b] → R be Riemann integrable on [a, b] and suppose that g is continuous on [a, b]. Let
α : [c, d] → [a, b], and β : [c, d] → [a, b] be differentiable functions. Let
∫ β(x)
Φ(x) := g(s) ds.
α(x)
Proof 1
Choose x∗ ̸= x0 and define ∫ s
G(s) := g(t) dt,
x∗
1 Actually Leibniz’s rule is a bit more general. Under the right hypotheses it is true that
∫ β(x) ∫ β(x)
d ∂g(x, s)
g(x, s) ds = ds + g(x, β(x))β ′ (x) − g(x, α(x))α′ (x).
dx α(x) α(x) ∂x
8
A few more theorems on integrals.
Mean Value Theorem for Integrals Let f ∈ C[a, b] and g ∈ R[a, b] with g(x) ≥ 0 ∀x ∈ [a, b]. Then there exists
a c ∈ [a, b] such that
∫ b ∫ b
f (x)g(x) dx = f (c) g(x) dx. (6)
a a
∫b
Proof. Let m := min(f ), and M := max(f ) and G := a g(x) dx. Then since g(x) ≥ 0 we have mg(x) ≤ f (x)g(x) ≤
M g(x) so that
∫ b ∫ b ∫ b
mG = m g(x) dx ≤ f (x)g(x) dx ≤ M g(x) dx = M G. (7)
a a a
If G = 0 then all integrals in (3) are zero and obviously (2) will be true for any choice of c. If G > 0 then m ≤
∫b ∫b
G−1 a f (x)g(x) dx ≤ M so that by the intermediate value theorem there exists a c such that f (c) = G−1 a f (x)g(x)
for some c ∈ [a, b].
Change of Variables Theorem. Let J be an interval, ϕ : [a, b] → J a differentiable function with ϕ′ ∈ R[a, b]. Let
f : J → R be continuous. Then
∫ b ∫ ϕ(b)
f (ϕ(t)) ϕ′ (t) dt = f (x) dx.
a ϕ(a)
Proof. Let ∫ ∫
x ϕ(x)
F (x) := f (ϕ(t)) ϕ′ (t) dt − f (s) ds.
a ϕ(a)
Clearly F (a) = 0 and using Leibniz’s rule we see that F ′ (x) = 0. This means F (x) = 0 ∀x ∈ [a, b]. In particular
F (b) = 0, which is precisely what the theorem asserts.
Integration by parts. Let f : [a, b] → R and g : [a, b] → R be differentiable functions with f, g ∈ R[a, b]. Then
∫ b ∫ b
f (x)g ′ (x) dx = − f ′ (x)g(x) dx + [f (b)g(b) − f (a)g(a)].
a a
The proof is an immediate consequence of applying the Fundamental Theorem of Calculus to the function f (x)g(x).
Taylor’s Theorem. Let J be an interval, a ∈ J and f ∈ C n+1 (J), i.e. f is n + 1 times continuously differentiable
on J. Then for all x ∈ J we have
∑
n
f (k) (a)
f (x) = f (a) + (x − a)k + Rn+1 (x), (8)
k!
k=1
where ∫ x
1
Rn+1 (x) = f (n+1) (t)(x − t)n dt.
n! a
Moreover, for each x ∈ J there is a number c between x and a such that
f (n+1) (c)
Rn+1 (x) = (x − a)n+1 .
(n + 1)!
9
Note. For n = 0 equation (2) reduces to the Fundamental Theorem of Calculus:
∫ x
f (x) = f (a) + f ′ (t) dt.
a
The proof of the theorem for arbitrary n is effected by repeated integration by parts on the integral or, more simply,
by mathematical induction.
3. If m ∈ Z and n ∈ N then
m
ln(am/n ) = ln(a).
n
4.
ln(1) = 0, ln(a/b) = ln(a) − ln(b).
5.
[ln(x)]′ = 1/x.
We can define the exponential function as the inverse function for the natural logarithm function:
−1
exp := [ln] : (−∞, ∞) → (0, ∞).
Now it is not difficult to prove all the standard properties of the exponential function.
3. If m ∈ Z and n ∈ N then (m )
exp y = [exp(y)]m/n .
n
10
4.
exp(0) = 1.
5.
[exp(x)]′ = exp(x).
Let a be a positive real number and let p ∈ R. Temporarily let us use the notation
ap := exp(p ln(a)).
∫q
Exercise: Let a > 0. Find the derivative of f (x) := ax and p
ax dx.
Exercise: Let a > 1 and let λ(x) := ax /[K + ax ] (a logistic function) . Show that λ is a bijection between R and
(0, 1). Find its inverse function and find an antiderivative Λ, i.e. a function such that Λ′ = λ.
11