Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is $C^\infty(\mathbb{R})\subset C_b(\mathbb{R})$ dense? I.e. is any continuous bounded function $f:\mathbb{R}\to\mathbb{R}$ the uniform limit of smooth functions?

On any bounded interval this is true since by Stone-Weierstrass polynomials are smooth and dense in the continuous functions. I guess the result is still true for $\mathbb{R}$ but I don't know how to prove it. Since I don't have any integrability conditions on $f$ the technique of convoluting with mollifiers is probably not applicable.

share|cite|improve this question
What about convoluting the approximating smooth functions on intervals $[n,n+1]$? – Berci May 19 '13 at 10:06
up vote 2 down vote accepted

Given continuous $f$ and $\epsilon>0$, find for each $n\in\mathbb Z$ a smooth approximation $g_n\colon [n-1,n+1]\to\mathbb R$ with $\left\lVert f|_{[n-1,n+1]}-g_n\right\rVert_\infty<\epsilon$. Glue these together with a smooth partition of one.

For example: Start with a smooth function $\phi\colon[0,1]\to [0,1]$ with $\phi(x)=1$ for $x\le\frac13$ and $\phi(x)=0$ for $x\ge \frac23$. Then $$g(x):=\phi(x-\lfloor x\rfloor)g_{\lfloor x\rfloor}(x)+(1-\phi(x-\lfloor x\rfloor))g_{\lceil x\rceil}(x)$$ is smooth (the trick is that $g(x)=g_n(x)$ if $|x-n|<\frac13$) and at each $x$ we have $|f(x)-g(x)|<\epsilon$ because it is a convex combination. Therefore, $\lVert f-g\rVert_\infty<\epsilon$.

share|cite|improve this answer
So boundedness is not actually needed? – Amr Dec 19 '15 at 20:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.