450 Chapter 7 • The Riemann Integral
(e) Dirichlet's function, defined in Example 5.1.11, is not integrable on
any proper interval because it is discontinuous everywhere. Its set of disconti-
nuities in any proper interval does not have measure 0. D
Example 7.9.9 (Integrating the Characteristic Function of a Set)
Let A= {x 1 ,x2,· ·· ,xn} where a< X1 < x2 < ·· · < Xn < b. Then the
characteristic function XA has n discontinuities on [a, b]; namely, the points of
A. By Theorem 7.4.9, XA is integrable on [a, b], and
Thus, the integral of the characteristic function of a finite set is always 0.
The integral of the characteristic function of an infinite set can also be 0. In
Example 7 .4. 10 we showed that
l; X{-I;:nEN} = 0.
The integral of the characteristic function of an infinite set can also be any
real number x ; for example, if x ~ 0 and [O, x] ~ [a, b], t hen
l: X[D,x] = X.
In fact, the integral of the characteristic function of a proper interval is its
length: if [a, b] ~ [c, d], then
J: X[a,b) = b - a.
On the other hand, the characteristic function of an infinite set is not
necessarily integrable. For example, XIQ is the Dirichlet function, which is not
integrable on any proper interval.
Now, let C denote the Cantor set , defined in Section 3.4. Recall that
00
C= n Cn
n=l
where Cn is the union of 2n disjoint closed intervals of total l ength (~t (see
Definition 3.4.1). Note also that each Xcn is a step function and that Vn EN,
since C ~ Cn. This inequality shows that xc can be squeezed between two st ep
functions, 0 and XCn and