Construct a set of functions $\{g_\epsilon(x) \}$, such that for every $\epsilon > 0, \; g_\epsilon(x)$ is infinitely differentiable and $ g_\epsilon \rightarrow f,$ where $f(x) = |x|,$ in the sup norm as $\epsilon \downarrow 0$.
Sequence of smooth functions converging to the modulus function
2 Answers
Try $f_\varepsilon(x):=\sqrt{x^2+\varepsilon}$.
Let the sequence $\{\phi_\epsilon\}$ be a mollifier. If $f$ is any continuous function, then the convolutions $g_\epsilon(x) := (f * \phi_\epsilon) (x) := \int f(y) \phi_\epsilon(x-y) dy$ converge uniformly on compact sets to $f$ as $\epsilon \rightarrow 0$.
In fact, we can choose $\phi_\epsilon=\epsilon^{-1} \phi(\epsilon^{-1}x)$, where $\phi$ has integral $\int_\mathbb{R} \phi(y)dy =1$. Then we have $g_\epsilon (x) =\int_{-\epsilon}^\epsilon f(y) \phi_\epsilon(x-y) dy = \int_{-1}^1 f(x-\epsilon y) \phi(y) dy $ and $|g_\epsilon(x)-f(x)| \leq |\int_{-1}^1 f(x-\epsilon y) \phi(y) dy - f(x)| =\int_{-1}^1 \phi(y)|f(x-\epsilon y) - f(x)| dy$ For $x \in K$, a compact set, $f$ is uniformly continuous, taking the limit as $\epsilon \rightarrow 0$ shows that $g_\epsilon \rightarrow f$ on $K$.
-
0@ArunangshuBiswas There is nothing that _prevents_ $g_\epsilon$ to be smooth even it it equals $f$ outside $B_\epsilon$, so long as $f$ itself is smooth outside $B_\epsilon$. For example, if you take the mollifier $\phi_\epsilon$ to be an even function, you can manifestly check that in this case ($f(x) = |x|$) outside of $B_\epsilon$ we do have $g_\epsilon \equiv f$. – 2012-11-22