Tutorials › Measure Theory › Approximating C_0(X) Functions by Compactly Supported Ones

The Riesz Representation Theorem · Tutorial 679 of 798

Approximating C_0(X) Functions by Compactly Supported Ones

Learn how vanishing at infinity and a compactly supported cutoff combine to give uniform approximations in \(C_c(X)\).

Advanced 10 min read

What You'll Learn

  • Define \(C_0(X)\), \(C_c(X)\), support, and the uniform norm.
  • Use compact level sets to select where an approximation must agree with a given function.
  • Apply a locally compact Hausdorff cutoff to prove uniform density.
  • Construct explicit piecewise-linear cutoffs on the real line.
  • Compute uniform error bounds for approximations to three functions.
  • Identify why sharp truncation can destroy continuity.

Vanishing at Infinity and Compact Support

On a noncompact space, a continuous function need not have compact support: it may remain nonzero arbitrarily far out. The space \(C_0(X)\) consists of continuous functions that become uniformly small outside a compact set, while \(C_c(X)\) consists of continuous functions that vanish outside a compact set. The key to approximating a function in \(C_0(X)\) is to preserve it where its magnitude is appreciable and taper it continuously to zero outside a compact region.

Throughout, \(X\) is a locally compact Hausdorff space. No measure is being used: all convergence and norms below are pointwise or uniform on \(X\), not almost everywhere. Functions may be real-valued or complex-valued, and \(|f(x)|\) denotes the absolute value or complex modulus.

Definition: The support of a continuous function \(f:X\to\mathbb{R}\) or \(f:X\to\mathbb{C}\) is \(\operatorname{supp}f=\overline{\{x\in X:f(x)\ne0\}}\), with closure taken in \(X\). The space \(C_c(X)\) consists of continuous functions with compact support. The space \(C_0(X)\) consists of continuous functions \(f\) such that \(\{x\in X:|f(x)|\ge\varepsilon\}\) is compact for every \(\varepsilon>0\). We use the uniform norm \(\|f\|_\infty=\sup_{x\in X}|f(x)|\).

The level-set definition expresses “vanishing at infinity” without requiring a distance or a notion of going to infinity along a sequence. It also immediately identifies the compact set on which an approximation should match \(f\). The norm in this definition is finite: for \(f\in C_0(X)\), the set \(K=\{|f|\ge1\}\) is compact, and \(|f|<1\) outside \(K\). Continuity makes \(f\) bounded on \(K\), so it is bounded on all of \(X\).

Proposition: For every locally compact Hausdorff space \(X\), \(C_c(X)\subseteq C_0(X)\). Each function in \(C_c(X)\) is bounded.

Proof. Let \(f\in C_c(X)\), and put \(K=\operatorname{supp}f\), which is compact. The continuous function \(f\) is bounded on \(K\), and it is zero on \(X\setminus K\), so it is bounded on \(X\). For any \(\varepsilon>0\), the set \(F_\varepsilon=\{x:|f(x)|\ge\varepsilon\}\) is closed because \(x\mapsto |f(x)|\) is continuous and \([\varepsilon,\infty)\) is closed. Also \(F_\varepsilon\subseteq K\), since \(f(x)\ne0\) for every \(x\in F_\varepsilon\). Thus \(F_\varepsilon\) is a closed subset of the compact set \(K\), hence compact. This is exactly the defining condition for \(f\in C_0(X)\). \(\square\)

The Cutoff Principle

We use the locally compact Hausdorff cutoff result: if \(K\subseteq U\subseteq X\), where \(K\) is compact and \(U\) is open, there is an \(\eta\in C_c(X)\) with \(0\le\eta\le1\), \(\eta=1\) on \(K\), and \(\operatorname{supp}\eta\subseteq U\). This is the compactly supported Urysohn cutoff construction. In particular, taking \(U=X\) gives a compactly supported function equal to one on any prescribed compact set.

Theorem: If \(X\) is locally compact Hausdorff, then \(C_c(X)\) is dense in \(C_0(X)\) in the uniform norm. Explicitly, for every \(f\in C_0(X)\) and every \(\delta>0\), there exists \(g\in C_c(X)\) such that \(\|f-g\|_\infty<\delta\).

Proof. If \(X\) is empty, the only function on \(X\) is the zero function and the claim holds with \(g=0\). Otherwise, fix \(f\in C_0(X)\) and \(\delta>0\), and set \(\varepsilon=\delta/2\). The set \(K=\{x:|f(x)|\ge\varepsilon\}\) is compact by the definition of \(C_0(X)\). Apply the cutoff result with \(U=X\) to obtain \(\eta\in C_c(X)\) such that \(0\le\eta\le1\) and \(\eta=1\) on \(K\). Define \(g=\eta f\). The product of continuous functions is continuous, and \(\operatorname{supp}g\subseteq\operatorname{supp}\eta\), so \(g\in C_c(X)\). For \(x\in K\), \(g(x)=f(x)\). For \(x\notin K\), \(|f(x)|<\varepsilon\), and therefore \[ |f(x)-g(x)|=|1-\eta(x)|\,|f(x)|\le |f(x)|<\varepsilon, \] because \(0\le\eta(x)\le1\). Hence \(\|f-g\|_\infty\le\varepsilon=\delta/2<\delta\). If \(K\) is empty, the same cutoff construction may use \(\eta=0\); the estimate \(|f(x)|<\varepsilon\) holds everywhere. Thus the conclusion includes that case as well. \(\square\)

The proof gives a useful error estimate: the approximation agrees exactly with \(f\) wherever \(|f|\ge\varepsilon\), and its error is at most \(\varepsilon\) everywhere else. The cutoff may be chosen independently of the values of \(f\); it only needs to equal one on the compact level set.

Explicit Cutoffs on the Real Line

On \(\mathbb{R}\), with its usual topology, a convenient cutoff for any \(R>0\) is \[ \eta_R(x)= \begin{cases} 1,& |x|\le R,\\ R+1-|x|,& R<|x|<R+1,\\ 0,& |x|\ge R+1. \end{cases} \]

The formulas agree at \(|x|=R\) and \(|x|=R+1\), so \(\eta_R\) is continuous. It takes values in \([0,1]\), equals one on \([-R,R]\), and has support \([-R-1,R+1]\), a compact interval. For a continuous function \(f\) vanishing at infinity, \(g_R=\eta_R f\) is therefore in \(C_c(\mathbb{R})\). The error is zero on \([-R,R]\); outside that interval it is \(|1-\eta_R(x)|\,|f(x)|\). The following examples compute that error explicitly.

Worked Example: Approximating \(e^{-|x|}\)

Take \(f(x)=e^{-|x|}\) and \(R=2\). This function is continuous and tends to zero as \(|x|\to\infty\), so its level sets \(\{|f|\ge\varepsilon\}\) are compact for every \(\varepsilon>0\). Set \(g_2=\eta_2f\), which is supported in \([-3,3]\). Write \(t=|x|\). For \(2\le t\le3\), \(1-\eta_2(x)=t-2\), and for \(t\ge3\), \(1-\eta_2(x)=1\). Thus \[ |f(x)-g_2(x)|= \begin{cases} e^{-t}(t-2),&2\le t\le3,\\ e^{-t},&t\ge3,\\ 0,&t\le2. \end{cases} \] On \(2\le t\le3\), the derivative of \(e^{-t}(t-2)\) is \(e^{-t}(3-t)\ge0\), so the error increases to \(e^{-3}\). For \(t\ge3\), \(e^{-t}\le e^{-3}\). Consequently \(\|f-g_2\|_\infty=e^{-3}\); equality occurs at \(x=3\) and \(x=-3\). Check: at \(x=3\), \(\eta_2(3)=0\), so \(|f(3)-g_2(3)|=|e^{-3}-0|=e^{-3}\), as calculated.

Worked Example: Approximating \(1/(1+x^2)\)

Let \(f(x)=1/(1+x^2)\), and again use \(R=2\). This continuous function tends to zero at both ends of the real line, and \(g_2=\eta_2f\) is supported in \([-3,3]\). On \(2\le t=|x|\le3\), \[ |f(x)-g_2(x)|=\frac{t-2}{1+t^2}. \] Since \(0\le t-2\le1\) and \(1+t^2\ge5\), this is at most \(1/5\). On \(t\ge3\), the error is \(1/(1+t^2)\le1/10\); on \(t\le2\), it is zero. Therefore \(\|f-g_2\|_\infty\le1/5\). Check: at \(x=3\), the cutoff is zero and the error is \(1/(1+3^2)=1/10\), consistent with the tail bound \(1/10\). The overall bound \(1/5\) follows from the transition-region estimate, not from the value at \(x=3\).

Worked Example: Approximating \(1/(1+|x|)\)

Take \(f(x)=1/(1+|x|)\), and choose \(R=3\). The function is continuous, tends to zero at infinity, and \(g_3=\eta_3f\) has support \([-4,4]\). On the transition region \(3\le t=|x|\le4\), \(1-\eta_3(x)=t-3\), so \[ |f(x)-g_3(x)|=\frac{t-3}{1+t}. \] Its derivative with respect to \(t\) is \(4/(1+t)^2>0\), so this error increases from zero to \(1/5\). For \(t\ge4\), the error is \(1/(1+t)\le1/5\), and for \(t\le3\) it is zero. Thus \(\|f-g_3\|_\infty=1/5\). Check: at \(x=4\), \(\eta_3(4)=0\) and \(f(4)=1/(1+4)=1/5\), which attains the stated error.

Why Sharp Truncation Is Not Enough

A tempting construction is to keep \(f\) on a compact interval and set it to zero immediately outside. That generally produces a discontinuity at the boundary, so it need not belong to \(C_c(X)\). For example, define \(q(x)=e^{-|x|}\chi_{[-2,2]}(x)\), where \(\chi_{[-2,2]}\) is one on \([-2,2]\) and zero elsewhere. At \(x=2\), \(q(2)=e^{-2}\), but for every \(x>2\), \(q(x)=0\). The right-hand limit at \(2\) is zero, not \(q(2)\); hence \(q\) is not continuous and is not in \(C_c(\mathbb{R})\).

The tapered cutoff fixes precisely this boundary problem: \(\eta_2\) decreases continuously from one to zero on \(2<|x|<3\). Multiplication by it preserves continuity while making the support compact. This is the practical content of the density theorem: a function in \(C_0(X)\) need not itself have compact support, but its small tail can be discarded with arbitrarily small uniform error.

When \(X\) is compact, every continuous function has compact support, since its support is a closed subset of \(X\). In that case \(C_c(X)=C_0(X)=C(X)\), and the density statement is immediate. The theorem is most useful on noncompact spaces, where it allows continuous functions vanishing at infinity to be handled through compactly supported test functions without changing them by much in the uniform norm.

Check Your Understanding

In each question, keep track of both the compact support and the uniform error.

  1. For a locally compact Hausdorff space \(X\), explain why \(\{|f|\ge\varepsilon\}\) is compact when \(f\in C_0(X)\) and \(\varepsilon>0\).
  2. In the density proof, why is it useful to choose a cutoff equal to one on \(\{|f|\ge\delta/2\}\)?
  3. For \(f(x)=1/(1+x^2)\), use \(\eta_R\) with \(R>0\) to give an upper bound for \(\|f-\eta_Rf\|_\infty\).
  4. For \(f(x)=e^{-|x|}\), explain why \(e^{-|x|}\chi_{[-2,2]}(x)\) is not continuous at \(x=2\).
  5. If \(X\) is compact, why does every \(f\in C(X)\) already belong to \(C_c(X)\)?