# Prove that $C^{\infty}_b(\mathbb{R}^{n})$ is dense in $C_{b}(\mathbb{R}^{n})$ using generic functions.

Let $$C^{\infty}_b(\mathbb{R}^{n}) = \{f:\mathbb{R}^{n} \to \mathbb{R} \mid f\text{ is smooth and } \Vert f \Vert_{\infty} < \infty\},$$ $$C_{b}(\mathbb{R}^{n}) = \{f:\mathbb{R}^{n} \to \mathbb{R}\mid f\text{ is continuous and bounded}\}.$$

I want to prove that $$C^{\infty}_b(\mathbb{R}^{n})$$ is dense in $$C_{b}(\mathbb{R}^{n})$$.

The proofs that I know are totally constructive, I mean: the proofs use explicit function defined by parts.

I want to know if is possible to prove this result using generic functions (such a generic step function) or, at least, a strong theorem.

• In what metric? – zhw. Feb 26 at 0:45
• @zhw. $\Vert f \Vert_{\infty} = \sup\{|f(x)|\mid x \in \mathbb{R}^{n}\}$ – Lucas Corrêa Feb 26 at 0:52
• The standard approach I know is to use partitions of unity by functions that are infinitely many times differentiable. – Will M. Feb 26 at 2:31
• So $C_b$ consists of continuous bounded functions? – zhw. Feb 26 at 18:42
• You should edit the question to make all the hypotheses clear. For example, $C^\infty(\mathbb R^n )$ has a well known meaning different from what you have; maybe write that as $C^\infty _b(\mathbb R^n )$ – zhw. Feb 28 at 17:19

There's a stronger result here: Suppose $$f$$ is continuous on $$\mathbb R^n.$$ Let $$\epsilon>0.$$ Then there exists $$g\in C^\infty(\mathbb R^n )$$ such that $$|f(x)-g(x)|<\epsilon$$ for all $$x\in \mathbb R^n.$$

Proof for $$n=1:$$ Assume first that $$f(k)=0$$ for all $$k\in \mathbb Z.$$ Let $$I_k=[k,k+1].$$ Then by Weierstrass, there is a polynomial $$p_k$$ such that $$|f-p_k|<\epsilon/2$$ on $$I_k.$$ Because $$f=0$$ at the end points, there is $$\delta_k>0$$ such that $$|f|+|p_k|<\epsilon$$ on $$[k,k+\delta_k] \cup [(k+1)-\delta_k,k+1].$$

Now find $$g_k\in C^\infty(\mathbb R)$$ such that i) the support of $$g_k$$ is $$I_k$$, ii) $$0\le g_k\le 1$$ everywhere, and $$g_k=1$$ on $$[k+\delta_k,(k+1)-\delta_k].$$ Verify that $$|f-g_kp_k|<\epsilon$$ on $$I_k.$$

The nice thing about $$g_kp_k$$ is that all derivatives of it equal $$0$$ at the endpoints of $$I_k.$$ Thus the $$g_kp_k$$ paste nicely together to form a function $$g=\sum_{k\in \mathbb Z}g_kp_k$$ in $$C^\infty(\mathbb R).$$ We then have $$|f-g|<\epsilon$$ everywhere. This is the desired conclusion for such an $$f.$$

To get the full result, for each $$k$$ define a bump function $$b_k\in C^\infty(\mathbb R )$$ whose support is a small interval containing $$k,$$ with $$b_k(k) = f(k).$$ The function $$b=\sum_{k\in \mathbb Z}b_k$$ is then in $$C^\infty(\mathbb R ),$$ and $$f-b=0$$ at all integers. We can then apply the above to $$f-b$$ and this gives the result for $$f.$$

Added later If $$n>1$$ we can do something similar. For $$k=1,2,\dots$$ let $$A_k$$ be the annular region $$\{k-1\le |x|\le k\},$$ and let $$S_k$$ be the sphere $$\{|x|= k\}.$$ At first we assume $$|f|<\epsilon$$ on each $$S_k.$$ Then the ideas for the $$n=1$$ proof work pretty much the same, with the $$A_k$$ replacing the $$I_k$$ and the $$S_k$$ replacing the endpoints. Also we would use Stone-Weierstrass rather than just Weierstrass.

To get to the $$|f|<\epsilon$$ assumption, we choose "annular" bump functions $$b_k$$ supported very close to $$S_k,$$ with $$b_k=1$$ on $$S_k.$$ By SW, there are polynomials $$p_k$$ such that $$|f-p_k|<\epsilon$$ on $$S_k.$$ We then have $$|f-\sum_k b_kp_k|<\epsilon$$ on each $$S_j$$ as desired.

• That is a nice answer! I could not see, but probably is simple the same proof works for $n > 1$? – Lucas Corrêa Mar 2 at 22:12
• I added a bit on the $n>1$ case. – zhw. Mar 3 at 16:52

If $$f$$ is uniformly continuous then let $$\phi \in C^\infty_c, \int \phi=1,\phi_k(x) =k^n \phi(kx)$$ you'll have $$f \ast \phi_k \to f$$ uniformly ($$*$$ for convolution).

If $$f$$ is only continuous then split it in $$f=\sum_{m\in \mathbb{Z}^n} f_m$$ where $$f_m = f \prod_{j=1}^n (1-|x_j-m_j|) 1_{x_j-m_j\in [-1,1]}$$ and look at $$\sum_m f_m \ast \phi_{e_{m,k}}$$ where $$e_{m,k}$$ is large enough such that $$\sup_{|x-y| < 1/e_{m,k}} |f_m(x)-f_m(y)| < 1/k$$

• I don't understood one point. Probably is easy, but I cannot justify why $f_{m} \ast \phi_{e_{m,k}}$ is $C^{\infty}$ – Lucas Corrêa Mar 4 at 0:13
• @LucasCorrêa you can put the derivatives on the $\phi_{e_{m,k}}$ – mathworker21 Mar 4 at 16:12