From a Box Indicator to a Continuous Tent
Indicators of boxes are simple building blocks for Lebesgue measurable functions, but an indicator jumps at the boundary and is not continuous there. For a bounded box in \(\mathbb{R}^n\), we can replace the jump by a thin linear ramp outside each face. The resulting function is continuous, has compact support, equals one on the box, and its error in finite-p norm can be computed exactly. The calculation identifies the error with the mass of the boundary layers, including the corner regions where layers overlap.
Throughout, \(n\ge1\), \(m\) is Lebesgue measure on \(\mathbb{R}^n\), and \(1\le p<\infty\). Lebesgue measure is complete and sigma-finite; the approximation statements below do not require restricting to a finite-measure space, although each box and each tent support has finite measure. We consider real-valued functions. For a measurable real-valued function \(h\), its finite-p norm is \(\|h\|_p=(\int_{\mathbb{R}^n}|h|^p\,dm)^{1/p}\) when this integral is finite. All formulas defining functions below hold everywhere; norm and integral statements are with respect to \(m\).
Each one-dimensional factor is one on \([a_i,b_i]\), decreases linearly to zero over distance \(\delta\) on either side, and is zero farther away. Thus \(T_\delta=1\) on \(B\), while it is zero outside the expanded box \(\prod_i[a_i-\delta,b_i+\delta]\). Each factor is continuous, so their finite product is continuous. Its support—the closure of the set where it is nonzero—is contained in that expanded box, which is compact. These properties also hold if one or more side lengths \(L_i\) are zero. Such a box has measure zero, but the tent still gives the error formula below. The empty box can be treated separately by taking the zero function.
The One-Dimensional Ramp Calculation
The exact error follows from an elementary integral for one ramp factor. This calculation includes the endpoints: their values do not affect a Lebesgue integral, since a finite set has measure zero.
Proof. Put \(L=b-a\). On \([a,b]\), \(\tau=1\), so the integral there is \(L\). On the left ramp \([a-\delta,a]\), write \(u=(t-(a-\delta))/\delta\). Then \(0\le u\le1\), \(dt=\delta\,du\), and \(\tau(t)=u\). The left ramp contributes \(\delta\int_0^1u^p\,du=\delta/(p+1)\). On the right ramp \([b,b+\delta]\), the change of variable \(u=(b+\delta-t)/\delta\) gives the same contribution. Outside these three intervals \(\tau=0\). Adding the contributions gives \(L+2\delta/(p+1)\), including the case \(L=0\). \(\square\)
Exact Error from the Boundary Layers
Proof. On \(B\), \(T_\delta=1=\chi_B\), so the difference is zero. Outside \(B\), \(\chi_B=0\), so \(|T_\delta-\chi_B|^p=T_\delta^p\). Consequently, $$ \int_{\mathbb{R}^n}|T_\delta-\chi_B|^p\,dm =\int_{\mathbb{R}^n}T_\delta^p\,dm-m(B). $$ This identity also holds for a zero-volume box, since \(T_\delta=1\) on \(B\) and \(m(B)=0\). The integrand \(T_\delta^p=\prod_{i=1}^n\tau_{i,\delta}(x_i)^p\) is nonnegative and measurable. Tonelli's theorem therefore permits the product integral to be evaluated as the product of the one-dimensional integrals. The lemma gives \(\int T_\delta^p\,dm=\prod_i(L_i+2\delta/(p+1))\), and the volume of the box is \(m(B)=\prod_iL_i\). Subtraction proves the formula. The right side is a polynomial in \(\delta\) with value zero at \(\delta=0\); hence it tends to zero as \(\delta\downarrow0\), and taking the \(p\)-th root proves norm convergence. \(\square\)
The formula counts the entire expanded box with the tent's weight and subtracts the original box, where the error vanishes. It automatically includes intersections of boundary layers at edges and corners; those contributions should not be discarded. For example, expanding the product shows that each nonempty subset of coordinate directions contributes a term involving \(\delta\) to the power given by the size of that subset.
Worked Example: A One-Dimensional Interval
Let \(B=[-1,2]\), \(\delta=\tfrac14\), and \(p=1\). The interval length is \(L=2-(-1)=3\). The exact formula gives $$ \|T_{1/4}-\chi_{[-1,2]}\|_1 =3+\frac{2(1/4)}{1+1}-3 =\frac14. $$
Directly, the error is zero on \([-1,2]\), and outside it consists of two linear ramps. Each ramp has base length \(\tfrac14\) and height \(1\), so its area is \(\tfrac12\cdot\tfrac14\cdot1=\tfrac18\). The total error is \(\tfrac18+\tfrac18=\tfrac14\), agreeing with the formula. The tent is supported on \([-\tfrac54,\tfrac94]\); it is zero at both endpoints of this support.
Worked Example: A Rectangle and Its Corner Layers
Take \(B=[0,2]\times[1,4]\), \(\delta=\tfrac12\), and \(p=2\). The side lengths are \(L_1=2\) and \(L_2=3\), so \(m(B)=6\). Each one-dimensional factor has squared integral $$ 2+\frac{2(1/2)}{2+1}=\frac73, \qquad 3+\frac{2(1/2)}{2+1}=\frac{10}{3}. $$ Thus $$ \|T_{1/2}-\chi_B\|_2^2 =\frac73\cdot\frac{10}{3}-6 =\frac{70}{9}-\frac{54}{9} =\frac{16}{9}, \qquad \|T_{1/2}-\chi_B\|_2=\frac43. $$
For an independent check, split the exterior error into regions. The squared integral of one ramp is \(\delta/3=1/6\). The two \(x\)-side layers with \(y\) inside the rectangle contribute \(2(1/6)\cdot3=1\). The two \(y\)-side layers with \(x\) inside contribute \(2(1/6)\cdot2=2/3\). Each of the four corner regions contributes \((1/6)(1/6)=1/36\), for a corner total of \(1/9\). Adding gives \(1+2/3+1/9=16/9\), as required. The support is \([-\tfrac12,\tfrac52]\times[\tfrac12,\tfrac92]\).
Worked Example: Selecting a Layer Width
Let \(B=[0,1]^3\), \(p=3\), and choose \(\delta=\tfrac1{10}\). Each one-dimensional factor has cubed integral $$ 1+\frac{2(1/10)}{3+1}=1+\frac1{20}=\frac{21}{20}. $$ Therefore $$ \|T_{1/10}-\chi_B\|_3^3 =\left(\frac{21}{20}\right)^3-1 =\frac{9261-8000}{8000} =\frac{1261}{8000}. $$ The norm is \((1261/8000)^{1/3}\). As a check on the arithmetic, expanding \((1+1/20)^3-1\) gives \(3/20+3/400+1/8000=(1200+60+1)/8000=1261/8000\). This illustrates how the explicit formula converts a chosen boundary width into an exact error.
Why the Boundary-Layer Formula Is Useful
The formula also gives a direct way to choose a width for a target error. Write \(C=\sum_{\varnothing\ne J\subseteq\{1,\ldots,n\}}2^{|J|}(p+1)^{-|J|}\prod_{i\notin J}L_i\). Expanding the product in the theorem gives a sum over nonempty subsets \(J\), with each term equal to \(2^{|J|}(p+1)^{-|J|}\delta^{|J|}\prod_{i\notin J}L_i\). If \(0<\delta\le1\), then \(\delta^{|J|}\le\delta\), and hence \(\|T_\delta-\chi_B\|_p^p\le C\delta\). For a nonempty box and \(n\ge1\), \(C>0\). Given any \(\varepsilon>0\), choosing \(0<\delta<\min(1,\varepsilon^p/C)\) therefore ensures \(\|T_\delta-\chi_B\|_p<\varepsilon\).
A common mistake is to add the contributions of strips that each extend across the entire expanded rectangle. That counts corner layers twice. In the rectangle example, the full \(x\)-side strips contribute \(\tfrac13\cdot\tfrac{10}{3}=\tfrac{10}{9}\), and the full \(y\)-side strips contribute \(\tfrac13\cdot\tfrac73=\tfrac79\). Adding them gives \(\tfrac{17}{9}\), not the correct \(\tfrac{16}{9}\), because the four corners have been included in both strip totals. The correction is to subtract the duplicated corner contribution \(\tfrac19\), or, more simply, use the product formula, which counts every region with its proper weight exactly once.
This construction proves that each bounded box indicator can be approximated in \(L^p(\mathbb{R}^n,m)\), for finite \(p\), by a compactly supported continuous function. It does not by itself assert an approximation result for arbitrary \(L^p\) functions; that requires additional steps beyond the box calculation. The key point here is the exact, verified control of the error for this basic class of indicators.
Check Your Understanding
Use the product-tent definition and the exact error formula to answer these questions.
- For \(B=[0,3]\) in \(\mathbb{R}\), compute \(\|T_\delta-\chi_B\|_2^2\) as a function of \(\delta\).
- For \(B=[0,1]\times[0,2]\), \(p=1\), and \(\delta=\tfrac14\), calculate the error norm exactly.
- Explain why the support of \(T_\delta\) is compact and identify an expanded box containing it.
- For a box with one side length zero, explain why the formula remains valid and why the indicator is zero almost everywhere.
- In the rectangle example, what corner contribution must be removed from the sum of full side-strip contributions to recover the correct squared error?