  Proof of the Mean Value Theorem

If $f$ is a function that is continuous on $[a,b]$ and differentiable on $(a,b)$, then there exists some $c$ in $(a,b)$ where

$$f'(c) = \frac{f(b)-f(a)}{b-a}$$

Proof:

Let $A$ be the point $(a,f(a))$ and $B$ be the point $(b,f(b))$.

Note that the slope of the secant line to $f$ through $A$ and $B$ is $\displaystyle{\frac{f(b)-f(a)}{b-a}}$.

Combining this slope with the point $(a,f(a))$ gives us the equation of this secant line:

$$y = \frac{f(b)-f(a)}{b-a} (x-a) + f(a)$$

Let $F(x)$ share the magnitude of the vertical distance between a point $(x,f(x))$ on the graph of the function $f$ and the corresponding point on the secant line through $A$ and $B$, making $F$ positive when the graph of $f$ is above the secant, and negative otherwise.

More succinctly,

$$F(x) = f(x) - \left[\frac{f(b)-f(a)}{b-a} (x-a) + f(a)\right]$$

We intend to show that $F(x)$ satisfies the three hypotheses of Rolle's Theorem.

First, $F$ is continuous on $[a,b]$, being the difference of $f$ and a polynomial function, both of which are continuous there.

Second, $F$ is differentiable on $(a,b)$, for similar reasons. $F$ is the difference of $f$ and a polynomial function, both of which are differentiable there.

Lastly, note at $a$ and $b$,

$$F(a) = f(a) - [0 + f(a)] = 0 \quad \textrm{ and } \quad F(b) = f(b) - [f(b) - f(a) + f(a)] = 0$$

Thus, the conditions of Rolle's Theorem are satisfied and there must exist some $c$ in $(a,b)$ where $F'(c) = 0$.

Consider the derivative of $F(x)$:

$$F'(x) = f'(x) - \frac{f(b)-f(a)}{b-a}$$

Thus, for some $c$ in $(a,b)$,

$$0 = f'(c) - \frac{f(b)-f(a)}{b-a}$$

Equivalently, we have shown there exists some $c$ in $(a,b)$ where

$$f'(c) = \frac{f(b)-f(a)}{b-a}$$