Let $X$ be a locally compact Hausdorff space. Show that every function in $C_0(X)$ (continuous functions that vanish at infinity) can be arbitrarily uniformly approximated by functions in $C_{00}(X)$ (continuous functions of compact support).
In other words, show that the closure of $C_{00}(x)=C_0(X)$
My work so far: Let $f\in C_{0}\rightarrow |f|$ is continuous.
Let $K_{n}=|f|^{-1}([1/n,+\infty[) n \in N$
$A_{n}=|f|^{-1}([0,1/2n])$
Urysohn`s lemma states that $\exists$ a continuous function $g_{n} : X \rightarrow [0,1]$ such that $g_n(K_n)=1$ and $g_n(A_n)=0$
We now define $f_n=g_n*f$
I can't show that $f_n$ converges uniformly to $f$ and each $f_n \in C_{00}.$
Best Answer
Let $\varepsilon > 0$. Since $f \in C_0(X)$, set $\{|f| \ge \varepsilon\} \subseteq X$ is compact so by Urysohn's lemma there exists $\phi \in C_{00}(X)$ such that $\phi(X) \subseteq [0,1]$ and $\phi|_{\{|f| \ge \varepsilon\}} = 1$.
Define $h = f\phi \in C_{00}(X)$ and we claim that $\|f-h\|_\infty \le \varepsilon$. Indeed, on $\{|f| \ge \varepsilon\}$ we have $h = f$, and for $x \in \{|f| < \varepsilon\}$ we have $$|f(x) - h(x)| = |f(x) - f(x)\phi(x)| = |f(x)||1-\phi(x)| \le |f(x)| \le \varepsilon$$ so the claim follows.
Lemma:
Proof:
Urysohn's lemma for LCH spaces:
Proof: Let $\tilde{X}$ be the one-point compactification of $X$. Let $V\subseteq X$ be the open precompact set such that $K \subseteq V \subseteq \overline{V} \subseteq U$. Then $K$ and $\tilde{X}\setminus V$ are disjoint closed subspaces of $\tilde{X}$, which is a compact Hausdorff space so in particular it is normal. Hence by the classical Urysohn's lemma there exists a continuous function $\psi : \tilde{X} \to [0,1]$ such that $\psi|_K = 1$ and $\psi|_{X\setminus \overline{V}} = 0$. Define a continuous function $\phi : X \to [0,1]$ as $\phi = \psi|_{X}$. Then $\phi|_K = 1$ and $\phi(x) = 0, \forall x \in X\setminus V$ so $$\operatorname{supp}\phi = \overline{\phi \ne 0} \subseteq \overline{V} \subseteq U$$ and it is compact as a closed subspace of the compact set $\overline{V}$.