Proving that the set of continuous nowhere differentiable functions is dense using Baire's Category Theorem
I'm trying to prove the next problem:
Let $C([0,1],\mathbb{R})$ the space of continuous function $f:[0,1]\to \mathbb{R}$ with the supremum(uniform convergence) metric and let $\mathbb{B}\subset C([0,1],\mathbb{R})$ be the subset of continuous nowhere differentiable functions. I have to show that B contains a countable intersection of dense open sets.
In order to do that, we consider the set: $$A_{n}:=\{f\in C([0,1],\mathbb{R}): \forall t\in [0,1]\space \exists h \space s.t \mid \frac{f(t+h)-f(t)}{h}\mid > n \}$$
And then, if we prove:
$A_{n}$ is open in $C([0,1],\mathbb{R})$
$A_{n}$ is dense in $C([0,1],\mathbb{R})$
Then we can conclude that $\mathbb{B}$ contains a countable intersection of open dense subsets. Finally, this means that the set $\mathbb{B}$ is dense because of the Baire's category theorem.
I've already proven 1) and 2) but I cant get to the conclusion.
It is probably a very elemental thing. I hope you can help.
Solution 1:
It only lasts to see that $\displaystyle\bigcap_{n\in\mathbb N} A_n \subset \mathbb B$.
Fix $f\in\displaystyle\bigcap_{n\in\mathbb N} A_n$ and we will prove below that $f\in\mathbb B$.
Fix $t\in[0,1]$. For each $n\in \mathbb N$, there exists $h_n$ such that $$ \left|\dfrac{f(t+h_n)-f(t)}{h_n}\right| > n. $$ Therefore,
$$ \lim_{n\to +\infty}\left|\dfrac{f(t+h_n)-f(t)}{h_n}\right|=+\infty. $$
Now observe that
Claim. There exists a subsequence of $(h_n)_{n\in\mathbb N}$ converging to $0$.
Suppose the contrary. Then, there exists $\delta>0$ such that $|h_n|\geq \delta$ for any $n\in\mathbb N$. Then $$ \left|\dfrac{f(t+h_n)-f(t)}{h_n}\right|\leq \dfrac{|f(t+h_n)-f(t)|}{\delta},\ \forall n \in \mathbb N, $$ and since $f$ is continuous in $[0,1]$, it is bounded by some $M>0$, and so $$ \left|\dfrac{f(t+h_n)-f(t)}{h_n}\right|\leq \dfrac{2M}{\delta},\ \forall n \in \mathbb N, $$ but this contradicts the fact that the limit is infinite, and the claim is proved
Fix the subsequence $(h_{n_m})_{m\in\mathbb N}$ given by the Claim. We have that $h_{n_m}\to 0$ and $$ \lim_{m\to +\infty}\left|\dfrac{f(t+h_{n_m})-f(t)}{h_{n_m}}\right|=+\infty, $$ so using this classical equivalence on limits (from real analysis):
$\displaystyle\lim_{t\to a} f(t)=L \Leftrightarrow$ $\displaystyle\lim_{n\to+\infty} f(t_n)=L$, for any sequence $t_n\to a$,
it follows that the limit $\displaystyle\lim_{h\to0}\left|\dfrac{f(t+h)-f(t)}{h}\right|$ doesn't exist, and consequently, $\displaystyle\lim_{h\to0}\dfrac{f(t+h)-f(t)}{h}$ doesn't exist as well, so $f$ is not differentiable at $t$. Since $t\in[0,1]$ was fixed arbitrarily, it follows that $f$ is nowhere differentiable and so $f\in\mathbb B$.
Solution 2:
The Baire category theorem states that for a sequence $(U_n)_{n \in \mathbb{N}}$ of open dense sets, the set $U = \bigcap_{n=1}^\infty U_n$ is also dense.
Note that in our situation $\bigcap_{n=1}^\infty A_n \subset \mathbb{B}$ and $\bigcap_{n=1}^\infty A_n$ is dense. In order to have $\bigcap_{n=1}^\infty A_n \subset \mathbb{B}$ you should modify the definition of $A_n$ as follows: $$A_{n}:=\{f\in C([0,1],\mathbb{R}): \forall t\in [0,1]\space \exists |h| \in (0,1/n) \, s.t \mid \frac{f(t+h)-f(t)}{h}\mid > n \}.$$ Now if $f \in \bigcap_{n=1}^\infty A_n$, then for any $t \in [0,1]$ and any $n \in \mathbb{N}$ there exists $0 < |h_n| < 1/n$ with $$\Big|\frac{f(t+h_n)-f(t)}{h_n}\Big| > n.$$ Thus $f$ is not differentiable in $t$!