TITLE: If a function is left- and right-differentiable everywhere, how much can the one-sided derivatives disagree?
QUESTION [7 upvotes]: Just for fun, I was proving some results about convex functions the other day. I was able to show that for a convex set $E\subseteq\Bbb R,$ if $f:E\to\Bbb R$ is convex, then $f$ is left- and right-differentiable (and so continuous) on the interior of $E$ (though it needn't even be continuous at any boundary points contained in $E$). Moreover, if $x_0$ is an interior point of $E,$ then the left derivative of $f$ at $x_0$ is no greater than the right derivative of $f$ at $x_0.$
I am aware (though I haven't had a chance to try to prove) that the left and right derivative of such a function $f$ disagree at no more than countably-many points, but that got me wondering about a more general result.
Given an open convex subset $E\subseteq\Bbb R$ and a (not necessarily convex) function $f:E\to\Bbb R$ such that $f$ is left- and right- differentiable at every point of $E,$ can we conclude that $f$ fails to be differentiable at no more than countably-many points of $E,$ or do we need more information about $f$ to get there? What if we know that the right derivative dominates the left derivative everywhere? Is it possible that the right derivative strictly dominates the left derivative everywhere?

REPLY [3 votes]: Yes. Theorem 17.9 of Hewitt and Stromberg's Real and Abstract Analysis states: let $(a,b)$ be any open interval of $\Bbb  R$ and let $f$ be an arbitrary real-valued function defined on $(a,b)$. Then there exist only countably many points $x\in(a,b)$ such that $f′_+(x)$ and $f′_-(x)$ both exist [they may be infinite] and are not equal.