Let $f : [a,b] \to \Bbb R$ be everywhere differentiable with $f'(a) = 1$ and $f'(b) =-1$.


By Darboux theorem, we know that $f'([a,b])$ is an interval containing $[-1,1]$. In particular, the set $\{x \in [a,b]: |f'(x)| < 1\}$ is uncountable. But how small can it be? Or to be more formal:



> 
> Can $\{x \in [a,b]: |f'(x)| < 1\}$ have measure zero?
> 
> 
> 


I guess not, because I have never heard of such a counterexample. But I don't see how to prove it.



How quickly can the derivative of an everywhere differentiable function change sign?
Fact 1 (Goldowsky-Tonelli): Let $F:(a, b) \to \mathbb{R}$ be continuous and have finite derivative everywhere. Suppose $F' \geq 0$ almost everywhere. Then $F$ is monotonically increasing.


For a proof of this, see Saks, Theory of the integral, Chapter 6, page 206.


Suppose $X = \{x \in [a, b]: -1 < f'(x) < 1\}$ has zero measure. Let $Y = \{x \in [a, b]: f'(x) \leq -1\}$ and $Z = \{x \in [a, b]: f'(x) \geq 1\}$


Claim 1: Every point of $X$ is a limit point of $Y$ and a limit point of $Z$.


Proof: Suppose for example $x \in X$ is not a limit point of $Y$ - the other case is similar. Let $I$ be an open interval around $x$ disjoint with $Y$. Then at almost every $y \in I$, $f'(y) \geq 1$. Using Fact 1, it follows that the function $y \mapsto f(y) - y$ is monotonically increasing on $I$ and hence for every $y \in I$, $f'(y) \geq 1$ which is impossible as $x \in Y \cap X$.


Claim 2: The set of points of continuity of $f' \upharpoonright \overline{X}$ is dense in $\overline{X}$ (the closure of $X$).


Proof: Well known (using Baire category theorem).


Now let $I$ be any open interval around $x \in X$. Then the supremum of $f' \upharpoonright I$ is at least $1$ and its infimum is at most $-1$ by Claim 1. By Darboux theorem, it follows that $f' \upharpoonright I$ and hence also $f' \upharpoonright (I \cap X)$ takes every value in $(-1, 1)$. So $f'$ is everywhere discontinuous on $\overline{X}$ which contradicts Claim 2.


