TITLE: Continuity and Right Derivative
QUESTION [7 upvotes]: $f(x)$ is continuous on $\mathbb{R}$, $f_+'(x)$ exists and is continuous on $\mathbb{R}$. Prove that $f'(x) $ exists on $\mathbb{R}$.
It's OK that $|f_+'(x)-f_+'(y)|<\epsilon$ if x and y are enclosed in a small interval. For a fixed x, we have $|\frac{f(y)-f(x)}{y-x}-f_+'(x)|<\epsilon$ if $y\in (x,x+\delta)$ but $\delta$ depends greatly on $x$. I wonder if there are better methods.

REPLY [3 votes]: You can adapt the proof of Rolle's theorem, to obtain following generalized version of MVT: For $a<b$ there exists some $c, d\in [a,b]$ such that
$$ f'_+(c) \le \frac{f(b) - f(a)}{b-a} \le f'_+(d).$$
Then, continuity of $f'_+$ yields the claim. 
So for the generalized Rolle's theorem and MVT:
Rolle's theorem: For $a<b$, if $f(a) = f(b)$ holds, then there are some $c,d\in[a,b]$ with $f'_+(c) \le 0 \le f'_+(d)$,
Proof: If $f$ attains its maximum on $[a,b]$ in $[a,b)$, then take $c$ as a maximizer. If $f$ attains its maximum at $b$, it also attains the maximum at $a$, as $f(a) = f(b)$. Take $d$ as minimum of $f$ on $[a,b)$ with an analogous argument. 
MVT: For $a<b$ there exists some $c, d\in [a,b]$ such that
$$ f'_+(c) \le \frac{f(b) - f(a)}{b-a} \le f'_+(d).$$
Proof: Consider
$$g(x) = f(x) - \frac{f(b) - f(a)}{b-a} (x-a),$$
which satisfies $g(a) = g(b) = f(a)$. Then, our Rolle's theorem yields $c,d\in [a,b]$ such that
$$ g'_+(c) = f'_+(c) - \frac{f(b) - f(a)}{b-a} \le 0$$
and
$$ g'_+(d) = f'_+(d) - \frac{f(b) - f(a)}{b-a} \ge 0.$$