# Math for Non-Geeks/ Mean value theorem

The mean value theorem is one of the central theorems of differential calculus. It states (roughly speaking) that the slope of the secant between two different points of a differentiable function somewhere between these two points is assumed to be a derivative. Thus, the mean value theorem links the secant slope with the derivative of a function. Global properties, which can be expressed using the secant slope, can thus be traced back to properties of the derivative using the mean value theorem. In the section „Schrankensatz“ we will examine a useful application. Others then follow in the chapters constant functions, derivative and local extrema and L'Hospital's rule. The main theorem of differential and integral calculus is also based on the mean value theorem.

## Motivation

We've already viewed at Rolle's theorem. To repeat: Rolle's theorem states that for each continuous function $f:a,b]\to \mathbb {R}$, which is differentiable in $(a,b)$ and for which $f(a)=f(b)$ must give an argument $\xi \in (a,b)$, which satisfies $f'(\xi )=0$:
How can we generalize this theorem for the case $f(a)\neq f(b)$? Does the derivative $f'(\xi )$ for a $\xi \in (a,b)$ also have to have a certain value? First of all, it is noticeable that $f'(\xi )$ does not necessarily have to be $0$:
Let's reconsider what the situation was with the situation with Rolle's theorem. On the one hand, the slope of the tangent at the graph is $f$ in $(\xi ,f(\xi ))$ equal to $f'(\xi )=0$. On the other hand, the slope of the secant through the two boundary points $(a,f(a))$ and $(b,f(b))$ from $f$ equal to ${\tfrac {f(b)-f(a)}{b-a}}=0$, since $f(a)=f(b)$ and thus $f(b)-f(a)=0$. The secant between the points $(a,f(a))$ and $(b,f(b))$ and the tangent in the point $(\xi ,f(\xi ))$ are thus parallel:
Be more general $f(a)\neq f(b)$. Consider the secant slope ${\tfrac {f(b)-f(a)}{b-a}}$ between the points $(a,f(a))$ and $(b,f(b))$. This is unequal to zero and corresponds to the mean slope of $f$ in the interval $[a,b]$. For example, if we consider the function as a position function of a car as a function of time, the average slope corresponds to the average speed ${\overline {v}}$ of the car in the time from $a$ to $b$.
If the car at the moment $a$ drives faster than ${\overline {v}}$ (meaning: The derivation $f'(a)$ is greater than the secant slope ${\tfrac {f(b)-f(a)}{b-a}}$) so it is has to exist a moment $b$ at which it has driven more slowly than ${\overline {v}}$, otherwise it cannot reach the average speed ${\overline {v}}$. During an acceleration or braking process, the car takes on all speeds between the starting and final speeds and does not simply jump from the starting to the final speed (here we assume that the speed function is continuous). As the car was sometimes faster and sometimes slower than ${\overline {v}}$, there must exists a moment at which it has exactly the speed ${\overline {v}}$. Analogously we can argue, if the car at the moment $a$ drives more slowly than ${\overline {v}}$. For our $f$ function this means that there must actually be a $\xi \in (a,b)$ with ${\overline {v}}=f'(\xi )={\tfrac {f(b)-f(a)}{b-a}}$. This is the message of the mean value theorem.
So there seems to be a $\xi \in (a,b)$ with $f'(\xi )={\tfrac {f(b)-f(a)}{b-a}}$. In the following we want to form this intuition into a theorem and prove it formally correctly. In our argumentation we have used, for example, that the derivation is continuous. Now the studied function does not have to be constantly differentiable. However, we will show in the proof that the mean value theorem is also fulfilled in this case.

## Mean value theorem

The mean value theorem of differential calculus is a generalization of Rolle's theorem and reads as follows:
Theorem (Mittelwertsatz)
Be $f:a,b]\to \mathbb {R}$ a continuous function with $a<b$ and differentiable on the open interval $(a,b)$. Then there is a $\xi \in (a,b)$ with $f'(\xi )={\frac {f(b)-f(a)}{b-a}}$.
Hint
The prerequisites for applying the mean value theorem correspond to those of the Rolle's theorem, only that $f(a)=f(b)$ need not apply. The prerequisites required must apply for the same reasons as for the set of roles. Similarly, the mean value theorem only provides a statement of existence. The $\xi$ with this property exists, but often cannot be determined explicitly in practice. Also, the $\xi \in (a,b)$ has not to be unique. The following graphics show a function which assumes the secant slope at two points $\xi _{1}$ and $\xi _{2}$:
A special case are linear functions $f(x)=mx+n$ for $x\in [a,b]$ with $m,n\in \mathbb {R}$. In this case $f'(x)=m={\tfrac {f(b)-f(a)}{b-a}}$ for all $x\in (a,b)$. In other words: the secant slope is assumed to be the tangent slope everywhere:

## Proof

How to get to the proof? (Mean value theorem)
As already mentioned above, we want to prove the mean value theorem with the help of Rolle's theorem. To do this, we have to take the given function $f:a,b]\to \mathbb {R}$ an auxiliary function $H:[a,b]\to \mathbb {R}$ so that we can apply Rolle's theorem to it. For this we need a function that is continuous at $[a,b]$ and differentiable at $(a,b)$ $H$. In addition, it should apply that $H(a)=H(b)$. Then $H'(\xi )=0$ for $\xi \in (a,b)$. If we can also choose the auxiliary function so that $H'(x)=f'(x)-{\tfrac {f(b)-f(a)}{b-a}}$, the equation $H'(\xi )=0$ results from $f'(\xi )-{\tfrac {f(b)-f(a)}{b-a}}=0$. This is equivalent to $f'(\xi )={\tfrac {f(b)-f(a)}{b-a}}$, the formula of the mean value theorem. The function
$H:[a,b]\to \mathbb {R} ,\ H(x)=f(x)-{\tfrac {f(b)-f(a)}{b-a}}(x-a)$
has the desired properties. In particular
${\begin{aligned}H(a)&=f(a)-{\frac {f(b)-f(a)}{b-a}}(a-a)\\[0.5em]&=f(a)\\[0.5em]&=f(b)-(f(b)-f(a))\\[0.5em]&=f(b)-{\frac {f(b)-f(a)}{b-a}}(b-a)=H(b)\end{aligned}}$
The following graphics illustrate the relationship between the function $f$ and the auxiliary function $H$:
* The function $f$ from mean value theorem.
* The auxiliary function $H$ for Rolle's theorem.
Proof (Mean value theorem)
Be $f:a,b]\to \mathbb {R}$ a continuous function with $a<b$ and $(a,b)$ can be differentiated. A suitable auxiliary function $H:[a,b]\to \mathbb {R}$ is given by
$H(x)=f(x)-{\frac {f(b)-f(a)}{b-a}}(x-a)$
$H$ is differentiable at $[a,b]$ and is continuous at $(a,b)$, as firstly $f$ fulfils these conditions by our assumption at the beginning and secondly $H$ is a composition of $f$ and the first degree polynomial ${\tfrac {f(b)-f(a)}{b-a}}(x-a)$. Furthermore
${\begin{aligned}H(a)&=f(a)-{\frac {f(b)-f(a)}{b-a}}(a-a)\\[0.5em]&=f(a)\\[0.5em]&=f(b)-(f(b)-f(a))\\[0.5em]&=f(b)-{\frac {f(b)-f(a)}{b-a}}(b-a)=H(b)\end{aligned}}$
According to Rolle's theorem there is a $\xi \in (a,b)$ with $0=H'(\xi )=f'(\xi )-{\tfrac {f(b)-f(a)}{b-a}}$. A $\xi \in (a,b)$ was found, which fulfils $f'(\xi )={\tfrac {f(b)-f(a)}{b-a}}$. Thus follows the claim of the mean value theorem.

## Equivalence of mean value theorem and Rolle's theorem

The mean value theorem and Rolle's theorem are actually equivalent. To show this, we have to deduce Rolle's theorem from the mean value theorem and prove the mean value theorem from Rolle's theorem. But we have already done the latter in the proof of this chapter, so that we only have to deduce Rolle's theorem from the mean value theorem.
Be $f:a,b]\to \mathbb {R}$ a continuous function with $a<b$ and $(a,b)$ is differentiable. $f$ is therefore a function to which the mean value theorem can be applied. Furthermore, $f(a)=f(b)$ applies, so that all prerequisites of the set of role are given. According to the mean value theorem there is now a $\xi \in (a,b)$ with $f'(\xi )={\tfrac {f(b)-f(a)}{b-a}}=0$, because with $f(a)=f(b)$ is $f(a)-f(b)=0$. So there is actually a $\xi \in (a,b)$ with $f'(\xi )=0$, which is exactly the statement of Rolle's theorem. Thus, the mean value theorem and Rolle's theorem are equivalent.

## Exercise

Math for Non-Geeks: Template:Aufgabe

## Application: Proof of inequalities

The mean value theorem can often be used to prove useful inequalities. The trick is to first apply the mean value theorem to an auxiliary function (often on one side of the inequation). Then we estimate the bounds to the expression $f'(\xi )$ appropriately.

### Exercise: Proof of an inequality

Math for Non-Geeks: Template:Aufgabe

### Logarithm inequalities

Math for Non-Geeks: Template:Aufgabe
Hint
The inequiality can be extended to all $x>0$ . For $x=1$ there is
$1-{\frac {1}{1}}=0=\ln(1)=1-1$
If now $0<y<1$, there is a $x>1$ with $y={\tfrac {1}{x}}$. So we have
$\ln(y)=\ln \left({\frac {1}{x}}\right)=-\ln(x)>-\left(1-{\frac {1}{x}}\right)={\frac {1}{x}}-1=y-1$
as well as
$\ln(y)=\ln \left({\frac {1}{x}}\right)=-\ln(x)<-\left(x-1\right)=1-x=1-{\frac {1}{y}}$
We have used the two inequalities above to make our estimates. So for all $x>0$:
$1-{\frac {1}{x}}\leq \ln(x)\leq x-1$

## Application: Lipschitz continuity of differentiable functions

Theorem (Lipschitz continuity of differentiable functions)
Let $f:[a,b]\to \mathbb {R}$ be continuous and differentiable on $(a,b)$. Further the derivative function $f':(a,b)\to \mathbb {R}$ is assumed to be bounded. Then with $L=\sup _{x\in (a,b)}|f'(x)|$ we have a Lipschitz constant $L\in \mathbb {R} _{0}^{+}$ so that $|f(x)-f(y)|\leq L|x-y|$ holds for all $x,y\in [a,b]$. That means, $f$ is Lipschitz continuous. In particular, the statement holds if $f$ can is continuously differentiable on $[a,b]$.
Proof (Lipschitz continuity of differentiable functions)
Let $x,y\in [a,b]$ be arbitrary with $x<y$. If we now restrict the domain of definition from $f$ to $[x,y]$, continuity and differentiability are preserved. The mean value theorem is applicable. So there is a $\xi \in (x,y)$ with $f'(\xi )={\tfrac {f(x)-f(y)}{x-y}}$.
Since $f'$ is bounded, we have an $L=\sup _{x\in (a,b)}|f'(x)|$. For this $L\in \mathbb {R} _{0}^{+}$, $|f'(\xi )|\leq L$ applies to all $\xi \in (x,y)$. Thus ${\tfrac {|f(x)-f(y)|}{|x-y|}}=|f'(\xi )|\leq L$. This is equivalent to the assertion.
If $f$ is continuously differentiable on $[a,b]$, the continuous derivative function has a maximum and a minimum. It is thus bounded and the theorem can then also be applied to this function.
Example (Lipschitz continuity of sine and cosine)
$\sin :\mathbb {R} \to \mathbb {R}$ and $\cos :\mathbb {R} \to \mathbb {R}$ are continuous and differentiable on $\mathbb {R}$. Furthermore, their derivatives are bounded, since for all $x\in \mathbb {R}$:
${\begin{aligned}|(\sin )'(x)|&=|\cos(x)|\leq 1\\[0.3em]|(\cos )'(x)|&=|\sin(x)|\leq 1\end{aligned}}$
Thus, the two functions are Lipschitz continuous with Lipschitz constant $L=1$. In particular, for all $x,y\in \mathbb {R}$ we have the estimates
$|\sin(x)-\sin(y)|\leq |x-y|$
and
$|\cos(x)-\cos(y)|\leq |x-y|$
Question: The inversion of the above theorem is: "Let $f:[a,b]\to \mathbb {R}$ be continuous and differentiable on $(a,b)$. Further, let $f$ be Lipschitz continuous. Then the derivative function $f':(a,b)\to \mathbb {R}$ is bounded".
Is this statement correct?
Yes, this statement is also true. Since $f$ can be differentiated, the following limit value exists for each ${\tilde {x}}\in (a,b)$:
$f'({\tilde {x}})=\lim _{x\to {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}$
Since $f$ Lipschitz is continuous, there is an $L>0$ for all $x,{\tilde {x}}\in [a,b]$ with
$|f(x)-f({\tilde {x}})|\leq L|x-{\tilde {x}}|\iff \left|{\tfrac {f({\tilde {x}})-f(x)}{{\tilde {x}}-x}}\right|\leq L$
With the continuity of the absolute function and the limit value theorems, we have
$|f'({\tilde {x}})|=\left|\lim _{x\to {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}\right|=\lim _{x\to {\tilde {x}}}\left|{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}\right|\leq L$
So $f'$ is bounded.

## Practical example: Speed control with light

Some people who got caught speeding have come into contact with the mean value theorem. At least if it was by a Photoelectric sensor. Imagine driving a car on a country road. The maximum permitted speed is $v_{\max }=100\,{\tfrac {\mathrm {km} }{\mathrm {h} }}$ or 60 mph. The distance covered by your car is given by the differentiable position function $s$, which depends on the time $t$. The derivative of the position function at the time $t$ corresponds to the current speed, i.e. $s'(t)=v(t)$. When measuring speed with light barriers, one passes through two light barriers which are placed at two fixed points $s_{0}$ and $s_{1}$. If you pass the two light barriers at the times $t_{0}$ and $t_{1}$, the average speed between these two measuring points is
${\overline {v}}={\frac {s_{1}-s_{0}}{t_{1}-t_{0}}}={\frac {s(t_{1})-s(t_{0})}{t_{1}-t_{0}}}$
Since the position function $s:[t_{0},t_{1}]\to \mathbb {R}$ fulfils the conditions of the mean value theorem, there is a time ${\tilde {t}}\in (t_{0},t_{1})$ with
$s'({\tilde {t}})=v({\tilde {t}})={\frac {s(t_{1})-s(t_{0})}{t_{1}-t_{0}}}={\overline {v}}$
The average speed measured between the two barriers must therefore have been reached at least at one point of time. If now ${\overline {v}}>100+{\text{tol}}$, where ${\text{tol}}$ is a certain tolerance limit (usually 3%), you will get a speeding ticket! To avoid wrong measurements, in practice more than two light barriers are used and more than one measurement is carried out. But the principle remains the same. Another more recent technique for measuring speed is based on the Doppler effect and uses a Radar to determine speed.

## Second mean value theorem

There is another version of the mean value theorem, which is called the second or also generalized mean value theorem. Therefore the "usual" mean value theorem is also called the "first mean value theorem". We will see that also the second mean value theorem follows from the Rolle's theorem. For the second version we need, besides our function $f$, another function $g$, which also fulfils the requirements of the mean value theorem. The second mean value theorem will be useful for deriving L'Hospital's rule.

### Theorem and proof

Theorem (Second mean value theorem)
Let $f,g:[a,b]\to \mathbb {R}$ be two continuous functions which can be differentiated on $(a,b)$. Further let $g'(x)\neq 0$ for all $x\in (a,b)$. Then $g(b)\neq g(a)$ and there exists a $\xi \in (a,b)$ with
${\frac {f(b)-f(a)}{g(b)-g(a)}}={\frac {f'(\xi )}{g'(\xi )}}$
Proof (Second mean value theorem)
If we have $g(b)=g(a)$, then there is a $\xi \in (a,b)$ with $g'(\xi )=0$ by Rolle's theorem. This contradicts the condition of the theorem that for all $x\in (a,b)$ the inequality $g'(x)\neq 0$ applies and consequently $g(b)\neq g(a)$ must hold. In analogy to the auxiliary function from the proof of the mean value theorem, we choose here the auxiliary function
$F:[a,b]\to \mathbb {R} ,\ F(x)=f(x)-{\tfrac {f(b)-f(a)}{g(b)-g(a)}}(g(x)-g(a))$
This function is continuous on $[a,b]$ and differentiable on $(a,b)$ as a composition of continuous or differentiable functions. Furthermore, $F(a)=f(a)=F(b)$ applies. Thus, Rolle's theorem is applicable, and there is a $\xi \in (a,b)$ with
$F'(\xi )=f'(\xi )-{\tfrac {f(b)-f(a)}{g(b)-g(a)}}g'(\xi )=0$
This is equivalent to ${\tfrac {f(b)-f(a)}{g(b)-g(a)}}={\tfrac {f'(\xi )}{g'(\xi )}}$.

### Counter-example: Second mean value theorem

Math for Non-Geeks: Template:Aufgabe

### Remarks

Remark 1: Obviously we get for $g(x)=x$ the first mean value theorem from the second. But we have concluded the second one from Rolle's theorem. Since the first mean value theorem and Rolle's theorem are equivalent, the second mean value theorem also follows from the first. The two mean value theorems are therefore equivalent.
Remark 2: If we omit the precondition $g'(x)\neq 0$ for all $x\in (a,b)$, the second mean value theorem still applies in the form
$(f(b)-f(a))g'(\xi )=(g(b)-g(a))f'(\xi )$
Question: Why does the second mean value theorem also apply in this more general form?
Assuming there is (at least) one $x_{0}\in (a,b)$ with $g'(x_{0})=0$. If, in addition, $g(a)=g(b)$ applies, there is a $\xi =x_{0}\in (a,b)$ with $g'(\xi )=0$ by Rolle's theorem, and we get zero on both sides of the equation. If $g(a)\neq g(b)$ holds, the proof works in the same way as the one above with the auxiliary function $f$.

## Overview. Implications of mean value theorems

In the introduction, we already mentioned that several important results can be deduced from the mean value theorem.
* We have proved Lipschitz continuity of differentiable functions with limited derivation. This allows to show Lipschitz continuity of numerous functions.
* Another practical conclusion is the constant function theorem. This states that a function is constant if $f'\equiv 0$ (the derivative is constantly zero). Thus we can derive the identity theorem of differential calculus. It says that two functions with identical derivative differ only by one constant. It is an essential part of the fundamental theorem of calculus . A further consequence of the criterion for constance is the characterisation of the exponential function via the differential equation $f'=f$.
* Likewise, the mean value theorem serves for proving the monotonicity criterion for differentiable functions. This establishes a connection between the monotonicity of the function and the sign of the derivative function. More precisely, $f$ is monotonically increasing (or decreasing) exactly when $f'\geq 0$ (or $f'\leq 0$). From this, one can derive a sufficient criterion for the existence of an extremum of a function at a point.
* From the second mean value theorem, L'Hospital's rule can be concluded. With their help, numerous limit values of quotients of two functions can be calculated, computing certain derivatives.
The points listed are summarised in the following overview diagram: