Skip to main content

CLP-1 Differential Calculus

Section 2.13 The Mean Value Theorem

Consider the following situation. Two towns are separated by a 120km long stretch of road. The police in town \(A\) observe a car leaving at 1pm. Their colleagues in town \(B\) see the car arriving at 2pm. After a quick phone call between the two police stations, the driver is issued a fine for going \(120km/h\) at some time between 1pm and 2pm. It is intuitively obvious
 1 
Unfortunately there are many obvious things that are decidedly false — for example “There are more rational numbers than integers.” or “Viking helmets had horns on them”.
that, because his average velocity was \(120km/h\text{,}\) the driver must have been going at least \(120km/h\) at some point. From a knowledge of the average velocity of the car, we are able to deduce something about an instantaneous velocity
 2 
Recall that speed and velocity are not the same. Velocity specifies the direction of motion as well as the rate of change. Objects moving along a straight line have velocities that are positive or negative numbers indicating which direction the object is moving along the line. Speed, on the other hand, is the distance travelled per unit time and is always a non-negative number — it is the absolute value of velocity.
.
Let us turn this around a little bit. Consider the premise of a 90s action film
 3 
The sequel won a Raspberry award for “Worst remake or sequel”.
— a bus must travel at a velocity of no less than \(80km/h\text{.}\) Being a bus, it is unable to go faster than, say, \(120km/h\text{.}\) The film runs for about 2 hours, and let’s assume that there is about thirty minutes of non-action — so the bus’ velocity is constrained between \(80\) and \(120km/h\) for a total of \(1.5\) hours.
It is again obvious that the bus must have travelled between \(80 \times 1.5 = 120\) and \(120\times 1.5 = 180km\) during the film. This time, from a knowledge of the instantaneous rate of change of position — the derivative — throughout a 90 minute time interval, we are able to say something about the net change of position during the 90 minutes.
In both of these scenarios we are making use of a piece of mathematics called the Mean Value Theorem. It says that, under appropriate hypotheses, the average rate of change \(\frac{f(b)-f(a)}{b-a}\) of a function over an interval is achieved exactly by the instantaneous rate of change \(f'(c)\) of the function at some
 4 
There must be at least one such point — there could be more than one — but there cannot be zero.
(unknown) point \(a\le c\le b\text{.}\) We shall get to a precise statement in Theorem 2.13.5. We start working up to it by first considering the special case in which \(f(a)=f(b)\text{.}\)

Subsection 2.13.1 Rolle’s Theorem

Again, like the two scenarios above, this theorem says something intuitively obvious. Consider — if you throw a ball straight up into the air and then catch it, at some time in between the throw and the catch it must be stationary. Translating this into mathematical statements, let \(s(t)\) be the height of the ball above the ground in metres, and let \(t\) be time from the moment the ball is thrown in seconds. Then we have
\begin{align*} s(0) &= 1 & \text{we release the ball at about hip-height}\\ s(4) &= 1 & \text{we catch the ball $4s$ later at hip-height} \end{align*}
Then we know there is some time in between — say at \(t=c\) — when the ball is stationary (in this case when the ball is at the top of its trajectory). I.e.
\begin{align*} v(c) = s'(c) &= 0. \end{align*}
Rolle’s theorem guarantees that for any differentiable function that starts and ends at the same value, there will always be at least one point between the start and finish where the derivative is zero.
There can, of course, also be multiple points at which the derivative is zero — but there must always be at least one. Notice, however, the theorem
 5 
Notice this is very similar to the intermediate value theorem (see Theorem 1.6.12)
does not tell us the value of \(c\text{,}\) just that such a \(c\) must exist.

Example 2.13.2. A simple application of Rolle’s theorem.

We can use Rolle’s theorem to show that the function
\begin{align*} f(x) &= \sin(x)-\cos(x) \end{align*}
has a point \(c\) between \(0\) and \(\frac{3\pi}{2}\) so that \(f'(c)=0\text{.}\)
To apply Rolle’s theorem we first have to show the function satisfies the conditions of the theorem on the interval \([0,\frac{3\pi}{2}]\text{.}\)
  • Since \(f\) is the sum of sine and cosine it is continuous on the interval and also differentiable on the interval.
  • Further, since
    \begin{align*} f(0) &= \sin 0 - \cos 0 = 0-1 = -1\\ f\left(\frac{3\pi}{2}\right) &= \sin\frac{3\pi}{2} - \cos\frac{3\pi}{2} = -1-0 = -1 \end{align*}
    we can now apply Rolle’s theorem.
  • Rolle’s theorem implies that there must be a point \(c \in (0,3\pi/2)\) so that \(f'(c) =0\text{.}\)
While Rolle’s theorem doesn’t tell us the value of \(c\text{,}\) this example is sufficiently simple that we can find it directly.
\begin{align*} f'(x) &= \cos x + \sin x\\ f'(c) &= \cos c + \sin c = 0 & \text{rearrange}\\ \sin c&= - \cos c & \text{and divide by $\cos c$}\\ \tan c &= -1 \end{align*}
Hence \(c = \frac{3\pi}{4}\text{.}\) We have sketched the function and the relevant points below.
A more substantial application of Rolle’s theorem (in conjunction with the intermediate value theorem — Theorem 1.6.12) is to show that a function does not have multiple zeros in an interval:

Example 2.13.3. Showing an equation has exactly 1 solution.

Show that the equation \(2x-1=\sin(x)\) has exactly 1 solution.
  • Start with a rough sketch of each side of the equation
    This seems like it should be true.
  • Notice that the problem we are trying to solve is equivalent to showing that the function
    \begin{align*} f(x) &= 2x-1-\sin(x) \end{align*}
    has only a single zero.
  • Since \(f(x)\) is the sum of a polynomial and a sine function, it is continuous and differentiable everywhere. Thus we can apply both the IVT and Rolle’s theorem.
  • Notice that \(f(0)=-1\) and \(f(2) = 4-1-\sin(2) = 3-\sin(2) \geq 2\text{,}\) since \(-1\leq \sin(2) \leq 1\text{.}\) Thus by the IVT we know there is at least one number \(c\) between \(0\) and \(2\) so that \(f(c)=0\text{.}\)
  • But our job is only half done — this shows that there is at least one zero, but it does not tell us there is no more than one. We have more work to do, and Rolle’s theorem is the tool we need.
  • Consider what would happen if \(f(x)\) is zero in 2 places — that is, there are numbers \(a,b\) so that \(f(a)=f(b)=0\text{.}\)
    • Since \(f(x)\) is differentiable everywhere and \(f(a)=f(b)=0\text{,}\) we can apply Rolle’s theorem.
    • Hence we know there is a point \(c\) between \(a\) and \(b\) so that \(f'(c)=0\text{.}\)
    • But let us examine \(f'(x)\text{:}\)
      \begin{align*} f'(x) &= 2- \cos x \end{align*}
      Since \(-1\leq \cos x \leq 1\text{,}\) we must have that \(f'(x) \geq 1\text{.}\)
    • But this contradicts Rolle’s theorem which tells us there must be a point at which the derivative is zero.
    Thus the function cannot be zero at two different places — otherwise we’d have a contradiction.
We can actually nail down the value of \(c\) using the bisection approach we used in example 1.6.15. If we do this carefully we find that \(c \approx 0.887862\dots\)

Subsection 2.13.2 Back to the MVT

Rolle’s theorem can be generalised in a straight-forward way; given a differentiable function \(f(x)\) we can still say something about \(\diff{f}{x}\text{,}\) even if \(f(a) \neq f(b)\text{.}\) Consider the following sketch:
Figure 2.13.4.
All we have done is tilt the picture so that \(f(a) \lt f (b)\text{.}\) Now we can no longer guarantee that there will be a point on the graph where the tangent line is horizontal, but there will be a point where the tangent line is parallel to the secant joining \((a, f(a))\) to \((b, f(b))\text{.}\)
To state this in terms of our first scenario back at the beginning of this section, suppose that you are driving along the \(x\)–axis. At time \(t=a\) you are at \(x=f(a)\) and at time \(t=b\) you are at \(x=f(b)\text{.}\) For simplicity, let’s suppose that \(b \gt a\) and \(f(b)\ge f(a)\text{,}\) just like in the above sketch. Then during the time interval in question you travelled a net distance of \(f(b)-f(a)\text{.}\) It took you \(b-a\) units of time to travel that distance, so your average velocity was \(\frac{f(b)-f(a)}{b-a}\text{.}\) You may very well have been going faster than \(\frac{f(b)-f(a)}{b-a}\) part of the time and slower than \(\frac{f(b)-f(a)}{b-a}\) part of the time. But it is reasonable to guess that at some time between \(t=a\) and \(t=b\) your instantaneous velocity was exactly \(\frac{f(b)-f(a)}{b-a}\text{.}\) The mean value theorem says that, under reasonable assumptions about \(f\text{,}\) this is indeed the case.
Let us start to explore the mean value theorem — which is very frequently known as the MVT. A simple example to start:

Example 2.13.6. Apply MVT to a polynomial.

Consider the polynomial \(f(x)=3x^2-4x+2\) on \([-1,1]\text{.}\)
  • Since \(f\) is a polynomial it is continuous on the interval and also differentiable on the interval. Hence we can apply the MVT.
  • The MVT tells us that there is a point \(c \in (-1,1)\) so that
    \begin{align*} f'(c) &= \frac{f(1)-f(-1)}{1-(-1)} = \frac{1-9}{2} =-4 \end{align*}
This example is sufficiently simple that we can find the point \(c\) and the corresponding tangent line:
  • The derivative is
    \begin{align*} f'(x) &= 6x-4 \end{align*}
  • So we need to solve \(f'(c)=-4\text{:}\)
    \begin{align*} 6c-4 &= -4 \end{align*}
    which tells us that \(c=0\text{.}\)
  • The tangent line has slope \(-4\) and passes through \((0,f(0))=(0,2)\text{,}\) and so is given by
    \begin{align*} y &= -4x+2 \end{align*}
  • The secant line joining \((-1,f(-1))=(-1,9)\) to \((1,f(1))=(1,1)\) is just
    \begin{align*} y &= 5-4x \end{align*}
  • Here is a sketch of the curve and the two lines:

Example 2.13.7. MVT, speed and distance.

We can return to our initial car-motivated examples. Say you are driving along a straight road in a car that can go at most \(80km/h\text{.}\) How far can you go in 2 hours? — the answer is easy, but we can also solve this using MVT.
  • Let \(s(t)\) be the position of the car in \(km\) at time \(t\) measured in hours.
  • Then \(s(0)=0\) and \(s(2)=q\text{,}\) where \(q\) is the quantity that we need to bound.
  • We are told that \(| s'(t) | \leq 80\text{,}\) or equivalently
    \begin{gather*} -80 \leq s'(t) \leq 80 \end{gather*}
  • By the MVT there is some \(c\) between 0 and 2 so that
    \begin{align*} s'(c) &= \frac{q-0}{2} = \frac{q}{2} \end{align*}
  • Now since \(-80 \leq s'(c) \leq 80\) we must have \(-80 \leq q/2 \leq 80\) and hence \(-160 \leq q=s(2) \leq 160\text{.}\)
More generally if we have some information about the derivative, then we can use the MVT to leverage this information to tell us something about the function.

Example 2.13.8. Using MVT to bound a function.

Let \(f(x)\) be a differentiable function so that
\begin{align*} f(1)&=10 &\text{ and }&& -1 \leq f'(x) \leq 2 \text{ everywhere} \end{align*}
Obtain upper and lower bounds on \(f(5)\text{.}\)
Okay — what do we do?
  • Since \(f(x)\) is differentiable we can use the MVT.
  • Say \(f(5)=q\text{,}\) then the MVT tells us that there is some \(c\) between \(1\) and \(5\) such that
    \begin{align*} f'(c) &=\frac{q-10}{5-1} = \frac{q-10}{4} \end{align*}
  • But we know that \(-1 \leq f'(c) \leq 2\text{,}\) so
    \begin{align*} -1 &\leq f'(c) \leq 2\\ -1 & \leq \frac{q-10}{4} \leq 2\\ -4 & \leq q-10 \leq 8\\ 6 \leq q \leq 18 \end{align*}
  • Thus we must have \(6 \leq f(5) \leq 18\text{.}\)

Subsection 2.13.3 (Optional) — Why is the MVT True

We won’t give a real proof for this theorem, but we’ll look at a picture which shows why it is true. Here is the picture. It contains a sketch of the graph of \(f(x)\text{,}\) with \(x\) running from \(a\) to \(b\text{,}\) as well as a line segment which is the secant of the graph from the point \(\big(a\,,f(a)\big)\) to the point \(\big(b\,,f(b)\big)\text{.}\) The slope of the secant is exactly \(\frac{f(b)-f(a)}{b-a}\text{.}\)
Remember that we are looking for a point, \(\big(c\,,f(c)\big)\text{,}\) on the graph of \(f(x)\) with the property that \(f'(c)=\frac{f(b)-f(a)}{b-a}\text{,}\) i.e. with the property that the slope of the tangent line at \(\big(c\,,f(c)\big)\) is the same as the slope of the secant. So imagine that you start moving the secant upward, carefully keeping the moved line segment parallel to the secant. So the slope of the moved line segment is always exactly \(\frac{f(b)-f(a)}{b-a}\text{.}\) When we first start moving the line segment it is not tangent to the curve — it crosses the curve. This is illustrated in the figure by the second line segment from the bottom. If we move the line segment too far it does not touch the curve at all. This is illustrated in the figure by the top segment. But if we stop moving the line segment just before it stops intersecting the curve at all, we get exactly the tangent line to the curve at the point on the curve that is farthest from the secant. This tangent line has exactly the desired slope. This is illustrated in the figure by the third line segment from the bottom.

Subsection 2.13.4 Be Careful with Hypotheses

The mean value theorem has hypotheses — \(f(x)\) has to be continuous for \(a\le x\le b\) and has to be differentiable for \(a \lt x \lt b\text{.}\) If either hypothesis is violated, the conclusion of the mean value theorem can fail. That is, the curve \(y=f(x)\) need not have a tangent line at some \(x=c\) between \(a\) and \(b\) whose slope, \(f'(c)\text{,}\) is the same as the slope, \(\frac{f(b)-f(a)}{b-a}\text{,}\) of the secant joining the points \(\big(a\,,f(a)\big)\) and \(\big(b\,,f(b)\big)\) on the curve. If \(f'(x)\) fails to exist for even a single value of \(x\) between \(a\) and \(b\text{,}\) all bets are off. The following two examples illustrate this.

Example 2.13.9. MVT doesn’t work here.

For the first “bad” example, \(a=0\text{,}\) \(b=2\) and
\(f(x) = \begin{cases} 0 & \text{if }x \le 1 \\ 1 & \text{if }x \gt 1 \end{cases}\)
For this example, \(f'(x)=0\) at every \(x\) where it is defined. That is, at every \(x\ne 1\text{.}\) But the slope of the secant joining \(\big(a\,,f(a)\big)=(0,0)\) and \(\big(b\,,f(b)\big)=(2,1)\) is \(\frac{1}{2}\text{.}\)

Example 2.13.10. MVT doesn’t work here either.

For the second “bad” example, \(a=-1\text{,}\) \(b=1\) and \(f(x)=|x|\text{.}\) For this function
\(f'(x) = \begin{cases} -1 & \text{if }x \lt 0 \\ \text{undefined} & \text{if }x=0 \\ 1 & \text{if }x \gt 0 \end{cases}\)
For this example, \(f'(x)=\pm 1\) at every \(x\) where it is defined. That is, at every \(x\ne 0\text{.}\) But the slope of the secant joining \(\big(a\,,f(a)\big)=(-1,1)\) and \(\big(b\,,f(b)\big)=(1,1)\) is \(0\text{.}\)

Example 2.13.11. MVT does work on this one.

Here is one “good” example, where the hypotheses of the mean value theorem are satisfied. Let \(f(x)=x^2\text{.}\) Then \(f'(x)=2x\text{.}\) For any \(a \lt b\text{,}\)
\begin{gather*} \frac{f(b)-f(a)}{b-a}=\frac{b^2-a^2}{b-a}=b+a \end{gather*}
So \(f'(c)=2c\) is exactly \(\frac{f(b)-f(a)}{b-a}\) when \(c=\frac{a+b}{2}\text{,}\) which, in this example, happens to be exactly half way between \(x=a\) and \(x=b\text{.}\)
Recall from Section 2.3 that if \(f'(c)>0\text{,}\) then \(f(x)\) is increasing at \(x=c\text{.}\) A simple consequence of the mean value theorem is that if you know the sign of \(f'(c)\) for all \(c\)’s between \(a\) and \(b\text{,}\) with \(b \gt a\text{,}\) then \(f(b)-f(a) = f'(c) (b-a)\) must have the same sign.
It is not hard to see why the above is true:
  • Say \(f'(x)=0\) at every point in the interval \([A,B]\text{.}\) Now pick any \(a,b \in [A,B]\) with \(a \lt b\text{.}\) Then the MVT tells us that there is \(c \in (a,b)\) so that
    \begin{align*} f'(c) &= \frac{f(b)-f(a)}{b-a} \end{align*}
    If \(f(b) \neq f(a)\) then we must have that \(f'(c) \neq 0\) — contradicting what we are told about \(f'(x)\text{.}\) Thus we must have that \(f(b)=f(a)\text{.}\)
  • Similarly, say \(f'(x) \geq 0\) at every point in the interval \([A,B]\text{.}\) Now pick any \(a,b \in [A,B]\) with \(a \lt b\text{.}\) Then the MVT tells us that there is \(c \in (a,b)\) so that
    \begin{align*} f'(c) &= \frac{f(b)-f(a)}{b-a} \end{align*}
    Since \(b \gt a\text{,}\) the denominator is positive. Now if \(f(b) \lt f(a)\) the numerator would be negative, making the right-hand side negative, and contradicting what we are told about \(f'(x)\text{.}\) Hence we must have \(f(b) \ge f(a)\text{.}\)
  • The other parts are similar.
A nice corollary of the above corollary is the following:
We can prove this by setting \(h(x)=f(x)-g(x)\text{.}\) Then \(h'(x)=0\) and so the previous corollary tells us that \(h(x)\) is constant.

Example 2.13.14. Summing \(\arcsin\) and \(\arccos\).

Using this corollary we can prove results like the following:
\begin{align*} \arcsin x + \arccos x &= \frac{\pi}{2} & \mbox{for all } -1 \lt x \lt 1 \end{align*}
How does this work? Let \(f(x) = \arcsin x + \arccos x\text{.}\) Then
\begin{align*} f'(x) &= \frac{1}{\sqrt{1-x^2}} + \frac{-1}{\sqrt{1-x^2}} = 0 \end{align*}
Thus \(f\) must be a constant. To find out which constant, we can just check its value at a convenient point, like \(x=0\text{.}\)
\begin{align*} \arcsin(0) + \arccos(0) &= \pi/2 + 0 = \pi/2 \end{align*}
Since the function is constant, this must be the value.

Exercises 2.13.5 Exercises

Exercises — Stage 1 .

1.
Suppose a particular caribou has a top speed of 70 kph, and in one year it migrates 5000 km. What do you know about the amount of time the caribou spent travelling during its migration?
2.
Suppose a migrating sandhill crane flew 240 kilometres in one day. What does the mean value theorem tell you about its speed during that day?
3.
Below is the graph of \(y=f(x)\text{,}\) where \(x\) is continuous on \([a,b]\) and differentiable on \((a,b)\text{.}\) Mark on the graph the approximate location of a value \(c\) guaranteed by the mean value theorem.
4.
Give a function \(f(x)\) with the properties that:
  • \(f(x)\) is differentiable on the open interval \(0 \lt x \lt 10\)
  • \(f(0)=0\text{,}\) \(f(10)=10\)
but for all \(c \in (0,10)\text{,}\) \(f'(c)=0\text{.}\)
5.
For each of the parts below, sketch a function \(f(x)\) (different in each part) that is continuous and differentiable over all real numbers, with \(f(1)=f(2)=0\text{,}\) and with the listed property, or explain why no such function exists.
  1. \(f'(c)=0\) for no point \(c \in (1,2)\)
  2. \(f'(c)=0\) for exactly one point \(c \in (1,2)\)
  3. \(f'(c)=0\) for exactly five points \(c \in (1,2)\)
  4. \(f'(c)=0\) for infinitely many points \(c \in (1,2)\)
6.
Suppose you want to show that a point exists where the function \(f(x)=\sqrt{|x|}\) has a tangent line with slope \(\frac{1}{13}\text{.}\) Find the mistake(s) in the following work, and give a correct proof.
The function \(f(x)\) is continuous and differentiable over all real numbers, so the mean value theorem applies. \(f(-4)=2\) and \(f(9)=3\text{,}\) so by the mean value theorem, there exists some \(c \in (-4,9)\) such that \(f'(x) = \dfrac{3-2}{9-(-4)}=\dfrac{1}{13}\text{.}\)

Exercises — Stage 2 .

7. (✳).
Let \(f(x)=x^2-2\pi x+ \cos(x)-1\text{.}\) Show that there exists a real number \(c\) such that \(f'(c)=0\text{.}\)
8. (✳).
Let \(f(x)=e^x + (1-e)x^2 - 1\text{.}\) Show that there exists a real number \(c\) such that \(f'(c)=0\text{.}\)
9. (✳).
Let \(f(x)=\sqrt{3 + \sin(x)} + (x - \pi)^2\text{.}\) Show that there exists a real number \(c\) such that \(f'(c)=0\text{.}\)
10. (✳).
Let \(f(x)=x\cos(x) - x\sin(x)\text{.}\) Show that there exists a real number \(c\) such that \(f'(c)=0\text{.}\)
11.
How many roots does the function \(f(x)=3x-\sin x\) have?
12.
How many roots does the function \(f(x)=\dfrac{(4x+1)^4}{16}+x\) have?
13.
How many roots does the function \(f(x)=x^3+\sin\left(x^5\right)\) have?
14.
How many positive-valued solutions does the equation \(e^x=4\cos(2x)\) have?
15. (✳).
Let \(f(x)=3x^5-10x^3+15x+a\text{,}\) where \(a\) is some constant.
  1. Prove that, regardless of the value \(a\text{,}\) \(f'(x) \gt 0\) for all \(x\) in \((-1,1)\text{.}\)
  2. Prove that, regardless of the value \(a\text{,}\) \(f(x)=3x^5-10x^3+15x+a\) has at most one root in \([-1,1]\text{.}\)
16. (✳).
Find the point promised by the Mean Value Theorem for the function \(e^x\) on the interval \([0, T]\text{.}\)
17.
Use Corollary 2.13.12 and Theorem 2.12.8 to show that \(\arcsec x=C-\arccsc x\) for some constant \(C\text{;}\) then find \(C\text{.}\)

Exercises — Stage 3 .

18. (✳).
Suppose \(f(0) = 0\) and \(f'(x) = \dfrac{1}{1 + e^{-f(x)}}\) . Prove that \(f(100) \lt 100\text{.}\)
Remark: an equation relating a function to its own derivative is called a differential equation. We’ll see some very basic differential equations in Section 3.3.
19.
Let \(f(x)=2x+\sin x\text{.}\) What is the largest interval containing \(x=0\) over which \(f(x)\) is one--to--one? What are the domain and range of \(f^{-1}(x)\text{?}\)
20.
Let \(f(x)=\dfrac{x}{2}+\sin x\text{.}\) What is the largest interval containing \(x=0\) over which \(f(x)\) is one--to--one? What are the domain and range of \(f^{-1}(x)\text{,}\) if we restrict \(f\) to this interval?
21.
Suppose \(f(x)\) and \(g(x)\) are functions that are continuous over the interval \([a,b]\) and differentiable over the interval \((a,b)\text{.}\) Suppose further that \(f(a) \lt g(a)\) and \(g(b) \lt f(b)\text{.}\) Show that there exists some \(c \in [a,b]\) with \(f'(c) \gt g'(c)\text{.}\)
22.
Suppose \(f(x)\) is a function that is differentiable over all real numbers, and \(f'(x)\) has precisely two roots. What is the maximum number of distinct roots that \(f(x)\) may have?
23.
How many roots does \(f(x)=\sin x + x^2 + 5x +1\) have?