Functional analysis: locally compact hausdorff space 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}.$
 A: 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:

Let $X$ be a locally compact Hausdorff space.
  
  
*
  
*Let $x \in X$ and let $U \subseteq X$ be an open neighbourhood of $x$. Then there exists a precompact open neighbourhood $V \subseteq X$ of $x$ such that $\overline{V} \subseteq U$.
  
*Assume $K \subseteq X$ is compact and $U\subseteq X$ open such that $K \subseteq U$. Then there exists a precompact open set $V \subseteq X$ such that $K \subseteq V \subseteq \overline{V} \subseteq U$.
  

Proof:


*

*$U$ is an open neighbourhood of $x$ so by local compactness there exists a compact neighbourhood $F \subseteq X$ of $x$ such that $F \subseteq U$. Define $U_1 = U \cap \operatorname{Int}(F)$. Notice that $\overline{U_1}$ is a closed subspace of a compact set $F$ so it is also compact. Hence $\overline{U_1}$ is a compact Hausdorff space so in particular it is regular. $\partial U_1$ is closed in $\overline{U_1}$  so there exist $V,W \subseteq \overline{U_1}$ disjoint and open in $\overline{U_1}$ such that $x \in V, \partial U_1 \subseteq W$. Since $V\subseteq \overline{U_1} \subseteq F \subseteq U$, $V$ is open in $X$ and $\overline{V}$ is a closed subspace of $F$ and hence compact, which proves the lemma. 

*For every $x \in K$ there exists a precompact open set $V_x$ such that $x \in V_x \subseteq U$. $(V_x)_{x \in K}$ is an open cover of $K$ so there exist $x_1, \ldots, x_n \in K$ such that $K \subseteq \bigcup_{i=1}^n V_{x_i} := V$. Then $V$ is the desired set since $\overline{V} = \bigcup_{i=1}^n \overline{V_{x_i}} \subseteq U$  and is compact as a finite union of compact sets.


Urysohn's lemma for LCH spaces:

Let $X$ be a locally compact Hausdorff space, $K \subseteq X$ compact and $U\subseteq X$ open such that $K \subseteq U$. Then there exists a continuous function $\phi : X \to [0,1]$ such that $\phi|_K = 1$ and $\operatorname{supp} \phi \subseteq U$ is compact (i.e. $\phi \in C_{00}(X)$).

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}$.
