TITLE: Problem with real differentiable function involving both Mean Value Theorem and Intermediate Value Theorem
QUESTION [5 upvotes]: Problem:
Let $a,b \in \Bbb R$, $a<b$, and let $f$ be a differentiable real-valued function on an open subset of $\Bbb R$ that contains $[a,b]$. Show that if $\gamma$ is any real number between $f'(a)$ and $f'(b)$ then there exists a number $c \in (a,b)$ such that $\gamma = f'(c)$ .
So I was trying to use the Mean Value Theorem and the Intermediate Value Theorem for the function $\frac {f(x_1) -f(x_2)}{x_1 - x_2}$ on this set: $\{(x_1,x_2) \in E^2: a \le x_1 < x_2 \le b \}$ but I am stuck how do you go from here (if my thinking is correct).

REPLY [5 votes]: Suppose $f'(a)<\gamma <f'(b)$ and consider $g(x)=f(x)-\gamma x$, then $g'(x)=f'(x)-\gamma$ and therefore $g'(a)<0<g'(b)$.
Use the last inequality to deduce that there exist $c,d \in (a,b)$ such that $g(c)<g(a)$ and $g(d)<g(b)$. It then follows that the minimum of $g$ (which exists, since $g$ is differentiable and hence continuous in $[a,b]$, which is compact) occurs in $(a,b)$. If $g$ achieves its minimum at $x_0$, it follows that that $g'(x_0)=0$