[Math] $C_c(X)$ is dense in $C_0(X)$

general-topologytopological-vector-spaces

Let $X$ be a topological space, and let $C_0(X)$ be the $\mathbb{C}$-vector space of continuous functions $g:X \rightarrow \mathbb{C}$ with the property that for any $\epsilon > 0$, there exists a compact set $F$ of $X$ containing $\{x \in X: |g(x)| \geq \epsilon\}$. Let $C_c(X)$ be the subspace of continuous functions $X \rightarrow \mathbb{C}$ which are of compact support.

In Abstract Harmonic Analysis, Vol $1$ by Ross and Hewitt, it is claimed that $C_c(X)$ is dense in $C_0(X)$, but I don't see why this is true. Unless $X$ is normal or has some other properties, I don't see how to go about constructing an element of $C_c(X)$ which is within $\epsilon$ of a given $g$.

Given $F, \epsilon, g$ as above, I'd like to construct an $f: X \rightarrow \mathbb{C}$ which is $0$ outside $F$ but agrees with $g$ on the interior of $F$, somehow.

Best Answer

Note that $h\colon \mathbb C\to\mathbb C$, $z\mapsto\begin{cases}0&\text{if }|z|\le \varepsilon\\\frac{|z|-\varepsilon}{|z|}\cdot z&\text{if }|z|\ge\varepsilon\end{cases} $ is continuous. Then $g=h\circ f$ seems to do what you want, i.e., the support of $g$ is the compact set $F$ and $|f-g|\le \varepsilon$. If desired, one can deform $h$ suitably so that $h(z)=z$ for $|z|>\delta>\epsilon$, thus making $f$ "more equal" to $g$.