The Mean Value Theorem

Suppose you drive $120$ miles in $2$ hours. Your average speed is $60$ mi/h. Then at some moment, your speedometer must have read exactly $60$ mi/h. The Mean Value Theorem says this is always true: at some moment, the instantaneous rate equals the average rate.

This theorem connects the derivative at one point with the change over a whole interval. Many later results depend on it.

Rolle's Theorem

We start with a special case.

Rolle's Theorem: Suppose that

  1. $f$ is continuous on the closed interval $[a,b]$,
  2. $f$ is differentiable on the open interval $(a,b)$, and
  3. $f(a)=f(b)$.

Then there is a number $c$ in $(a,b)$ where

$f'(c)=0$.

In words: if a smooth graph starts and ends at the same height, it has a horizontal tangent line somewhere in between.

acbf(a)f(b)xy
Rolle's Theorem: if $f(a)=f(b)$, the tangent line is horizontal somewhere between $a$ and $b$.

Why: By the Extreme Value Theorem, $f$ has an absolute maximum and an absolute minimum on $[a,b]$.

Example 1: Check that Rolle's Theorem applies to

$f(x)=x^2-4x+1$

on $[0,4]$. Then find the number $c$.

Solution:

$f$ is a polynomial, so it is continuous and differentiable everywhere. Also,

$f(0)=1$

$f(4)=16-16+1=1$

So $f(0)=f(4)$, and the theorem applies.

Now solve $f'(c)=0$:

$\begin{align*}2c-4&=0\\c&=2\end{align*}$

The number $c=2$ is in $(0,4)$. At $x=2$, the parabola has its lowest point and a horizontal tangent line.

The Mean Value Theorem

Now let the endpoints have different heights.

The Mean Value Theorem: Suppose that

  1. $f$ is continuous on $[a,b]$, and
  2. $f$ is differentiable on $(a,b)$.

Then there is a number $c$ in $(a,b)$ where

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

The right side is the slope of the secant line through $A=(a,f(a))$ and $B=(b,f(b))$. It is also the average rate of change of $f$ on $[a,b]$.

So the theorem says two things, in two languages:

c2ABsecanttangentxy
The Mean Value Theorem for $f(x)=x^3-x$ on $[0,2]$. The tangent line at $c$ is parallel to the secant line $AB$.

Optional Why the Mean Value Theorem is true

Let $m=\dfrac{f(b)-f(a)}{b-a}$ be the slope of the secant line. Define a new function: $h(x)$ is the height of the graph above the secant line,

$h(x)=f(x)-f(a)-m(x-a)$.

Then $h(a)=0$, and

$h(b)=f(b)-f(a)-m(b-a)=0$.

So $h$ starts and ends at the same height.

By Rolle's Theorem, $h'(c)=0$ for some $c$ in $(a,b)$. Since $h'(x)=f'(x)-m$, this gives

$f'(c)=m$.

Example 2: Find a number $c$ that satisfies the Mean Value Theorem for

$f(x)=x^3-x$

on $[0,2]$.

Solution:

$f$ is a polynomial, so the theorem applies.

The slope of the secant line:

$\dfrac{f(2)-f(0)}{2-0}=\dfrac{6-0}{2}=3$

Now solve $f'(c)=3$:

$\begin{align*}3c^2-1&=3\\c^2&=\dfrac{4}{3}\\c&=\pm\dfrac{2}{\sqrt{3}}\end{align*}$

Only the positive value is in $(0,2)$. So

$c=\dfrac{2}{\sqrt{3}}\approx 1.155$.

This is the point $c$ in the figure above.

Example 3: Find a number $c$ that satisfies the Mean Value Theorem for

$f(x)=\sqrt{x}$

on $[0,4]$.

Solution:

$f$ is continuous on $[0,4]$ and differentiable on $(0,4)$. (It is not differentiable at $0$, but the theorem needs that only on the open interval.)

The slope of the secant line:

$\dfrac{\sqrt{4}-\sqrt{0}}{4-0}=\dfrac{2}{4}=\dfrac{1}{2}$

Now solve $f'(c)=\dfrac{1}{2}$:

$\begin{align*}\dfrac{1}{2\sqrt{c}}&=\dfrac{1}{2}\\\sqrt{c}&=1\\c&=1\end{align*}$

Example 4: A driver passes a toll booth at 1:00 p.m. At 3:00 p.m., the driver passes another toll booth $150$ miles away. The speed limit is $65$ mi/h. Prove that the driver was speeding at some moment.

Solution:

Let $s(t)$ be the car's position, in miles, $t$ hours after 1:00 p.m. Position is continuous and differentiable, so the Mean Value Theorem applies on $[0,2]$.

The average speed is

$\dfrac{s(2)-s(0)}{2-0}=\dfrac{150}{2}=75$ mi/h.

So at some time $c$ between 1:00 and 3:00, the car's velocity was $s'(c)=75$ mi/h. That is above the limit of $65$ mi/h.

Why the conditions matter

If $f$ is not differentiable at even one point inside the interval, the theorem can fail.

Look at $f(x)=|x|$ on $[-1,1]$.

Here $f(-1)=1$ and $f(1)=1$. So the secant slope is $0$.

But the slope of $|x|$ is $-1$ or $1$ everywhere except $0$, and $f'(0)$ does not exist. So no number $c$ gives a slope of $0$.

Rolle's Theorem does not apply, because $|x|$ has a corner at $0$. (See the graph in maximum and minimum values.)

Two important consequences

1. Zero derivative means constant. If the derivative of $f$ is $0$ at every point of an interval, then $f$ is constant on that interval.

Why: Take any two numbers $x_1<x_2$ in the interval. By the Mean Value Theorem,

$f(x_2)-f(x_1)=f'(c)(x_2-x_1)$

for some $c$ between them. But $f'(c)=0$, so $f(x_2)=f(x_1)$. Every two values are equal, so $f$ is constant.

2. Same derivative means they differ by a constant. If $f'(x)=g'(x)$ for every $x$ in an interval, then

$f(x)=g(x)+C$

for some constant $C$.

Why: The derivative of $f-g$ is $f'-g'=0$. So $f-g$ is a constant $C$, by the first consequence.

The second fact will be very important for integrals. It says that two functions with the same derivative have graphs that are just shifted up or down from each other.

Example 5: Use the first consequence to show that

$\sin^2 x+\cos^2 x=1$.

Solution:

Let $f(x)=\sin^2 x+\cos^2 x$. By the chain rule,

$\begin{align*}&f'(x)\\&=2\sin x\cos x+2\cos x(-\sin x)\\&=0\end{align*}$

So $f$ is constant. To find the constant, use $x=0$:

$f(0)=0^2+1^2=1$

So $\sin^2 x+\cos^2 x=1$ for every $x$.

Example 6: Suppose $f(0)=-3$ and $f'(x)\le 5$ for every $x$. How large can $f(2)$ be?

Solution:

$f$ is differentiable everywhere, so it is also continuous. By the Mean Value Theorem on $[0,2]$, there is a $c$ with

$f(2)-f(0)=f'(c)(2-0)$.

So

$\begin{align*}&f(2)\\&=f(0)+2f'(c)\\&=-3+2f'(c)\\&\le -3+2(5)\\&=7\end{align*}$

So $f(2)$ is at most $7$.

Summary