The collection of compactly supported continuous functions is dense in $L^1(\mathbb{R}^d)$.

lebesgue-integrallebesgue-measuremeasure-theoryreal-analysis

Here goes the theorem and proof, given in Stein & Shakarchi, Real Analysis p.72.

Theorem 2.4. $\textit{The family of continuous functions of compact support is dense in $L^1$.}$

$\textit{Outline of Proof.}$ We have already seen that the family of step functions on $\mathbb{R}^d$ is dense in $L^1$. Since a step function is a finite linear combination of characteristic functions supported on rectangles, it suffices to show that the characteristic function $1_R$ can be approximated by continuous functions with compact support(Here $R$ denotes a rectangle in $\mathbb{R}^d$).

First consider the one-dimensional case $d=1$. Let $\varepsilon>0$ be given. Then the function $1_{[a,b]}(x)$ can be approximated by the function
\begin{align*}
g_\varepsilon(x) = \begin{cases} 1 & x\in [a,b] \\ 0 & x\in (-\infty, a-\varepsilon)\cup (b+\varepsilon, \infty)\end{cases}
\end{align*}

which is extended by means of linear functions(i.e. straight lines) in $(a-\varepsilon,a)\cup (b,b+\varepsilon)$ so that $g_\varepsilon$ is continuous. Then $g_\varepsilon$ is continuous, compactly supported, and it is easy to verify that $\|g_\varepsilon-f\|_{L^1} = \varepsilon.$

In the general $d$-dimensional case, it suffices to notice that $1_R(x)$ is a product of functions of the form $1_{[a_j,b_j]}(x)$. We find continuous and compactly supported $g_j$ as above such that each $1_{[a_j,b_j]}(x)$ is approximated by $g_j$ in $L^1$. Then the product $\prod_{j=1}^d g_j(x)$ approximates the function $1_R(x)$ in $L^1$.

QUESTION: Alright, I get that we can make $\|g_j – 1_{[a_j,b_j]}\|_{L^1}$ arbitrarily small by constructing $g_j$ as in above. In particular, for each $\varepsilon>0$ we may find $g_j$ such that
$$g_j(x) – 1_{[a_j,b_j]}(x)= 0$$
for all $x$, except for possibly on a set of measure $\leq \varepsilon$.
But what can we really say about
$$\prod_{j=1}^d g_j(x) – \prod_{j=1}^d 1_{[a_j,b_j]}(x)?$$
If each $g_j(x)$ differs from $1_{[a_j,b_j]}(x)$ only on possibly a set of measure $\leq \varepsilon$, can I find the specific quantity $\eta(\varepsilon)$ such that
$$m\left\{x:|\prod_{j=1}g_j(x) – \prod_{j=1}^d 1_{[a_j,b_j]}(x) |\neq0\right\} \leq \eta(\varepsilon)?$$ Would it be $\eta(\varepsilon) = d\epsilon$? Or $\eta(\varepsilon) = \epsilon^d$? I'm trying to write my own notes rigorously, but I'm very confused at the moment.

Would appreciate all help.

Best Answer

$$\prod_{j=1}^{d}g_{j}=\prod_{j=1}^{d}\big((g_{j}-1_{[a_{j},b_{j}]})+1_{[a_{j},b_{j}]}\big)=\prod_{j=1}^{d}(g_{j}-1_{[a_{j},b_{j}]})+\prod_{j=1}^{d}1_{[a_{j},b_{j}]}+\sum_{p\in\{1,\cdots,d-1\},q\in\{1,\cdots,d\},p+q=d}(g_{j_{1}-1_{[a_{j_{1}},b_{j_{1}}]}})\cdots(g_{j_{p}-1_{[a_{j_{p}},b_{j_{p}}]}})1_{[a_{k_{1}},b_{k_{1}}]}\cdots1_{[a_{k_{q}},b_{k_{q}}]}$$ Notation 1:in the above,$j_{1},\cdots,j_{p}\in\{1,\cdots,d\},k_{1},\cdots,k_{q}\in\{1,\cdots,d\}$.

Notation 2: in the following, we use $\sum\prod\prod(g_{k}-1_{[a_{k},b_{k}]})1_{[a_{l},b_{l}]}$ to replace $\sum_{p\in\{1,\cdots,d-1\},q\in\{1,\cdots,d\},p+q=d}(g_{j_{1}-1_{[a_{j_{1}},b_{j_{1}}]}})\cdots(g_{j_{p}-1_{[a_{j_{p}},b_{j_{p}}]}})1_{[a_{k_{1}},b_{k_{1}}]}\cdots1_{[a_{k_{q}},b_{k_{q}}]}$ which is a byproduct————a mixed term generated by the above equality

So we have $$|\prod_{j=1}^{d}g_{j}-\prod_{j=1}^{d}1_{[a_{j},b_{j}]}|\leq |\prod_{j=1}^{d}(g_{j}-1_{[a_{j},b_{j}]})|+|\sum\prod\prod(g_{k}-1_{[a_{k},b_{k}]})1_{[a_{l},b_{l}]}|$$ then $$\|\prod_{j=1}^{d}g_{j}-\prod_{j=1}^{d}1_{[a_{j},b_{j}]}\|_{L^{1}}\leq \|\prod_{j=1}^{d}(g_{j}-1_{[a_{j},b_{j}]})\|_{L^{1}}+\|\sum\prod\prod(g_{k}-1_{[a_{k},b_{k}]})1_{[a_{l},b_{l}]}\|_{L^{1}}\leq C\epsilon^{d}+C\epsilon^{d-1}+\dots+C\epsilon\leq\tilde{C}\epsilon$$ where $\epsilon\in(0,1).$ Because in the mixed term $\|\sum\prod\prod(g_{k}-1_{[a_{k},b_{k}]})1_{[a_{l},b_{l}]}\|_{L^{1}}$, there are different types of $g_{k}-1_{[a_{k},b_{k}]}$ which determine the exponential of $\epsilon.$

As for $$m\left\{x:|\prod_{j=1}g_j(x) - \prod_{j=1}^d 1_{[a_j,b_j]}(x) |\neq0\right\} \leq \eta(\varepsilon),$$ the value of $\eta(\epsilon)$ is determined by $$\prod_{j=1}^{d}g_{j}-\prod_{j=1}^{d}1_{[a_{j},b_{j}]}=\prod_{j=1}^{d}(g_{j}-1_{[a_{j},b_{j}]})+\sum\prod\prod(g_{k}-1_{[a_{k},b_{k}]})1_{[a_{l},b_{l}]}\neq0 $$ From your statement, we know that $g_{\epsilon}\geq 1_{[a,b]}$ and so in the above the "$\neq$" should be "$>$".

So,$$m\left\{x:\prod_{j=1}^{d}(g_{j}-1_{[a_{j},b_{j}]})>0\right\}=C\epsilon^{d},$$

$$m\left\{x:\sum\prod\prod(g_{k}-1_{[a_{k},b_{k}]})1_{[a_{l},b_{l}]}>0 \right\}\leq C\epsilon+\dots+C\epsilon^{d-1}$$

so $\eta(\epsilon)\leq C\epsilon+\dots+C\epsilon^{d}\leq \hat{C}\epsilon$ where we constrait $0\leq\epsilon\leq1$