The size of the set of functions that map $\mathbb{R}\to \mathbb{R}$ equals $(\#\mathbb{R})^{\#\mathbb{R}}$. How many non-differentiable functions are there in this set?


Solution 1:

Here is a simple way to get the answer:

Suppose a function $f:\mathbb R \to \mathbb R$ is equal to the function $g$ on $\mathbb Q$, where $g:\mathbb Q \to \mathbb Q$ is defined by $g(p/q) = q$ (and we choose the representation $p/q$ so that $q$ is the smallest possible positive integer). Then $f$ is nowhere differentiable, because it is unbounded on every interval.

And the number of such $f$ is $|\mathbb R^{\mathbb R \setminus \mathbb Q}| = |\mathbb R^{\mathbb R}|$, because $|\mathbb R \setminus \mathbb Q| = |\mathbb R|$.

Hence there as many nowhere-differentiable functions $\mathbb R \to \mathbb R$ as there are functions $\mathbb R \to \mathbb R$.

(This doesn't tell you how many differentiable functions there are. The number of somewhere-differentiable functions is the same as the set of all functions; but the number of everywhere-differentiable functions is $|\mathbb R^\mathbb Q| = |\mathbb R|$, because such a function is determined by its values on the rationals.)

Solution 2:

It is very hard to say something about "how many" such functions exist. One possibility is to use the formalism of Baire's Theorem and indeed it is known that

the set of functions that have a derivative at some point is a meager set in the space of all continuous functions.

EDIT: The precise meaning of this statement really requires to learn some basic definitions from Baire's theory, but the summary is: functions that have a derivative at some point are really, really, really rare -- even among continuous ones, let alone among all functions. On the other hand, a different, more measure-flavoured answer to the OP's question can be found here.