It is very important to be able to approximate measurable and integrable functions with continuous functions having compact support. Recall Theorem 7.4.2. This implies the following.
Theorem 8.6.1 Let f ≥ 0 be ℱ_{n} measurable and let ∫ fdm_{n} < ∞. Then there exists a sequence of continuous functions
Definition 8.6.2 Let U be an open subset of ℝ^{n}. C_{c}^{∞}(U) is the vector space of all infinitely differentiable functions which equal zero for all x outside of some compact set contained in U. Similarly, C_{c}^{m}
Corollary 8.6.3 Let U be a nonempty open set in ℝ^{n} and let f ∈ L^{p}

Proof: If f ≥ 0 then extend it to be 0 off U. In the above argument, let all functions involved, the simple functions and the continuous functions be zero off U. Simply intersect all V _{i} with U and no harm is done. Now to extend to L^{p}
Proof: Pick z ∈ U and let r be small enough that B
For a different approach see Problem 2 on Page 759.
This leads to a really remarkable result about approximation with smooth functions.
Definition 8.6.6 Let U = {x ∈ ℝ^{n} : x < 1}. A sequence {ψ_{m}}⊆ C_{c}^{∞}(U) is called a mollifier (This is sometimes called an approximate identity if the differentiability is not included.) if

and ∫ ψ_{m}(x) = 1. Sometimes it may be written as

where c_{m} is chosen to make ∫ c_{m}ψ
The notation ∫ f(x,y)dμ(y) will mean x is fixed and the function y → f(x,y) is being integrated. To make the notation more familiar, dx is written instead of dm_{n}(x).
Proof: Let ψ_{m} be a mollifier. Consider

Then since the integral of ψ_{m} is 1, it follows that

Since g is zero off a compact set, it follows that g is uniformly continuous and so there is δ > 0 such that if

This follows from the change of variables formulas presented above.
To see the function is differentiable,

and now, since ψ_{m} is zero off a compact set, it and its partial derivatives of all order are uniformly continuous. Hence, one can pass to a limit and obtain

Repeat the same argument using the partial derivative of ψ_{m} in place of ψ_{m}. Continuing this way, one obtains the existence of all partial derivatives at any x. Thus h_{m} ∈ C_{c}^{∞}
Note that this would have worked for μ an arbitrary regular measure.
Now it is obvious that the functions in C_{c}^{∞}

and there is h ∈ C_{c}^{∞}

Then

Theorem 8.6.8 Let U be an open set in ℝ^{n} and let f ∈ L^{p}

In words, C_{c}^{∞}
Functions which vanish off a compact set are said to have “compact support”. Note that all of this would work for any regular measure μ. Now what follows will be dependent on the measure being Lebesgue measure or something like it.