# Prove that $C^{\infty}([0,1])$ is dense in $C([0,1])$

First some definitions I use to prevent misunderstanding.

For a compact Hausdorff space $X$, we consider the set of scalar-valued functions on $X$: $$C(X):=\{f:X\rightarrow \mathbb{K}: f \text{ is continuous}\}.$$ There is a metric on $C(X)$: $$d_{\sup}(f,g):=\sup\{|f(x)-g(x)|:x\in\mathbb{R}\}.$$ The induced topology is called the uniform topology on $C(X)$.

Now my question. I have to prove that $C^{\infty}([0,1])$, the space of real-valued functions on $[0,1]$ which are infinitely many times differentiable, is dense in $C([0,1])$. Now I figured, if I show that $C^{\infty}([0,1])$ is point-seperating, I can use the Stone-Weierstrass theorem to say it is dense in $C([0,1])$.

I know that a space is point-seperating if for any $x,y\in X, x\neq y, \exists f\in C^{\infty}([0,1])$ such that $f(x)\neq f(y)$. But how do I show this?

Hope someone can help me! Thanks :)

• Can you think of a smooth function $f \colon [0, 1] \to \mathbb{R}$ which is injective? This would demonstrate that $C^{\infty}([0, 1])$ separates points. – Michael Albanese Jan 21 '16 at 14:02
• Polynomials form a subset of $C^{\infty}([0,1])$ which is dense in $C([0,1])$. You don't need to resort to Stone Weierstrass. – Gabriel Romon Jan 21 '16 at 14:02
• @LeGrandDODOM So if I just say that they form a subset and are dense, then $C^{\infty}([0,1])$ is dense? – jbuser430 Jan 21 '16 at 14:04
• @MichaelAlbanese maybe $f(x)=e^x$? or am I thinking totally wrong.. – jbuser430 Jan 21 '16 at 14:04
• Alternative approach: Given a continuos function, you can fold it with a mollifier function ... – Hagen von Eitzen Jan 21 '16 at 14:19