Approximating simple function by continuous function

2.7k Views Asked by At

I am trying to solve this problem:

If $\gamma$ is a simple function defined on $E \subset \mathbb R^d$, $E$ measurable, then there is $f:E \to \mathbb R$ continuous such that $$|\{x \in E: f(x) \neq \mathcal \gamma(x)\}|<\epsilon$$

By definition, $\gamma$ is a finite linear combination of characteristic functions, $$\gamma=\sum_{i=1}^n c_i \mathcal X_{E_i}, \space (c_i \neq 0)$$

where $E=\bigcup E_i$, $E_i$ is measurable and they are pairwise disjoint.

I could prove this (Characteristic function approximated by continuous function):

Let $E\subset \mathbb R^d$ be measurable and let $ϵ>0$. If $A \subset E$ is measurable, then there is $f:E→\mathbb R$ continuous such that $$|\{x∈E:f(x)≠\mathcal X_A(x)\}|<ϵ$$

and I suspect I must use this result to show the other statement, but I don't know how to.

Here's the answer after Wong's suggestion:

For each $E_i$, there exists $f_j:E \to \mathbb R$ such that $|\{x∈E:f_j(x)≠\mathcal X_{E_j}(x)\}|<\dfrac{ϵ}{n}$. I define $f=\sum_{j=1}^n c_jf_j$, this funcion is continuous on $E$ since it is a sum of continuous functions.

Then, if $S=\{x∈E:f(x)≠\mathcal X_{E_j}(x)\}$, for $x \in S$ we have $$0<|f(x)-\gamma(x)|$$$$=|\sum_{j=1}^n c_jf_j-\sum_{j=1}^n c_j \mathcal X_{E_j}|$$$$=|c_j||\sum_{j=1}^nf_j-\mathcal X_{E_j}|$$$$\leq |c_j|(\sum_{j=1}^n|f_j-\mathcal X_{E_j}|)$$

So at least there exists some $j$ for which $0<|f_j-\mathcal X_{E_j}|$. In other words, $$S \subset \bigcup_{j=1}^n \{x∈E:f_j(x)≠\mathcal X_{E_j}(x)\}$$

Note that since $S=\{x: f(x)-\gamma(x)>0\} \cap E$, then $S$ is measurable and $$|S| \leq \sum_{j=1}^n |\{x∈E:f_j(x)≠\mathcal X_{E_j}(x)\}|<\epsilon$$