Prove that if $f$ is differentiable on $[a,b]$ and $f'$ is monotonic on $[a,b]$ , $f'$ is continuous on $[a,b]$ Assume that $f:[a,b] \to \mathbb R$ is a function.  
Prove the following statement :  

If $f$ is differentiable on $[a,b]$ and $f'$ is monotonic on $[a,b]$,
  then $f'$ is continuous on $[a,b]$.  

Note 1 : We've learned a theorem in the class which says :  

If $I$ is an open interval and $f:I\to\mathbb R$ is monotonic, then
  $f$ is continuous on $I$.

So, here i can say that $f'$ is continuous on $(a,b)$. But my problem is how to prove that $f'$ is also continuous at the end points $a$,$b$. 
Note 2 : There's a similar question here but please pay attention that my question is asking about when $f$ is defined on a closed interval.
 A: Since $f'$ is monotonic, it has a left-hand limit and a right-hand limit at each point of $(a,b)$, and all we have to prove is these limits are equal. We may suppose $f'$ is increasing.
If there's a point $x_0$ such that the l.-h. limit $l_s$  of $f'$ at $x_0$ and its  r.-h. limit $l_r$ are distinct, we note that $\;l_s\le f'(x_0)\le l_r$ $\;(l_s<l_r)$. 
Take any  number $t\in (l_s,l_r),\enspace t\ne f'(x_0)$. As derivatives satisfy the intermediate value property, there's a $y\in(a,b)$ such that $f'(y)=t$. Now, either $y>x_0$ or $y<x_0$.
It is impossible that $y>x_0$, since $f'(y)<l_r$ and $l_r=\inf\limits_{z>x_0}f'(z)$. 
It's likewise impossible $y<x_0$, since $f'(y)>l_s$ and $l_s=\sup\limits_{z<x_0}f'(z)$.
Thus the only possibility is $l_s=l_r$, which proves $f'$ is continuous.
A: The Theorem that you have quoted is clearly false, as not every monotone function is continuous.
The Answer that you have cited yields the solution for this problem. Assume wlog that $f'$ is increasing. Let $x_0 \in [a, b)$ be an arbitrary point and $\varepsilon > 0$. Now consider the two cases:


*

*$f'(b) \le f'(x_0) + \varepsilon$: In this case, choose $\delta = b - x_0$.

*$f'(b) > f'(x_0) + \varepsilon$: Since derivatives satisfy the Darboux property, there is a $\delta > 0$ with $f'(x_0 + \delta) = f'(x_0) + \varepsilon$.


Now in Both cases the inequality $f'(x_0) \le f'(x) \le f'(x_0) + \varepsilon$ holds for all $x \in [x_0,x_0+ \delta]$. Since $\varepsilon > 0$ was arbitrary, this yields $\lim \limits_{x \searrow x_0} f'(x) = f'(x_0)$ for all $x_0 \in [a, b)$, i.e. $f'$ is right-continuous on $[a, b)$.
A similar argument shows that $f'$ is also left-continuous on $(a, b]$, which yields the continuity of $f'$.
A: Darboux's theorem asserts that derivatives satisfy the intermediate value property. Can you prove a monotone function that satisfies the intermediate value property is in fact continuous? 
A: Another possible proof, using “only” the mean-value theorem, but not Darboux's theorem.
For $x_0 \in [a, b)$ exists the one-sided limit 
$$
 r = \lim_{x \to x_0+} f'(x) 
$$
because $f'$ is monotonic. For $\epsilon > 0$ there is a $\delta > 0$ such that
$$
 r  - \epsilon < f'(x) < r + \epsilon 
$$
if $x_0 < x < x_0 + \delta$. Using the mean-value theorem it follows that for these $x$,
$$
\begin{align}
 \frac{f(x) - f(x_0)}{x-x_0} &= f'(\xi) \quad \text{ for some } \xi \in(x_0, x_0+ \delta) \\
 &\in (r - \epsilon, r + \epsilon) \, .
\end{align}
$$
Taking the limit $x \to x_0$ we get 
$$
 r  - \epsilon \le f'(x_0) \le r + \epsilon \, ,
$$
and since $\epsilon $ was arbitrary, $f'(x_0) = r = \lim_{x \to x_0+} f'(x)$.
So $f'$ is right-continuous on $[a, b)$. In the same way it is shown that $f'$ is left-continuous on $(a, b]$, and that completes the proof.
