[Math] Proof that the nowhere differentiable functions are dense in $C_b(\mathbb R)$.

continuitymetric-spacesreal-analysis

I tried to make a proof, where I use a Weierstrass function. I was surprised at how easy it was, and thus a little doubtful as to the correctness of the proof. I've looked it over, and didn't find any errors. So I post it here in case the good people here can verify my proof.

Heres the proof:

Consider the banach space $X=(C_b(\mathbb{R}), ||\cdot||_\infty)$, where
$C_b(\mathbb{R})$ is the set of bounded continuous functions from a
$\mathbb{R}$
to $\mathbb R $. We wish to prove that the nowhere differentiable
continuous functions are dense in this banach space. \
Firstly we recall that K. Weierstrass proved that:\
\begin{equation*}
\label{eq:weierstrass}
W_{a,b}(x) = \sum_{n=0}^\infty a^n \cos(b^n\pi x)
\end{equation*}
is nowhere differentiable (and continuous) when $0<a<1$, $b$ positive
odd integer and $ab > 1+ \frac{3}{2} \pi$. Specifically we have that
$W_{\frac12,25}$ is nowhere differentiable and continuous. Furthermore
we have that $|| W_{\frac12,25} ||_\infty \leq 2 < 3$.\

Now lets consider the set $N\subset C_b(\mathbb{R})$ of nowhere
differentiable functions. Take some $f \in C_b(\mathbb{R})$. Denote by
$D \subseteq \mathbb R$ the set of points where $f$ is
differentiable. Now define $g_n$ by:
\begin{equation*}
g_n(x) =
\begin{cases}
f(x) + \frac{1}{n} W_{\frac12,25}(x), \quad x \in D\\
f(x) \quad x \in \mathbb R \setminus D.
\end{cases}
\end{equation*}
Note that $g_n \in N$ since we added $W_{\frac12,25}$ to the
differentiable parts of $f$ (if $g_n$ where differentiable at a point
$x\in D$ then so would $g_n (x) -f(x)
=\frac{1}{n}W_{\frac12,25}(x)$). Finally we see that:
\begin{align*}
||g_n(x) -f(x)||_\infty \leq ||\frac{1}{n}W_{\frac12,25}||_\infty
\leq \frac{3}{n} \to 0, \qquad n \to \infty.
\end{align*}
Hence $N$ is dense in $C_b(\mathbb R)$.

Best Answer

Of course the given proof is wrong because $g_n$ is not continuous. But I was hugely amused to realize that we don't need that category argument; the given proof can be easily fixed, and the fix has a deliciously paradoxical flavor:

The fact that the nowhere-differentiable functions are dense is immediate from the fact that the differentiable functions are dense!

Indeed, say $f\in C_b$ and $\epsilon>0$. Choose a differentiable function $g$ with $$||f-g||<\epsilon.$$Then $g+\epsilon W$ is nowhere differentiable, and $$||f-(g+\epsilon W)||<3\epsilon.$$


Detail The fact that the differentiable functions are dense is slightly more problematic than for, say, $C_0$, because $f\in C_b$ need not be uniformly continuous, so the convolution with an approximate identity ("mollifier") need not converge to $f$ uniformly.

But we could use an approximate identity to write $$f=\sum_{n=-\infty}^\infty f_n,$$where $f_n$ is supported in $(n,n+2)$. (That sum converges uniformly on compact sets, but not in $C_b$.) Now convolution with an approximate identity gives us differentiable $g_n$ supported in $(n,n+2)$ such that $||f_n-g_n||<\epsilon$; now if $g=\sum g_n$ we have $||f-g||<2\epsilon$.

Related Question