Notice that sup
f
V
z

inf
f
V
z
1
k
<
"
. Look at
{
V
z
:
z
2
E
C
k
}
and note that
S
z
2
E
C
k
V
z
◆
E
C
k
◆
X
. Since
X
is
compact and each
V
z
is open, find a finite subcover
V
1
, . . . , V
m
of
X
.
Now
I
1
, . . . , I
n
, V
1
, . . . , V
m
covers [
a, b
]. Take as a partition
P
the endpoints of these intervals, along with the points
a
and
b
. For each pair of consecutive points
x
i

1
, x
i
in the partition, we either have
x
i

1
, x
i
2
I
j
or
x
i

1
, x
i
2
V
j
. If
x
i

1
, x
i
2
V
j
, then
M
i

m
i
sup
f
V
j

inf
f
V
j
<
"
and if
x
i

1
, x
i
2
I
j
, then
M
i

m
i
2
C
, where

f
(
x
)

C
for all
x
2
[
a, b
]. Now we have
U
(
f, P
)

L
(
f, P
) =
X
(
M
i

m
i
)(
x
i

x
i

1
) =
X
x
i

1
,x
i
2
V
j
for some
j
(
M
i

m
i
)(
x
i

x
i

1
) +
X
x
i

1
,x
i
2
I
j
for some
j
x
i

1
,x
i
/
2
V
j
for any
V
j
(
M
i

m
i
)(
x
i

x
i

1
)
<
"
X
(
x
i

x
i

1
) + 2
C
X
x
i

1
,x
i
2
I
j
for some
j
x
i

1
,x
i
/
2
V
j
for any
V
j
(
x
i

x
i

1
)
"
(
b

a
) + 2
C
n
X
j
=1
`
(
I
j
) =
"
(
b

a
) + 2
C
"
=
"
(
b

a
+ 2
C
)
Since
b

a
+ 2
C
is a constant, we could get this arbitrarily small by choosing a su
ffi
ciently small
"
.
Conversely, suppose
f
is Riemann integrable, and we want to prove
m
(
E
) = 0. Since
E
=
S
1
k
=1
E
k
, it is enough to
show that
m
⇤
(
E
k
) = 0 for each
k
. So fix
k
and
"
>
0. Since
f
is Riemann integrable, we can find a partition
P
such
that
U
(
f, P
)

L
(
f, P
)
<
"
k
. Let
I
=
{
i
: (
x
i

1
, x
i
)
\
E
k
6
=
;
}
. Now
"
k
> U
(
f, P
)

L
(
f, P
) =
X
(
M
i

m
i
)(
x
i

x
i

1
)
≥
X
i
2
I
(
M
i

m
i
)(
x
i

x
i

1
)
≥
X
i
2
I
1
k
(
x
i

x
i

1
)