390 Chapter 7 • The Riemann Integral
The next theorem is really rather remarkable, and perhaps unexpected.
The result shows the power of the way of thinking we have developed in this
course.
Theorem 7.4.9 Changing the values of a function at finitely many
points of [a, b] affects neither its integrability nor the value of its integral there.
More precisely, suppose f ,g: [a,b] __,~are bounded on [a,b] and f(x) = g(x)
for all but finitely many points of [a, b]. Then f is integrable on [a, b] if and only
if g is integrable on [a, b].^9 Moreover, in case of integrability, J: f = J: g.
Proof. Suppose f, g: [a, b] __,~are bounded on [a, b] and f(x) = g(x) for
all x E [a,b] except at the points {x 1 , x2, · · · , xn}, where x 1 < X2 < · · · < Xn.
Let xo =a and Xn+l = b. Then P = {xo, X1, x2, · · · , Xn, Xn+d is a partition of
[a, b], and on each subinterval [xi-l, xi] created by this partition, f and g agree
except on the endpoints. Apply Corollary 7.4.8 to each [xi-i, xi]. Corollaries
7.4.3 and 7.4.6 yield the desired conclusion. •
Thus, a function can have discontinuities at, for example, a million points
of [a, b] and still be integrable there. It is natural to ask whether it is possible
for a function to have discontinuities at an infinite number of points of [a, b] and
still be integrable there. Remembering Dirichlet's function, Example 7.2.10, one
might expect t he answer to be no. However, the following remarkable example
shows that the answer is yes.
Example 7.4.10 (A function with infinitely many points of discontinuity in
an interval on which it is integrable.) Define f: [O, 1] __,~by
f ( x) = { 1 if x = 1 / n for some n E N, }.
0 otherwise
Then, for each 0 < c < d < 1, f equals the constant function g(x) = 0,
except for at most finitely many points. So, by Theorem 7.4.9, f is integrable
on [c, d] and t f = t g = 0. Therefore, by Theorem 7.4.7, f is integrable on
[a, b] and f 01 f = lim J,^1 - h f = 0. However, f is discontinuous on the infinite
h-->O+ i
set { ~ : n E N}. D
For examples of functions that are integrable on [a, b] yet discontinuous on
a dense subset of [a, b], see Exercises 18 and 1 9.
- In fact, we s ha ll say that f is integrable on [a , b] even if it is not defined at some points
where it differs from an integrable function g. For example, we shall say tha t JxJ/ x is integrable
on [-1, 1] even though it is not defined at 0.