Why is $C^{1}([a,b],||\cdot||_{\infty})$ dense in $C([a,b],||\cdot||_{\infty})$? Let $C([a,b],||\cdot||_{\infty})$ be the space of continuous functions from $[a,b]$ to $\mathbb{K}$, where $\mathbb{K}\in\{\mathbb{R},\mathbb{C}\}$. I know that $C([a,b],||\cdot||_{\infty})$ is a Banach space.
It is easy to see that the same is not true for $C^{1}([a,b],||\cdot||_{\infty})$, the subspace of continuously differentiable functions. My guess is that $C^{1}([a,b],||\cdot||_{\infty})$ is actually dense in $C([a,b],||\cdot||_{\infty})$, but I have no idea how to prove that.
Can anybody help?
 A: You are correct that $C^1([a,b])$ is dense in $C([a,b])$ with respect to the uniform norm. There are a few ways to prove this, depending what is in your toolkit. One way would be to invoke the Weirstrass polynomial approximation theorem. Another would be to use convolution with a smooth approximation to the delta function to smooth out a given continuous function without changing it much.
Note that, while it is true that $C^1([a,b])$ is not a Banach space for $\|\cdot\|_\infty$, it is a Banach space with respect to other norms, such as $\|f\| := \|f\|_\infty + \|f'\|_\infty$.
A: This isn't meaningfully different from Mike F's answer, I just wanted to write out some details since there is a simple probabilistic answer to this question that only uses very basic probability and real analysis.
To avoid messy notation, I'll just take $a=0$ and $b=1$. This is without loss of generality by composing with a linear transformation. The claim is that polynomials are dense in $C[0,1]$. Fix $f \in C[0,1]$; we want to show that
$$
\lim_{n\to\infty}\sup_{x \in [0,1]}\left|f(x) - \sum_{m=0}^n \binom{n}{m}x^m(1-x)^{n-m}f(m/n)\right| =0.
$$
These are called Bernstein polynomials. For some intuition about what's going on here, let's suppose that $X_i$ are i.i.d. Bernoulli$(x)$ random variables (i.e. $P(X_i = 1) = x, P(X_i=0)=1-x$). Then for
$$
S_n = \sum_{i=1}^n X_i,
$$
we have
$$
P(S_n = m) = \binom{n}{m}x^m (1-x)^{n-m} \\
$$
$$
\mathbb{E}[S_n/n] = x
$$
and
$$
\mathbb{E}[f(S_n/n)] = \sum_{m=0}^n \binom{n}{m}x^m(1-x)^{n-m}f(m/n)
$$
Fix $\epsilon>0$. Since $f$ is uniformly continuous, we can fix a $\delta>0$ so that $|f(x)-f(y)|<\epsilon$ whenever $|x-y|<\delta$.
By Chebychev's inequality
$$
\mathbb{P}\left(|S_n/n - x|>\delta\right) \leq \frac{Var(S_n/n)}{\delta^2} = \frac{x(1-x)}{n \delta^2} \leq \frac{1}{4n \delta^2}.
$$
By Jensen's inequality, for each $x$ we have
$$
\left|\sum_{m=0}^n \binom{n}{m}x^m(1-x)^{n-m}f(m/n) - f(x)\right| = \\
|\mathbb{E}[f(S_n/n)] - f(x)| \leq \mathbb{E}|f(S_n/n)-f(x)| \leq \epsilon + 2\|f\|_\infty\mathbb{P}(|S_n/n-x|>\delta) \\\leq \epsilon + \frac{\|f\|_\infty}{2n \delta^2}.
$$
Send $n \to \infty$ and then $\epsilon \to 0$ to obtain the result.
