Im reading Chapter12 of Carothers' Real Analysis, 1ed. Here is a reading material of Lip(X) which denotes the set of all Lipschitz functions on a compact set X,
How to show that the set of all Lipschitz functions on a compact set X is dense in C(X)?
I want to show $Ball_ε$(g) ∩ Lip(X) ≠ empty for every continuous function g ∈ $C$(X) and every ε>0. But I got stuck here cos I need to find a function f in Lip(X) such that $||f – g||_∞$<ε.
Best Answer
As Chris Janjigian said, the passage you quoted is a proof that Lipschitz functions are dense; perhaps one should say at the end
But to directly answer the question posed in the title: a constructive self-contained proof (without Stone-Weierstrass) goes as follows. Given a continuous function $g$ and a number $\epsilon>0$, pick $\delta>0$ such that $|g(x)-g(y)|<\epsilon$ whenever $d(x,y)<\delta$ — this is possible by uniform continuity of $g$. Also let $M=\sup_X |g|$. Define $$f(x) = \sup_{y\in X} \left(g(y)- 2M \delta^{-1}d(x,y)\right)\tag{1}$$ I claim that $f$ is Lipschitz and $\sup_X |f-g|\le \epsilon$.