Let $(X,d)$ be a metric space. Then
- The space of bounded uniformly continuous functions is dense in that of bounded continuous functions w.r.t. the supremum norm. ref
- The space of bounded Lipschitz continuous functions is dense in that of bounded uniformly continuous functions w.r.t. the supremum norm. ref
Does the following relaxation hold?
- The space of uniformly continuous functions is dense in that of continuous functions w.r.t. the supremum norm.
- The space of Lipschitz continuous functions is dense in that of uniformly continuous functions w.r.t. the supremum norm. ref
Update 1: In the paper "Approximation of Continuous Functions by Lipschitz Functions", the author Radu Miculescu said that
- A continuous function $f: X \rightarrow \mathbb{R}$, where $X$ is a metric space, is a uniform limit of a sequence of locally Lipschitz maps from $X$ to $\mathbb{R}$.
- There exist continuous functions that cannot be the uniform limit of a sequence of Lipschitz functions.
Update 2: I write the counter-example of the second statement suggested by Mindlack here.
Let $d(x,y) := \min\{|x-y|,1\}$ be metric on $\mathbb R$. Assume $f: (\mathbb R, d) \to (\mathbb R, |\cdot|)$ is any $L$-Lipschitz-continuous. Then $|f(x)-f(0)| \le Ld(x,0) \le L$ for all $x\in \mathbb R$. So $f$ is bounded.
Let $g: (\mathbb R, |\cdot|) \to (\mathbb R, |\cdot|)$ be uniformly continuous and unbounded (for example, $x \mapsto x$). Fix $\varepsilon>0$. There is $\delta<1$ such that $|g(x)-g(y)| < \varepsilon$ for all $x,y\in \mathbb R$ such that $|x-y|<\delta$. Then $|g(x)-g(y)| < \varepsilon$ for all $x,y\in \mathbb R$ such that $d(x,y)<\delta$. This implies $g: (\mathbb R, d) \to (\mathbb R, |\cdot|)$ is also uniformly continuous.
So $\sup_{x\in \mathbb R} |f(x)-g(x)| = \infty$, let alone approximation.