Mean Value Theorem related problem Let $f(x)\leq g(x)$ for all $x \in I$, where $I$ is an interval $\subseteq$ R. Also, let $f(c) = g(c)$ for some $c \in I$ but not an endpoint.
Prove that $f'(c) = g'(c)$ (assume differentiablity)
I have tried the Mean Value Theorem, let I = [a,b]. So for $f'(c) = g'(c)$ I will need to prove that $f(a) - f(b) = g(a) - g(b)$, but I am stuck at this. I have also tried the definition of derivative but I am still unable to go ahead.
Please give me some hints on this. Thank you!
 A: If we take the function $h(x) = g(x) - f(x)$
we see that $h(x) \ge 0 = h(c)$ for all $x \in I$
So $c$ is a point of local minimum for $h$ is in the interval $I$.
Since $c$ is internal point to $I$, and $h$ is differentiable at $c$
(and that's so because both $f$ and $g$ are differentiable at $c$),
it follows that $h'(c) = 0$ (there is a very basic theorem stating this).
Fermat's theorem (stationary points)
This theorem is more basic than the mean value theorem (MVT),
meaning it's usually proven before the MVT is proven (in real analysis courses).
So now we have $0 = h'(c) = f'(c) - g'(c)$
So it follows that $f'(c) = g'(c)$
So all in all, your problem is just a simple exercise of this theorem.
I don't think the problem is MVT related.
If you're interested in a proof, it's very simple
Proof of Fermat's theorem
A: Here's another view, though @peter.petrov's excellent answer is better IMO and points towards a very useful generalization.
Let's look at the ratio $\frac{f(x) - f(c)}{x-c}$ for points near $c$.
By hypothesis for all $x$ in the interval
$$f(x) - f(c) \leq g(x) - f(c) = g(x) - g(c)$$
for $x > c$ then, we have
$$\frac{f(x) - f(c)}{x-c} \leq \frac{g(x) - g(c)}{x-c}$$
$$\lim_{x \to c+} \frac{f(x) - f(c)}{x-c}\leq \lim_{x \to c+} \frac{g(x) - g(c)}{x-c}$$
or
$$f'(c) \leq g'(c)$$
However, for $x$ approaching $c$ from the left, the denominator $(x-c)$ is negative, so the inequality will be flipped, leaving us with
$$f'(c) \geq g'(c)$$
Taking these two statements together we have
$$f'(c) \leq g'(c) \leq f'(c)$$
Therefore, $f'(c) = g'(c)$.
