Approximations of continuous functions by compactly supported smooth functions with a criteria.

approximationapproximation-theoryreal-analysis

Let $f:\Omega\to\mathbb{R}^{\ge 0}$ be a bounded continuous function, where $\Omega$ is a bounded open subset of $\mathbb{R}^n$. Prove or reject (by providing a counterexample) that for any $\epsilon>0$, there exists a compactly supported smooth function $g :\Omega\subseteq\mathbb{R}^n\to\mathbb{R}^{\ge 0}$ with $0\le f-g<\epsilon$.

When there exists $\delta>0$ with $f(x)>\delta$ for any $x$, a suitable $g$ could be found. Otherwise, I do not know how to use the famous approximation theorems to solve this problem.

Best Answer

I assume $f$ is supposed to be compactly supported.

Start with a smooth function $g_1$ so that $|f-g_1| < \epsilon$ everywhere. Let $g_2 = g-2\epsilon$, so that $\epsilon < f-g_2 < 3 \epsilon$ everywhere. Now let $\psi : \mathbb{R} \to \mathbb{R}^{\ge 0}$ be a smooth approximation of the "positive part" function, such that $\psi(x)=0$ for all $x \le 0$, and $|\psi(x) - x| < \epsilon$ for all $x \ge 0$. Set $g_3 = \psi \circ g_2$ and note that $g_3 \ge 0$ everywhere.

Now consider two cases:

  • if $g_2(x) \ge 0$, then $|g_3(x) - g_2(x)| < \epsilon$, so we have $0 < f(x)-g_3(x) < 4\epsilon$.

  • if $g_2(x) < 0$, so that $g_3(x) = 0 > g_2(x)$, then $f(x) - g_3(x) < f(x) - g_2(x) < 4 \epsilon$, and since $f(x) \ge 0$, we still have $f(x) - g_3(x) \ge 0$.

If you want, go back and replace all $\epsilon$ by $\epsilon/4$.

Note that since $f$ is compactly supported, the inequality $0 \le g(x) \le f(x)$ implies that $g_3$ is too.