# Can we approximate a smooth function by a continuous and nowhere smooth function uniformly?

From Stone-Weierstrass approximation theorem we know that we can approximate a continuous(no matter differentiable or not) by a polynomial function uniformly within a compact interval domain. But,can we approximate a smooth function by a nowhere smooth continuous function uniformly?

• The question in the title is different from the question in the question body – Alessandro Codenotti Aug 18 at 14:19
• thanks for noticing,I have changed it. – user685348 Aug 18 at 14:33
• Can you construct a continuous bounded nowhere smooth function ? – reuns Aug 18 at 14:41
• Nowhere differentiable functions are dense in the space of continuous functions. – Matt Samuel Aug 18 at 17:59

Yes. Let $$g:[-1,1]\to\mathbb{R}$$ be a given smooth function. Let $$g_n:[-1,1]\to\mathbb{R}$$ be a sequence of polynomial that converges uniformly to $$g$$ and let $$h:[-1,1]\to\mathbb{R}$$ be a bounded nowhere differentiable function. Then the sequence $$v_n (t)=g_n (t) +n^{-1} h(t)$$ is a sequence of nowhere differentiable functions that converges to $$g$$ uniformly.