# Differentiable functions/Mean value theorem/Section
## Theorem

Let $a<b$, and let
    $f\colon [a,b]\longrightarrow \mathbb {R}$
be a continuous function, which is differentiable on $]a,b[$, and such that $f(a)=f(b)$. Then there exists some $c\ina,b$, such that
    $f'(c)=0\,.$

### Proof

The statement is true if $f$ is constant. So suppose that $f$ is not constant. Then there exists some $x\ina,b$, such that $f(x)\neq f(a)=f(b)$. Let's say that $f(x)$ has a larger value. Due to fact, there exists some $c\in [a,b]$, where the function attains its maximum. This point is not on the border. For this $c$, we have $f'(c)=0$, due to fact.
$\Box$
This theorem is called Theorem of Rolle.
The following theorem is called Mean value theorem. It says that if a function describes a differentiable one-dimensional movement, then the average velocity is obtained at least once as the instantaneous velocity.

## Theorem

Let $a<b$, and let
    $f\colon [a,b]\longrightarrow \mathbb {R}$
be a continuous function which is differentiable on $]a,b[$. Then there exists some $c\ina,b$, such that
    $f'(c)={\frac {f(b)-f(a)}{b-a}}\,.$

### Proof

We consider the auxiliary function
    $g\colon [a,b]\longrightarrow \mathbb {R} ,x\longmapsto g(x):=f(x)-{\frac {f(b)-f(a)}{b-a}}(x-a).$
This function is also continuous and differentiable in $]a,b[$. Moreover, we have $g(a)=f(a)$ and
    $g(b)=f(b)-(f(b)-f(a))=f(a)\,.$
Hence, $g$ fulfills the conditions of fact, and therefore there exists some $c\ina,b$, such that $g'(c)=0$. Because of the rules for derivatives, we obtain
    $f'(c)={\frac {f(b)-f(a)}{b-a}}\,.$
$\Box$

## Corollary

Let
    $f\colona,b\longrightarrow \mathbb {R}$
be a differentiable function such that $f'(x)=0$ for all
$x\ina,b$
$f$

### Proof

If $f$ is not constant, then there exists some $x<x'$ such that $f(x)\neq f(x')$. Then there exists, due to the mean value theorem, some $c$, $x<c<x'$, such that $f'(c)={\frac {f(x')-f(x)}{x'-x}}\neq 0$, which contradicts the assumption.
$\Box$

## Theorem

Let $I\subseteq \mathbb {R}$ be an open interval, and let
    $f\colon I\longrightarrow \mathbb {R}$
be a
* The function $f$ is increasing (decreasing) on $I$, if and only if $f'(x)\geq 0$ ($f'(x)\leq 0$) holds for all $x\in I$.
* If $f'(x)\geq 0$ holds for all $x\in I$, and $f'$ has only finitely many zeroes, then $f$ is strictly increasing.
* If $f'(x)\leq 0$ holds for all $x\in I$, and $f'$ has only finitely many zeroes, then $f$ is strictly decreasing.

### Proof

(1). It is enough to prove the statements for increasing functions. If $f$ is increasing and $x\in I$, then the difference quotient fulfills
    ${\frac {f(x+h)-f(x)}{h}}\geq 0\,$
for every $h$ with $x+h\in I$. This estimate carries over to the limit as $h\rightarrow 0$, and this limit is $f'(x)$. Suppose now that the derivative is $\geq 0$. We assume, in order to obtain a contradiction, that there exist two points $x<x'$ in $I$ with $f(x)>f(x')$. Due to the mean value theorem, there exists some $c$ with $x<c<x'$ and
    $f'(c)={\frac {f(x')-f(x)}{x'-x}}<0\,,$
which contradicts the condition. (2). Suppose now that $f'(x)>0$ holds with finitely many exceptions. We assume that $f(x)=f(x')$ holds for two points $x<x'$. Since $f$ is increasing, due to the first part, it follows that $f$ is constant on the interval $[x,x']$. But then $f'=0$ on this interval, which contradicts the condition that $f'$ has only finitely many zeroes.
$\Box$

## Corollary

A real polynomial function
    $f\colon \mathbb {R} \longrightarrow \mathbb {R}$
of degree $d\geq 1$ has at most $d-1$ local extrema, and one can partition the real numbers into at most $d$ intervals, on which $f$ is alternatingly strictly increasing or

### Proof

$\Box$

## Corollary

Let $I$ denote a real interval,
    $f\colon I\longrightarrow \mathbb {R}$
a twice continuously differentiable function, and $a\in I$ an inner point of the interval. Suppose that $f'(a)=0$
* If $f^{\prime \prime }(a)>0$ holds, then $f$ has an isolated local minimum in $a$.
* If $f^{\prime \prime }(a)<0$ holds, then $f$ has an isolated local maximum in $a$.

### Proof

$\Box$
We will encounter a more general statement in fact.