Tutorials › Measure Theory › Continuous Function Density for Regular Borel Measures

Completeness and Density in L^p · Tutorial 550 of 798

Continuous Function Density for Regular Borel Measures

See how regularity turns measurable sets into compactly supported continuous approximations, yielding density in finite-p Lp.

Advanced 12 min read

What You'll Learn

  • State the hypotheses for density of compactly supported continuous functions in Lp.
  • Use compact and open approximations of finite-measure Borel sets.
  • Apply a compact-support Urysohn function to control the Lp error.
  • Extend approximation from indicators to simple functions and general Lp functions.
  • Distinguish sigma-finiteness from finiteness of the measure space.
  • Identify why an indicator is not itself necessarily continuous.

From Regularity to Continuous Approximation

In \(L^p\), functions that agree almost everywhere represent the same element. This makes approximation of indicators a natural starting point: if a finite-measure Borel set can be enclosed by an open set and contains a compact set with small measure error, a continuous function can be built to equal one on the compact part and vanish outside the open part. Its discrepancy from the indicator is then confined to sets of small measure. The argument applies far beyond Euclidean space, provided the topology and measure have the right regularity.

Throughout, \(X\) is a locally compact, second-countable Hausdorff space, \(\mathcal{B}_X\) is its Borel sigma-algebra, and \(\mu\) is a sigma-finite Radon measure on \((X,\mathcal{B}_X)\). Here sigma-finite means \(X\) is a countable union of measurable sets of finite measure; it does not mean \(\mu(X)<\infty\). A Radon measure is finite on compact sets and regular: Borel sets can be approximated from outside by open sets, and open sets from inside by compact sets. Functions in \(L^p(\mu)\) are Borel-measurable real- or complex-valued functions, identified when they agree \(\mu\)-a.e. We consider \(1\le p<\infty\), and use the norm \(\|f\|_p=(\int_X|f|^p\,d\mu)^{1/p}\). The space \(C_c(X)\) consists of continuous functions with compact support, over the same scalar field.

Theorem: Under these hypotheses, \(C_c(X)\) is dense in \(L^p(\mu)\) for every \(1\le p<\infty\). Explicitly, for every \(f\in L^p(\mu)\) and every \(\varepsilon>0\), there is \(g\in C_c(X)\) such that \(\|f-g\|_p<\varepsilon\). The norm and approximation are understood up to \(\mu\)-a.e. equality.

The topological ingredient is the standard compact-support Urysohn lemma for locally compact Hausdorff spaces: if \(K\subset U\), where \(K\) is compact and \(U\) is open, there is a function \(h\in C_c(X)\) with \(0\le h\le1\), \(h=1\) on \(K\), and \(\operatorname{supp}(h)\subset U\). This is a standard result of general topology. The measure-theoretic argument below uses precisely this form.

Approximating a Finite-Measure Set

Proposition: If \(E\in\mathcal{B}_X\) and \(\mu(E)<\infty\), then for every \(\eta>0\) there is \(h\in C_c(X)\), \(0\le h\le1\), such that \(\|\chi_E-h\|_p^p<\eta\), for every \(1\le p<\infty\).

Proof. By inner regularity, choose a compact set \(K\subset E\) with \(\mu(E\setminus K)<\eta/2\). By outer regularity, choose an open set \(U\supset E\) with \(\mu(U\setminus E)<\eta/2\). In particular, \(K\subset U\). The compact-support Urysohn lemma gives \(h\in C_c(X)\) with \(0\le h\le1\), \(h=1\) on \(K\), and support contained in \(U\). On \(K\), \(h=\chi_E=1\). On \(X\setminus(E\cup U)\), both functions are zero. Everywhere else their absolute difference is at most one, so \[ |\chi_E-h|^p\le \chi_{E\setminus K}+\chi_{U\setminus E}. \] Integrating and using the two choices of approximating sets gives \[ \|\chi_E-h\|_p^p \le \mu(E\setminus K)+\mu(U\setminus E) <\eta. \] This proves the proposition. \(\square\)

The estimate explains the role of both approximations. The compact set ensures the cutoff equals the indicator on most of \(E\); the open set confines the cutoff’s possible extra values to a small-measure region outside \(E\). The measure of \(E\) is finite so that \(\chi_E\in L^p(\mu)\). No assumption that \(\mu(X)\) is finite is needed.

Worked Example: A Ramp Approximation on the Real Line

Take \(X=\mathbb{R}\), \(\mathcal{B}_{\mathbb{R}}\), and Lebesgue measure \(m\), which is sigma-finite and Radon. Let \(E=[0,1]\), and for \(0<\delta<1\) define \(h_\delta\) to be zero outside \([-\delta,1+\delta]\), to rise linearly from zero to one on \([-\delta,0]\), to equal one on \([0,1]\), and to decrease linearly to zero on \([1,1+\delta]\). The matching endpoint values make \(h_\delta\) continuous, and its support is compact.

The functions agree on \(E\). On the left transition interval, \(h_\delta(x)=(x+\delta)/\delta\); on the right, \(h_\delta(x)=(1+\delta-x)/\delta\). Thus, for every finite \(p\ge1\),

$$ \|\chi_E-h_\delta\|_p^p =2\int_0^\delta\left(1-\frac{t}{\delta}\right)^pdt =2\delta\int_0^1(1-s)^pds =\frac{2\delta}{p+1}. $$

Here the change of variable is \(s=t/\delta\). For example, with \(p=2\) and \(\delta=1/10\), the \(p\)-th power of the error is \(2(1/10)/3=1/15\), so the norm is \(1/\sqrt{15}\). As \(\delta\) tends to zero, the displayed error tends to zero. Check: when \(p=2\), each transition contributes \(\int_0^\delta(1-t/\delta)^2dt=\delta/3\); the two contributions sum to \(2\delta/3\), as in the formula.

Extending from Indicators to All of \(L^p\)

We use the simple-function density result for finite-\(p\) spaces: for \(f\in L^p(\mu)\) and any positive tolerance, there is a simple function \(s=\sum_{j=1}^N c_j\chi_{E_j}\) with \(\mu(E_j)<\infty\) and \(\|f-s\|_p\) smaller than that tolerance. The sets can be taken Borel here. In the completed measure space, a completed-measurable function has a Borel representative up to a null set, so the same conclusion holds for its \(L^p\) class. This simple-function density is the standard reduction from the earlier material on simple-function approximation; the new step is replacing each indicator by a continuous function.

Proof of the theorem. Fix \(f\in L^p(\mu)\) and \(\varepsilon>0\). Choose a finite-measure-supported simple function \(s=\sum_{j=1}^N c_j\chi_{E_j}\) such that \(\|f-s\|_p<\varepsilon/2\). If all \(c_j=0\), then \(s=0\) and \(g=0\) already gives \(\|f-g\|_p<\varepsilon\). Otherwise, set \(C=\sum_{j=1}^N|c_j|>0\). For each \(j\) with \(c_j\ne0\), the proposition supplies \(h_j\in C_c(X)\) with \(0\le h_j\le1\) and \[ \|\chi_{E_j}-h_j\|_p<\frac{\varepsilon}{2C}. \] For \(c_j=0\), set \(h_j=0\). Define \(g=\sum_{j=1}^N c_jh_j\). A finite sum of continuous functions is continuous, and a finite union of compact supports is compact, so \(g\in C_c(X)\). By the triangle inequality in \(L^p\), \[ \|s-g\|_p \le\sum_{j=1}^N|c_j|\,\|\chi_{E_j}-h_j\|_p <\sum_{j:c_j\ne0}|c_j|\frac{\varepsilon}{2C} =\frac{\varepsilon}{2}. \] Applying the triangle inequality once more yields \[ \|f-g\|_p\le\|f-s\|_p+\|s-g\|_p<\frac{\varepsilon}{2}+\frac{\varepsilon}{2} =\varepsilon. \] Thus \(C_c(X)\) is dense in \(L^p(\mu)\). \(\square\)

The proof separates the roles of the assumptions. Sigma-finiteness permits reduction to simple functions supported on finite-measure sets. Radon regularity supplies the compact and open approximations. Local compactness and the Hausdorff condition allow a compactly supported continuous cutoff between them. The finite-\(p\) restriction matters: the argument controls the \(p\)-th power of the error by the measure of the disagreement region.

Worked Example: A Weighted Radon Measure

On \(\mathbb{R}\), let \(d\mu(x)=e^{-|x|}\,dx\), a sigma-finite Radon measure, and again take \(E=[0,1]\). Use the ramp \(h_\delta\) from the previous example. Since \(e^{-|x|}\le1\) everywhere, the two transition intervals give, for \(1\le p<\infty\),

$$ \|\chi_E-h_\delta\|_p^p \le 2\int_0^\delta\left(1-\frac{t}{\delta}\right)^pdt =\frac{2\delta}{p+1}. $$

For \(p=2\) and \(\delta=1/10\), this gives \(\|\chi_E-h_\delta\|_2^2\le1/15\), hence \(\|\chi_E-h_\delta\|_2\le1/\sqrt{15}\). The estimate is enough for approximation even though the weighted integrals of the ramps need not equal the unweighted ones. Check: the error vanishes on \([0,1]\) and outside \([-1/10,11/10]\); only the two intervals of length \(1/10\) contribute, and the weight on each is at most one.

Worked Example: Continuous Representatives for a Two-Atom Measure

Let \(X=\mathbb{R}\) and \(\mu=\delta_0+2\delta_1\), a finite Radon measure. A measurable function’s \(L^p(\mu)\) class is determined by its values at 0 and 1. Consider the function with \(f(0)=2\) and \(f(1)=-1\). Define \(u(x)=\max(1-2|x|,0)\), \(v(x)=\max(1-2|x-1|,0)\), and \(g=2u-v\). Both \(u,v\) are continuous and compactly supported, with \(u(0)=1,\ u(1)=0,\ v(0)=0,\ v(1)=1\). Thus \(g(0)=2\) and \(g(1)=-1\).

The error is zero at both atoms, so for every finite \(p\ge1\), \[ \|f-g\|_p^p=|f(0)-g(0)|^p+2|f(1)-g(1)|^p=0^p+2\cdot0^p=0. \] The equality is an \(L^p(\mu)\) equality; values away from the two atoms do not affect the norm. Check: integrating the error against \(\delta_0+2\delta_1\) uses only its values at 0 and 1, both of which are zero.

A Common Pitfall: An Indicator Is Not a Cutoff

For Lebesgue measure on \(\mathbb{R}\), the indicator \(\chi_{[0,1]}\) is not continuous, so it is not itself an element of \(C_c(\mathbb{R})\). A common mistake is to call it a continuous approximation merely because it has compact support. Compact support does not imply continuity. The ramp example gives the correction: the approximants are continuous, agree with the indicator except on transition intervals, and their \(L^p\) error is \(2\delta/(p+1)\), which can be made smaller than any prescribed positive number.

Another important distinction is that sigma-finiteness does not make every indicator eligible for this argument. If \(\mu(E)=\infty\), then \(\chi_E\notin L^p(\mu)\) for finite \(p\), since \(\int|\chi_E|^p\,d\mu=\mu(E)=\infty\). The density proof instead approximates \(L^p\) functions by simple functions whose level sets have finite measure. No claim is being made that an infinite-measure indicator is approximable in \(L^p\).

Why the Result Is Useful

The theorem lets one test or construct \(L^p\) functions using continuous functions with controlled support, even when the underlying measure is weighted or the space is not Euclidean. The key quantitative statement is the set estimate: an error bounded by one and confined to a set of measure less than \(\eta\) has \(p\)-th power of its \(L^p\) norm less than \(\eta\). Regularity supplies precisely that small region of disagreement. The result does not say every \(L^p\) function has a continuous representative; it says continuous compactly supported functions are dense in the norm.

Check Your Understanding

For each question, identify where regularity, finite measure, or the \(L^p\) norm enters the argument.

  1. For \(E\in\mathcal{B}_X\) with \(\mu(E)<\infty\), explain why both a compact \(K\subset E\) and an open \(U\supset E\) are needed to construct the cutoff approximation.
  2. In the ramp example on \(\mathbb{R}\) with Lebesgue measure, compute the error norm when \(p=1\) and \(\delta=1/4\).
  3. Why does \(\chi_E\notin L^p(\mu)\) when \(\mu(E)=\infty\) and \(p<\infty\)?
  4. In the two-atom example, why is the norm of the error zero even if \(f\) and \(g\) differ away from 0 and 1?
  5. Which step in the density proof uses the triangle inequality, and why is the stated theorem restricted to \(p\ge1\)?