A.6. THE CHANGE OF VARIABLES FORMULA 863

where li is the length of the ith side. (Thus the boxes are not too far from being cubes.)Let C be the constant of Lemma A.6.4 applied to g on H.Now consider one of these boxes, Q ∈ G ′. If x,y ∈ Q, it follows from the chain rule

that

g (y)−g (x) =∫ 1

0Dg (x+t (y−x))(y−x)dt

By Lemma A.6.4 applied to H

|g (y)−g (x)| ≤∫ 1

0|Dg (x+t (y−x))(y−x)|dt

≤ C∫ 1

0|x−y|dt ≤C diam(Q)

= C

(n

∑i=1

l2i

)1/2

≤C√

nL

where L is the length of the longest side of Q. Thus diam(g (Q))≤C√

nL and so g (Q) iscontained in a cube having sides equal to C

√nL and volume equal to

Cnnn/2Ln ≤Cnnn/22nl1l2 · · · ln =Cnnn/22nv(Q) .

Denoting by PQ this cube, it follows

h(∂U)⊆ ∪Q∈G ′v(PQ)

and∑

Q∈G ′v(PQ)≤Cnnn/22n

∑Q∈G ′

v(Q)< εCnnn/22n.

Since ε > 0 is arbitrary, this shows h(∂U) has content zero as claimed. ■

Theorem A.6.7 Suppose f ∈C(U)

where U is a bounded open set with ∂U having content0. Then f XU ∈R (Rn).

Proof: Let H be a compact set whose interior contains U which is also contained in thedomain of g where g is a continuous functions whose restriction to U equals f . ConsidergXU , a function whose set of discontinuities has content 0. Then gXU = f XU ∈R (Rn) asclaimed. This is by the big theorem which tells which functions are Riemannn integrable.■

The symbol U −p is defined as {x−p : x ∈U}. It merely slides U by the vector p.The following lemma is obvious from the definition of the integral.

Lemma A.6.8 Let U be a bounded open set and let f XU ∈R (Rn). Then∫f (x+p)XU−p (x)dx =

∫f (x)XU (x)dx

A few more lemmas are needed.

Lemma A.6.9 Let S be a nonempty subset of Rn. Define

f (x)≡ dist(x,S)≡ inf{|x−y| : y ∈ S} .

Then f is continuous.