As an important application of the area formula I will give a general version of the divergence theorem. It will always be assumed n ≥ 2. Actually it is not necessary to make this assumption but what results in the case where n = 1 is nothing more than the fundamental theorem of calculus and the considerations necessary to draw this conclusion seem unneccessarily tedious. You have to consider ℋ^{0}, zero dimensional Hausdorff measure. It is left as an exercise but I will not present it.
It will be convenient to have some lemmas and theorems in hand before beginning the proof. First recall the Tietze extension theorem on Page 224. It is stated next for convenience.
Theorem 20.2.1 Let M be a closed nonempty subset of a metric space
The next topic needed is the concept of an infinitely differentiable partition of unity.
Definition 20.2.2 Let ℭ be a set whose elements are subsets of ℝ^{n}.^{1} Then ℭ is said to be locally finite if for every x ∈ ℝ^{n}, there exists an open set, U_{x} containing x such that U_{x} has nonempty intersection with only finitely many sets of ℭ.
Also recall the following which is proved in more generality in Theorem 2.4.5.
Lemma 20.2.3 Let ℭ be a set whose elements are open subsets of ℝ^{n} and suppose ∪ℭ ⊇ H, a closed set. Then there exists a countable list of open sets,
The set,

The set of rational numbers is definitely not locally finite. However, the set of integer ℤ is locally finite.
Lemma 20.2.4 Let ℭ be locally finite. Then

Next suppose the elements of ℭ are open sets and that for each U ∈ℭ, there exists a differentiable function, ψ_{U} having spt

Furthermore, f is also a differentiable function^{2} and

Proof: Let p be a limit point of ∪ℭ and let W be an open set which intersects only finitely many sets of ℭ. Then p must be a limit point of one of these sets. It follows p ∈∪
Now consider the second assertion. Letting x ∈ ℝ^{n}, there exists an open set, W intersecting only finitely many open sets of ℭ, U_{1},U_{2},

and so the desired result is obvious. It merely says that a finite sum of differentiable functions is differentiable. ■
Recall the following definition.
Definition 20.2.5 Let K be a closed subset of an open set U. K ≺ f ≺ U if f is continuous, has values in
Lemma 20.2.6 Let U be a bounded open set and let K be a closed subset of U. Then there exist an open set W, such that W ⊆W ⊆ U and a function, f ∈ C_{c}^{∞}
Proof: The set, K is compact so is at a positive distance from U^{C}. Let

Also let

Then it is clear

Now consider the function,

Since W is compact it is at a positive distance from W_{1}^{C} and so h is a well defined continuous function which has compact support contained in W_{1}, equals 1 on W, and has values in

it follows that for such k,the function, h∗ϕ_{k} ∈ C_{c}^{∞}
The above lemma is used repeatedly in the following.
Lemma 20.2.7 Let K be a closed set and let

and the function f

is in C^{∞}
Proof: Let K_{1} = K ∖∪_{i=2}^{∞}V _{i}. Thus K_{1} is compact because K_{1} ⊆ V _{1}. Let W_{1} be an open set having compact closure which satisfies

Thus W_{1},V _{2},

It follows K_{r+1} is compact because K_{r+1} ⊆ V _{r+1}. Let W_{r+1} satisfy

Continuing this way defines a sequence of open sets,

Note

Similarly,
Since the sets,

Now define

Note how the sum makes sense because of local finiteness. If x is such that ∑ _{j=1}^{∞}ϕ_{j}(x) = 0, then x
The functions,
The method of proof of this lemma easily implies the following useful corollary.
Corollary 20.2.8 If H is a compact subset of V _{i} for some V _{i} there exists a partition of unity such that ψ_{i}
Proof: Keep V _{i} the same but replace V _{j} with
Recall Corollary 7.5.8 which implies most of the following lemma listed here for convenience.
Lemma 20.2.9 Let Ω be a complete separable metric space and suppose μ is a measure defined on the Borel sets of Ω which is finite on balls, the closures of these balls being compact. Then μ must be both inner and outer regular on all Borel sets. The completion of this measure must also be inner and outer regular.
Proof: It only remains to verify the claim about . Recall that is defined as

Then if S is arbitrary, there exists E ⊇ S such that E is the countable intersection of open sets and

Hence B ∩E^{C} ⊆ F because from the above, E ⊇

from the above. Now B ∩E^{C} is a countable union of closed sets. Hence there exists a closed set C such that C ⊆ F and

Hence, since

In fact, since the closures of balls are compact, these C_{n} are all compact and this shows inner regularity. ■
You could possibly generalize to the case where it is not known that the closed balls are compact using Lemma 7.5.4. This is certainly possible if the measure is finite, but maybe it is also possible for measures which are finite on balls. You could look at the given measure restricted to a ball and apply the lemma to this restricted measure. Then you could follow a similar argument to the above.
One more lemma will be useful. It involves approximating a continuous function uniformly with one which is infinitely differentiable.
Lemma 20.2.10 Let V be a bounded open set and let X be the closed subspace of C

Then C_{c}^{∞}

Proof: Let O ⊆O ⊆ W ⊆W ⊆ V be such that dist

This proves the lemma since ε was arbitrary. ■
Definition 20.2.11 A bounded open set, U ⊆ ℝ^{n} is said to have a Lipschitz boundary and to lie on one side of its boundary if the following conditions hold. There exist open boxes, Q_{1},

such that ∂U ≡U ∖ U is contained in their union. Also, for each Q_{i}, there exists k and a Lipschitz function, g_{i} such that U ∩ Q_{i} is of the form
or else of the form The function, g_{i} has a derivative on A_{i} ⊆∏ _{j=1}^{k−1}

Also, there exists an open set, Q_{0} such that Q_{0} ⊆Q_{0} ⊆ U and U ⊆ Q_{0} ∪ Q_{1} ∪
Note that since there are only finitely many Q_{i} and each g_{i} is Lipschitz, it follows from an application of Lemma 20.0.1 that ℋ^{n−1}
Lemma 20.2.12 Suppose U is a bounded open set as described above. Then there exists a unique function in L^{∞}

Proof: Let U ⊆ V ⊆V ⊆∪_{i=0}^{N}Q_{i} and let

Thus using the dominated convergence theorem and Rademacher’s theorem,

 (20.30) 
Since spt

Then