Let's say that a set $X\subseteq [0,1]$ has Property Q if the following holds: For every continuous $f:[0,1]\to\mathbb{R}$ with $f(0)=0$ and derivative existing and bounded by 1 on $[0,1]\setminus X$, we have $f(1)\le 1$.


All countable sets have Property Q since then $f'(x)$ is integrable and $\int\_0^x f'(u)\,du=f(x)$ using the Henstock–Kurzweil (gauge) integral. However a constant multiple of the Cantor function shows that not all sets of measure 0 have Property Q.


Is there a characterisation of sets of Property Q?



A boundary of the second fundamental theorem of calculus
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.](https://en.wikipedia.org/wiki/Perfect_set_property) So $A$ is compact, uncountable, and has no isolated points. Everything is trivial of course if $X$ contains an interval, so we can also assume that $A$ is nowhere dense (and thus a Cantor set).


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


