Let $f\in C_0(\mathbb{R}^n,\mathbb{R})$ be a continuous function with a compact support. I am reading material which states that we can then find a sequence of simple functions $\left(g_n\right)_{n=1}^\infty$ such that $\lim_{n\to\infty}||f - g_n||_\infty = 0$ where $||.||_\infty$ is the uniform norm $||f||_\infty = \sup_{x\in\mathbb{R}^n}|f(x)|$, $g_n(x) = \sum_{k=1}^{M_n}\alpha_k\chi_{S_k}(x)$ for some $\alpha_k\in\mathbb{R}$ and $\chi_{S_k}$ the indicator functions of some sets $S_k\subset\mathbb{R}^n$. The material does not refer to any prior given result or explicitly state why we may approximate $f$ in this way w.r.t. the uniform norm. Unfortunately it is some time since my analysis class so I don't recall any one result giving this. I am aware that every non-negative measurable function is the pointwise limit of an increasing sequence of simple functions. However this converge needs to be uniform.
2026-04-08 19:35:53.1775676953
On
Approximating continuous functions with compact support by simple functions in $L^\infty$ norm
206 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
(This would be more appropriate as a comment, which I cannot do yet.)
The idea is that for each $f:\mathbb{R}^n\rightarrow\mathbb{R}$ there exists $K\subset\mathbb{R^n}$ compact (hence bounded) so that $f|_{K^\mathsf{c}}\equiv 0$ and that such $f$ is bounded. Due to $f$ being supported on a compact set, we can afford more and more intricate approximations via simple functions, i.e., we can afford smaller sets on which indicators are supported while the sum stays finite. Moreover, due to compact support, the $\|f-g_n\|_\infty$ can be bounded from above and consequently controlled (to approach $0$) as $n\rightarrow\infty$.
As peek-a-boo pointed out in the comments, compact support is not needed, bounded and measurable is enough. For $k\in \{-n, \dots, n\}$ define the sets
$$ S_{k,n} = \begin{cases} f^{-1}([\Vert f\Vert_\infty k/n, \Vert f\Vert_\infty (k+1)/n)),& k\in \{-n, \dots, n -1\},\\ f^{-1}( \{\Vert f\Vert_\infty\}),& k=n. \end{cases}$$ Now consider the simple function $$g_n =\sum_{k=-n}^n \Vert f\Vert_\infty \frac{k}{n} \chi_{S_{k,n}}.$$ Then one checks that $$\Vert f-g_n\Vert_\infty \leq 1/n.$$