# Closures of compactly supported functions for different topologies

Let $$C_c(\mathbb{R}^n)$$ be the set of all compactly supported functions. $$C_c(\mathbb{R}^n)$$ can be equipped with at-least two topologies induced by restriction in $$C(\mathbb{R}^n)$$, the topology of uniform convergence on compacts and the (finer) topology of uniform convergence.

What are the closures of $$C_c(\mathbb{R}^n)$$ for these topologies?

Notes:

• My intuition is that $$C_c(\mathbb{R}^n)$$ is dense in $$C(\mathbb{R}^n)$$ for the topology of uniform convergence on compacts and it is dense in $$C_0(\mathbb{R}^n)$$ (the set of continuous functions vanishing at infinity) for the uniform topology...

You're correct in principle. Note that your question is vacuous without stating an ambient space. I'm assuming that for uniform convergence, our ambient space is the space of bounded functions and for uniform convergence on compacta (or local uniform convergence as I prefer to call it), that the ambient space is the space of locally bounded functions.

Denote by $$\|\cdot \|_{\infty}$$ the uniform norm and by $$\|\cdot\|_{\infty, N}$$ the semi-norm induced by the uniform norm on $$C(B[0,N])$$ . Then, the $$f_m\to f$$ uniformly if and only if $$\|f_m-f\|_{\infty}\to 0,$$ whereas $$f_m\to f$$ locally uniformly if and only if $$\|f_m-f\|_{\infty,N}\to 0$$ for every $$N$$.

Furthermore, I'll suppress $$\mathbb{R}^n$$ from my notation and e.g. write $$C$$, $$C_c$$ and $$C_0$$ for the function spaces in question.

Let's first show that $$C_c$$ is dense in $$C_0$$ w.r.t. to $$\|\cdot \|_{\infty}$$. So let $$f\in C_0$$ and let $$\xi_N$$ be a continuous function such that $$0\leq \xi_N(x)\leq 1$$ for every $$x$$, $$\xi_N\equiv 1$$ on $$B[0,1]$$ and $$\xi_{N}\equiv 0$$ on $$\mathbb{R}^n \setminus B[0,N+1]$$. Then, $$\xi_Nf\in C_c$$ and $$\|\xi_Nf-f\|_{\infty}\leq \| 1_{\{|x|\geq N\}} f\|_{\infty},$$ which goes to $$0$$, since $$f\in C_0(\mathbb{R})$$.

Now, we need to show that $$C_0$$ is a closed subset of the bounded functions in the topology of uniform convergence. Indeed, if $$f_m\in C_0$$ for every $$m$$ and $$f_m\to f$$ uniformly, then $$f$$ is, necessarily, continuous. Furthermore, given $$\varepsilon>0$$, pick $$m$$ so large that $$\|f_m -f\|_{\infty}<\varepsilon/2$$ and $$N$$ so large that $$|f_m(x)|<\varepsilon/2$$ whenever $$\|x\|\geq N$$. Then, for $$\|x\|\geq N,$$ we get $$|f(x)|\leq |f(x)-f_m(x)|+|f_m(x)|<\frac{\varepsilon}{2}+\|f-f_m\|_{\infty}<\varepsilon,$$ implying that $$f$$ tends to $$0$$ as $$\|x\|\to \infty$$. Hence, $$C_0$$ is closed, and we get that the closure of $$C_c$$ is $$C_0$$.

Let's now show that $$C_c$$ is locally uniformly dense in $$C$$. Let $$f$$ be continuous and note that $$\|\xi_N f-f\|_{\infty,M}=0$$ for $$M\geq N$$, establishing that $$\xi_Nf\to f$$ locally uniformly. I'm assuming that you know that $$C$$ is closed in the space of locally bounded functions (e.g. that locally uniform limits of sequences of continuous functions are again continuous). Hence, the locally uniform closure of $$C_c$$ is $$C$$.

• Thank you for the answer. However, this raised the following related question for me: mathoverflow.net/questions/356361/… (In case you're interested)
– user683848
Apr 2 '20 at 13:56