# 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:

1. $$A_{n}$$ is open in $$C([0,1],\mathbb{R})$$

2. $$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.

• I don't know the answer, but I have a helpful comment: the set $\mathbb B$ doesn't contain a non-empty open set. Indeed, the set $\mathcal P$ of polynomials is dense on $C([0,1],\mathbb R)$. But then, since $\mathcal P\subset \mathbb B^c$, if $\mathbb B$ contained a non-empty open set $U$, then the closure $\overline P$ wouldn't reach any of the points in $U$, a contradiction. So, $\mathbb B$ contains an intersection of open sets but none of them is contained in $\mathbb B$ – André Porto Nov 10 '18 at 21:19
• Now I know the answer. Just posted it. – André Porto Nov 10 '18 at 22:17
• For what it's worth, it is not difficult to show that the continuous nowhere differentiable functions form a dense subset (even a $c$-dense subset) of the continuous functions, once you have the existence of one such function, by using the same method I outlined in this answer. However, the Baire category method allows you to do this without needing in advance a nowhere differentiable continuous function, and it gives a stronger result (being co-meager is stronger than being $c$-dense). – Dave L. Renfro Nov 10 '18 at 23:20

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$$.

• Thanks so much! As soon as I can I'll vote this answer up! – asd123 Nov 10 '18 at 22:40
• But still dont know where is the Baire category theorem applied here, I mean, its suppose to have something to do with this problem cause my teacher said this was a pretty cool application of it. – asd123 Nov 10 '18 at 22:42
• One of the forms of Baire's category theorem is that for any sequence $(U_n)_{n\in\mathbb N}$ of open dense sets, the intersection $\displaystyle\bigcap_{n\in\mathbb N}U_n$ is a dense set (it may be not open, but surely dense). This is the case of the sequence $(A_n)_{n\in\mathbb N}$ that you defined. Each $A_n$ is open and dense. By Baire's category theorem, $\displaystyle\bigcap_{n\in\mathbb N}A_n$ is a dense set. Since we proved that $\displaystyle\bigcap_{n\in\mathbb N}A_n\subset\mathbb B$, it follows that $\mathbb B$ is dense (any set that contains a dense set is dense). – André Porto Nov 11 '18 at 0:39
• Thanks so much you cleared my mind :) – asd123 Nov 11 '18 at 3:13

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$$!