Skip to main content
1 of 2
Christian Remling
  • 24.2k
  • 2
  • 48
  • 83

Since $\{ x: f'(x) \textrm{ does not exist}\}$ is a Borel set, it seems reasonable to restrict ourselves to Borel sets. Then only countable sets work. An uncountable Borel set $X$ has a perfect subset $A$; see here. So $A$ is compact, uncountable, and has no isolated points.

Now we can mimic the construction of the Cantor function: write $A^c$ as the union of its connected components $\bigcup I_n$, pick an $I$ such that $A$ is uncountable both to the left and right of $I$ and set $f_1=1/2$ on $I$ and $f_1$ increases continuously from $0$ to $1$ on $[0,1]$ etc.

Then the $f_n$ converge to a continuous function $f$ with $f'=0$ off $A$, but $f(0)=0$, $f(1)=1$.

Christian Remling
  • 24.2k
  • 2
  • 48
  • 83