From Measurable Functions to Continuous Approximations
Continuous functions are easier to evaluate locally and are central to differentiation arguments, but indicators of measurable sets are usually discontinuous. The useful substitute is not necessarily pointwise or uniform approximation: it is approximation in the integral of the absolute error. On bounded subsets of \(\mathbb{R}^n\), regularity of Lebesgue measure lets us replace a measurable set by a compact set inside it and an open set around it, with the difference in measure as small as desired. A continuous function can then transition between the two.
We work with Lebesgue measure \(m\) on \((\mathbb{R}^n,\mathcal{L})\). For a measurable real-valued function \(f\), write \(\|f\|_1=\int_{\mathbb{R}^n}|f|\,dm\) when this integral is finite. The space \(C_c(\mathbb{R}^n)\) consists of continuous real-valued functions on \(\mathbb{R}^n\) with compact support. An \(L^1\) approximation means that this norm of the difference is small; it does not mean the functions are close at every point.
Continuous Cutoffs for Measurable Sets
The geometric input is a continuous function that is one on a compact set and zero outside a slightly larger open set. For \(x\in\mathbb{R}^n\) and nonempty \(K\subset\mathbb{R}^n\), let \(d(x,K)=\inf_{y\in K}|x-y|\). Suppose \(K\) is compact, \(U\) is bounded and open, and \(K\subset U\). The distance from \(K\) to the closed set \(U^c\) is positive: the continuous distance function attains its minimum on compact \(K\), and that minimum cannot be zero because \(K\cap U^c=\varnothing\). Choose \(\delta>0\) smaller than this distance and put
The distance function is continuous, so \(g\) is continuous, \(0\le g\le1\), and \(g=1\) on \(K\). Its support is contained in \(\{x:d(x,K)\le\delta\}\), a closed bounded set contained in \(U\); hence \(g\in C_c(\mathbb{R}^n)\). If \(K=\varnothing\), use \(g=0\); in applications where the omitted set has small measure, this already gives the required error bound.
Proof. If \(K\ne\varnothing\), construct \(g\) by the distance formula above, choosing \(\delta\) smaller than the distance from \(K\) to \(U^c\). On \(K\), \(g=\chi_E=1\), so the error is zero. At every point outside \(U\), \(g=0\) and \(\chi_E=0\), since \(E\subseteq U\). At each point in \(U\setminus K\), both values lie in \([0,1]\), so \(|g-\chi_E|\le1\). Thus \(|g-\chi_E|\le\chi_{U\setminus K}\) everywhere, and integration gives the asserted bound. If \(K=\varnothing\), take \(g=0\). Since \(E\subseteq U=U\setminus K\), \(|g-\chi_E|=\chi_E\le\chi_{U\setminus K}\), giving the same bound. \(\square\)
Combining the proposition with regularity gives a useful consequence: for every bounded measurable \(E\subset\mathbb{R}^n\) and every \(\varepsilon>0\), there is \(g\in C_c(\mathbb{R}^n)\) with \(0\le g\le1\) and \(\|g-\chi_E\|_1<\varepsilon\). Indeed, choose \(K,U\) with \(m(U\setminus K)<\varepsilon\) and apply the proposition.
Worked Example: A Continuous Approximation to an Interval Indicator
Approximate \(\chi_{[1,3]}\) on \((\mathbb{R},\mathcal{L},m)\) by a continuous compactly supported function and compute the L1 error for a transition width of \(1/4\). Define
For \(1\le x\le3\), both affine expressions inside the maxima are at least \(1\), so \(g(x)=1\). For \(3/4\le x\le1\), the first ramp rises linearly from \(0\) to \(1\); for \(3\le x\le13/4\), the second falls linearly from \(1\) to \(0\). Outside \([3/4,13/4]\), \(g=0\). The function is continuous and has compact support. The error is zero on \([1,3]\) and outside \([3/4,13/4]\). On each of the two ramp intervals the indicator is zero, so the error is the ramp itself. Each triangular area is \(\frac12\cdot\frac14\cdot1=\frac18\). Therefore
Check: the two transition intervals each have width \(1/4\) and height \(1\); their combined area is \(2\cdot(1/2)(1/4)(1)=1/4\), as computed. The endpoint values cause no additional error; in any case, a finite set has Lebesgue measure zero.
Worked Example: Cutoffs Around a Compact Set of Measure Zero
Let \(K=\{0,2\}\subset\mathbb{R}\), a compact set with \(m(K)=0\), and take \(\delta=1/4\). Set \(g(x)=\max(0,1-4d(x,K))\). This continuous function equals \(1\) on \(K\), decreases linearly to zero at distance \(1/4\), and is supported on the two disjoint intervals \([-1/4,1/4]\) and \([7/4,9/4]\). Since \(\chi_K=0\) outside \(K\), and \(g=1=\chi_K\) on \(K\), the error equals \(g\) outside \(K\), with no contribution on \(K\). Each triangular piece has base \(1/2\) and height \(1\), so its integral is \((1/2)(1/2)(1)=1/4\). Hence
Check: \(m(K)=0\), so \(\int\chi_K\,dm=0\); the two triangular areas give \(\int g\,dm=1/2\). Because \(g-\chi_K\ge0\) outside \(K\) and vanishes on \(K\), this also verifies the L1 error directly.
Approximation of Integrable Functions
The set approximation extends to simple functions by adding finitely many cutoffs. It then extends to integrable functions by first truncating and quantizing their values. We give the argument for real-valued functions supported in a bounded measurable set; the extension to a bounded measurable region is stated afterward.
Proof. If \(m(A)=0\), then \(f=0\) almost everywhere, and \(h=0\) gives error zero. Suppose \(m(A)>0\). Changing \(f\) on a null set does not change its L1 class, so take a representative that is zero outside \(A\). For \(T>0\), let \(f_T=\max(-T,\min(f,T))\). As \(T\to\infty\), \(f_T\to f\) almost everywhere and \(|f-f_T|\le |f|\). The Dominated Convergence Theorem applies with the integrable dominating function \(|f|\); consequently choose \(T\) such that \(\|f-f_T\|_1<\varepsilon/3\).
For \(\eta>0\), define \(s(x)=\eta\lfloor f_T(x)/\eta\rfloor\) on \(A\) and \(s(x)=0\) outside \(A\). Since \(|f_T|\le T\), this measurable function takes only finitely many values, and \(|s-f_T|\le\eta\) on \(A\). Choose \(\eta\) with \(\eta m(A)<\varepsilon/3\). Then \(\|s-f_T\|_1\le\eta m(A)<\varepsilon/3\). Write the distinct nonzero values of \(s\) as \(a_1,\ldots,a_M\), where \(M\) is the number of such values, and let \(E_j=\{x:s(x)=a_j\}\). Each \(E_j\) is a bounded measurable subset of \(A\), the sets are disjoint, and \(s=\sum_{j=1}^{M}a_j\chi_{E_j}\).
If \(C=\sum_{j=1}^{M}|a_j|=0\), then \(s=0\) and the zero function already has error less than \(2\varepsilon/3\). Otherwise, apply the set approximation to each \(E_j\) with error less than \(\rho=\varepsilon/(3C)\). This gives \(g_j\in C_c(\mathbb{R}^n)\) such that \(\|g_j-\chi_{E_j}\|_1<\rho\). Put \(h=\sum_{j=1}^{M}a_jg_j\), a finite sum in \(C_c(\mathbb{R}^n)\). The triangle inequality yields
Applying the triangle inequality once more, \(\|f-h\|_1\le\|f-f_T\|_1+\|f_T-s\|_1+\|s-h\|_1<\varepsilon\). This proves the theorem. \(\square\)
In particular, if \(D\subset\mathbb{R}^n\) is bounded and measurable and \(f\) is real-valued and integrable on \(D\), extend \(f\) by zero outside \(D\). The theorem supplies continuous functions on \(\mathbb{R}^n\) whose restrictions to \(D\) approximate \(f\) in \(\int_D|f-h|\,dm\). Complex-valued integrable functions have the same conclusion by applying the real-valued result to their real and imaginary parts and adding the two approximations.
Worked Example: Approximating a Two-Level Simple Function
On \((\mathbb{R},\mathcal{L},m)\), let \(f=2\chi_{[0,1]}-\chi_{[2,3]}\). Use the interval construction with \(\delta=1/10\) on each interval, producing continuous cutoffs \(g_1,g_2\), and set \(h=2g_1-g_2\). The support of \(g_1\) is \([-1/10,11/10]\), while that of \(g_2\) is \([19/10,31/10]\); these supports are disjoint. Each cutoff has two ramps of width \(1/10\) and height \(1\), so its L1 error from the corresponding interval indicator is \(2\cdot\frac12\cdot\frac1{10}\cdot1=1/10\). Disjointness and the signs in \(f,h\) give
Check: each interval has length \(1\), and each cutoff adds two triangular areas totaling \(1/10\), so \(\int g_1\,dm=\int g_2\,dm=1+1/10=11/10\). Thus \(\int f\,dm=2-1=1\) and \(\int h\,dm=2(11/10)-11/10=11/10\); the difference of integrals is \(1/10\), no larger than the computed L1 error \(3/10\), as the integral triangle inequality requires.
What L1 Approximation Does—and Does Not—Say
Regularity controls the error by the measure of a region in which the cutoff is allowed to differ from the indicator. The values on that region need not match, and they generally do not. This is why the method works even when the boundary of a set is complicated: it asks for a small measure difference between an open neighborhood and an inner compact set, not a smooth boundary.
A common mistake is to treat pointwise convergence as if it implied L1 convergence. For a concrete continuous example on \((\mathbb{R},\mathcal{L},m)\), define \(q_n(x)=n\max(0,1-n|x-n|)\). Each \(q_n\) is a triangular continuous function with height \(n\) and base width \(2/n\), so \(\int q_n\,dm=(1/2)(2/n)n=1\). For every fixed \(x\), \(q_n(x)=0\) for all sufficiently large \(n\), because its support is \([n-1/n,n+1/n]\); hence \(q_n(x)\to0\) pointwise, but \(\|q_n-0\|_1=1\) for every \(n\). There is no contradiction with the approximation theorem: the theorem gives a choice of continuous approximation with small L1 error, not a conclusion from pointwise convergence alone.
Uniform approximation of an indicator can fail for a different reason. For example, \(\chi_{[0,1/2]}\) on \([0,1]\) has a jump at \(1/2\), so it is not itself continuous. L1 approximation permits a narrow transition near that point; its error is the area of the transition region, which can be made arbitrarily small. The distinction is useful whenever measurable data must be replaced by continuous functions while preserving integral estimates.
Check Your Understanding
Use the stated hypotheses carefully; in particular, distinguish small integral error from pointwise or uniform agreement.
- For bounded measurable \(E\subset\mathbb{R}^n\), explain how regularity and the distance cutoff give a continuous compactly supported \(g\) with \(\|g-\chi_E\|_1<\varepsilon\).
- Why is the distance from a nonempty compact \(K\subset U\) to \(U^c\) positive when \(U\) is open?
- For the interval cutoff with transition width \(\delta\), compute the total error from the two linear ramps.
- In the density proof, identify the integrable dominating function used to justify truncation by the Dominated Convergence Theorem.
- Give the pointwise limit and the L1 norm of the continuous functions \(q_n(x)=n\max(0,1-n|x-n|)\).