# Math for Non-Geeks/ Intermediate value theorem

The intermediate value theorem says that every continuous function $f:[a,b]\to \mathbb {R}$ attains every value between $f(a)$ and $f(b)$ at least once. Continuous functions reach every intermediate value between $f(a)$ and $f(b)$ (if there are no holes in the domain between $a$ and $b$). So the intermediate value theorem can be used to determine the existence of functional values.

## Motivation

Let $f:[a,b]\to \mathbb {R}$ be an arbitrary continuous function. At the point $a$, it has the functional value $f(a)$ and at the point $b$ it has the functional value $f(b)$. Let us assume that $f(a)\leq f(b)$. Furthermore, let $s$ be an arbitrary value between $f(a)$ and $f(b)$, meaning $f(a)\leq s\leq f(b)$:
By our current perception, continuous functions don't have any jumps in their domain. Since $f$ is defined on the entire interval $[a,b]$ and its domain is connected, the graph binds the points $(a,f(a))$ and $(b,f(b))$ without jumps. If we bind $f(a)$ and $f(b)$ without "taking our pencil off the paper," at some point we must cross the line $y=s$. So there is at least one point of intersection between the line $y=s$ and the graph of $f$:
For the $x$-values ${\tilde {x}}$ of the points of intersection it holds $f({\tilde {x}})=s$. The intermediate value $s$ is therefore attained once by the function $f$. We have intuitively seen that continuous functions attain all values between any two functional values at least once, provided the domain doesn't contain any gaps between the two arguments.

## The Intermediate Value Theorem

Theorem (Intermediate Value Theorem)
Let $f:[a,b]\to \mathbb {R}$ be a continuous function with $a,b\in \mathbb {R}$ and $a<b$. Let $s$ be some value between the two functional values $f(a)$ and $f(b)$. This means it holds $f(a)\leq s\leq f(b)$ or $f(b)\leq s\leq f(a)$. Then there exists at least one real number $x\in [a,b]$ with $f(x)=s$. The intermediate value $s$ is attained at least once by the function $f$.

## Bolzano's Root Theorem

For the proof of the intermediate value theorem, it suffices to prove this for the special case $s=0$. This special case is also called "Bolzano's Root Theorem."
Theorem (Bolzano's Root Theorem)
Let $h:[a,b]\to \mathbb {R}$ be a continuous function with $a,b\in \mathbb {R}$ and $a<b$. Furthermore let zero be an intermediate value of $h(a)$ and $h(b)$, meaning $h(a)\leq 0\leq h(b)$ or $h(a)\geq 0\geq h(b)$. Then $h$ has at least one root. This means, there exists at least one argument ${\tilde {x}}\in [a,b]$ such that $h({\tilde {x}})=0$.
Why is it sufficient to only consider this special case? Let's take a function $f:[a,b]\to \mathbb {R}$ and a value $s\in \mathbb {R}$ between the functional values $f(a)$ and $f(b)$. By the intermediate value theorem, we have to find a ${\tilde {x}}\in [a,b]$ with $f({\tilde {x}})=s$. Now it holds:
$f({\tilde {x}})=s\iff f({\tilde {x}})-s=0$
Therefore $f({\tilde {x}})=s$ if and only if $f({\tilde {x}})-s=0$. Now we will define the helping function $h:[a,b]\to \mathbb {R}$ with $h(x)=f(x)-s$. As we've already determined, the equation $h({\tilde {x}})=0$ is satisfied precisely in the case $f({\tilde {x}})=s$. So if we find a root of $h$, then the function $f$ also attains the value $s$.
Now the function $h$ fulfills all of the requirements to use Bolzano's Root Theorem. It's a function of the form $[a,b]\to \mathbb {R}$ with the closed interval $[a,b]$ as its domain. As a concatenation of continuous functions, the function $h$ is continuous. In the case $f(a)\leq s\leq f(b)$ it holds:
${\begin{aligned}f(a)\leq s\iff f(a)-s\leq 0\iff h(a)\leq 0\\[0.3em]f(b)\geq s\iff f(b)-s\geq 0\iff h(b)\geq 0\end{aligned}}$
Using $f(a)\leq s\leq f(b)$ we can deduce the chain of inequalities $h(a)\leq 0\leq h(b)$. Now if we consider the case $f(a)\geq s\geq f(b)$:
${\begin{aligned}f(a)\geq s\iff f(a)-s\geq 0\iff h(a)\geq 0\\[0.3em]f(b)\leq s\iff f(b)-s\leq 0\iff h(b)\leq 0\end{aligned}}$
Altogether we can concude that zero is an intermediate value of $h(a)$ and $h(b)$. Therefore $h$ satisfies the requirements for Bolzano's Root Theorem. By this root theorem there exists a ${\tilde {x}}\in [a,b]$ with $h({\tilde {x}})=0$. For this ${\tilde {x}}$ it holds $f({\tilde {x}})=s$. This shows that the general intermediate value theorem can be easily deduced from Bolzano's root theorem. So now we must only prove Bolzano's theorem.

## Proof of Bolzano's Root Theorem

Proof (Bolzano's Root Theorem)
Let $h:[a,b]\to \mathbb {R}$ be a continuous function with $h(a)\leq 0\leq h(b)$ or $h(a)\geq 0\geq h(b)$. In the following we will consider the case $h(a)\leq 0\leq h(b)$. The other case $h(a)\geq 0\geq h(b)$ can be proved similarly. We have to find a root of $h$. This can be shown by finding a fitting sequence of nested intervals (this means that any interval in the sequence is a subset of the preceding interval in the sequence). As a starting interval we choose $[a_{1},b_{1}]=[a,b]$, so $a_{1}=a$ and $b_{1}=b$. Namely, we know that the desired root must lie in the interval $[a,b]$.
For $h(a_{1})=0$ or $h(b_{1})=0$ we already have found a root at $x=a_{1}$ or $x=b_{1}$, respectively. In this case, we are already finished. In the case $h(a_{1})<0$ and $h(b_{1})>0$, we reduced the size of our interval. For this purpose we consider the midpoint ${\tfrac {a_{1}+b_{1}}{2}}$ of the starting interval. If the value of $h$ at this point is equal to zero, then we've found a root and we are finished.
If $h\left({\tfrac {a_{1}+b_{1}}{2}}\right)\neq 0$, then we choose another interval which must contain a root. Let us assume that $h\left({\tfrac {a_{1}+b_{1}}{2}}\right)>0$. Then we get the following image:
We can see that the graph must cross the $x$-axis from $a_{1}$ to ${\tfrac {a_{1}+b_{1}}{2}}$. Since $h$ is a continuous function and can't have any jumps, and since this interval doesn't contain any gaps, there must be a root of $h$ in this interval. Since both functional values $h\left({\tfrac {a_{1}+b_{1}}{2}}\right)$ and $h(b_{1})$ are positive, we can't say whether this root lies in ${\tfrac {a_{1}+b_{1}}{2}}$ to $b_{1}$. For this reason we choose a second interval $[a_{2},b_{2}]=\left[a_{1},{\tfrac {a_{1}+b_{1}}{2}}\right]$.
If $h\left({\tfrac {a_{1}+b_{1}}{2}}\right)$ is less than zero, the graph of $h$ has to undergo a change in sign in the second interval from ${\tfrac {a_{1}+b_{1}}{2}}$ to $h(b_{1})$. Correspondingly, a zero should lie in this interval and in this case we choose $\left[{\tfrac {a_{1}+b_{1}}{2}},b_{1}\right]$ as the second interval $[a_{2},b_{2}]$:
Altogether we determine $[a_{2},b_{2}]$ in the following way:
$[a_{2},b_{2}]={\begin{cases}\left[a_{1},{\frac {a_{1}+b_{1}}{2}}\right]&;h\left({\frac {a_{1}+b_{1}}{2}}\right)>0\\\left[{\frac {a_{1}+b_{1}}{2}},b_{1}\right]&;h\left({\frac {a_{1}+b_{1}}{2}}\right)<0\end{cases}}$
We keep repeating this process: in the $n$-th step we calculate the midpoint ${\tfrac {a_{n}+b_{n}}{2}}$ of the interval $[a_{n},b_{n}]$. If $h$ attains the value $0$ here, we are finished and can return ${\tfrac {a_{n}+b_{n}}{2}}$ as a root. Otherwise we choose a new interval $[a_{n+1},b_{n+1}]$ using the following definition:
$[a_{n+1},b_{n+1}]={\begin{cases}\left[a_{n},{\frac {a_{n}+b_{n}}{2}}\right]&;h\left({\frac {a_{n}+b_{n}}{2}}\right)>0\\\left[{\frac {a_{n}+b_{n}}{2}},b_{n}\right]&;h\left({\frac {a_{n}+b_{n}}{2}}\right)<0\end{cases}}$
The following animation shows the first four steps of the interval nesting:
By this procedure we obtain either the desired root after a certain iteration $n$ or we get a sequence of intervals $([a_{n},b_{n}])_{n\in \mathbb {N} }$. By this method of choosing the sequence elements, the sequence $(a_{n})_{n\in \mathbb {N} }$ is monotone increasing and the sequence $(b_{n})_{n\in \mathbb {N} }$ is monotone falling. Since every sequential element lies in the interval $[a,b]$, the sequences are both bounded. Then we can use Monotoniekriterium für Folgen to conclude that both sequences converge. Note that the length of each interval is cut in half at each iteration, meaning:
${\begin{aligned}\lim _{n\rightarrow \infty }{(b_{n}-a_{n})}&=\lim _{n\rightarrow \infty }{{\frac {1}{2}}\cdot (b_{n-1}-a_{n-1})}\\[0.3em]&=\lim _{n\rightarrow \infty }{{\frac {1}{2}}\cdot {\frac {1}{2}}\cdot (b_{n-2}-a_{n-2})}\\[0.3em]&\vdots \\[0.3em]&=\lim _{n\rightarrow \infty }{{\frac {1}{2^{n}}}\cdot (b_{1}-a_{1})}=0\end{aligned}}$
From here it follows $\lim _{n\rightarrow \infty }{a_{n}}=\lim _{n\rightarrow \infty }{b_{n}}$. For this reason, the sequences of lower and upper interval limits converge to the same value $c\in [a;b]$. Furthermore, by our construction, it holds that $h(a_{n})<0$ and $h(b_{n})>0$ for all $n\in \mathbb {N}$. For this reason it holds for the limits: $\lim _{n\rightarrow \infty }{h(a_{n})}\leq 0$ and $\lim _{n\rightarrow \infty }{h(b_{n})}\geq 0$. Because $h$ is continuous, it holds
$\lim _{n\rightarrow \infty }{h(a_{n})}=h\left(\lim _{n\rightarrow \infty }{a_{n}}\right)=h(c)=h\left(\lim _{n\rightarrow \infty }{b_{n}}\right)=\lim _{n\rightarrow \infty }{h(b_{n})}$
From the above line we can conclude $h(c)\leq 0$ and $h(c)\geq 0$, and therefore $h(c)=0$ must hold. In this case we've also found a root of the function $h$.

## Corollaries of the Intermediate Value Theorem
### Continuous functions map intervals to intervals

With the help of the intermediate value theorem we can prove that continuous functions map intervals to intervals.
Theorem (Corollary of the Intermediate Value Theorem)
Let $I\subseteq \mathbb {R}$ be an interval and $f:I\to \mathbb {R}$ a continuous function. Then $f(I)$ is also an interval.
Proof (Corollary of the Intermediate Value Theorem)
We set $A=\inf f(I)$ and $B=\sup f(I)$. We also allow $A=-\infty$ (if $f(I)$ is bounded from below) and $B=\infty$ (if $f(I)$ is bounded from above). We now take some real number $y$ with $A<y<B$. From the definition of the infimum and the fact that $A<y$ we get that there exists some $a\in I$ with $f(a)<y$. Similarly there exists some $b\in I$ with $y<f(b)$. Altogether we have $f(a)<y<f(b)$.
So $y$ is an intermediate value of two functional values of $f$. Since $f$ is continuous, the intermediate value theorem guarantees us the existence of some $x\in I$ with $f(x)=y$. Since $y\in (A,B)$ was arbitrary, it holds $(A,B)\subseteq f(I)$. Now $A$ or $B$ could be elements of $f(I)$. Therefore $f(I)$ must be one of the following four intervals:
${\begin{aligned}f(I)={\begin{cases}[A,B]&A{\text{ and }}B{\text{ are attained by }}f\\[0.5em][A,B)&A{\text{ is attained by }}f{\text{ , but not }}B\\[0.5em](A,B]&B{\text{ is attained by }}f{\text{ , but not }}A\\[0.5em](A,B)&A{\text{ and }}B{\text{ are not attained by }}f\end{cases}}\end{aligned}}$
We see that $f(I)$ is an interval.

### Range of Power Functions

Example (Range of power functions $x\mapsto x^{k}$)
The power functions $f:\mathbb {R} \to \mathbb {R}$ with $f(x)=x^{k}$ for $k\in \mathbb {N}$ are continuous. Furthermore it holds
$\lim _{x\to \infty }f(x)=\lim _{x\to \infty }x^{k}=\infty$
Damit ist $\sup f(\mathbb {R} )=\infty$. Außerdem ist
$\lim _{x\to -\infty }f(x)=\lim _{x\to -\infty }x^{k}={\begin{cases}\infty &{\text{ for even }}k\\-\infty &{\text{ for odd }}k\end{cases}}$
For odd $k$ it holds $\inf f(\mathbb {R} )=-\infty$. For even $k$ it holds $\inf f(\mathbb {R} )=0$, since for all $x\in \mathbb {R}$ it holds $f(x)=x^{k}\geq 0$ and zero is attained as a value because $f(0)=0^{k}=0$. The by the intermediate value theorem we have
$f(\mathbb {R} )={\begin{cases}\mathbb {R} _{0}^{+}=[0,\infty )&{\text{ for even }}k\\\mathbb {R} =(-\infty ,\infty )&{\text{ for odd }}k\end{cases}}$

### Range of the Exponential Function

Example (Range of the exponential function)
The exponential function $\exp :\mathbb {R} \to \mathbb {R}$ is continuous. Also it holds $\exp(x)>0$ for all $x\in \mathbb {R}$. It holds $\lim _{x\to -\infty }\exp(x)=0$ and $\lim _{x\to \infty }\exp(x)=\infty$. Then $\inf \exp(\mathbb {R} )=0$ and $\sup \exp(\mathbb {R} )=\infty$. Since neither $0$ nor $\infty$ are attained by the exponential function, the intermediate value theorem says
$\exp(\mathbb {R} )=\mathbb {R} ^{+}=(0,\infty )$
Math for Non-Geeks: Template:Aufgabe

## Exercise: Fixed-point theorem
### Proof of a Fixed-point Theorem

In the following exercise we will prove a fixed-point theorem. Fixed points are arguments $x$ of a function $f$ that satisfy the equation $f(x)=x$. In a sentence: fixed points are those points not changed by a function transformation. Fixed point theorems are therefore theorems, that prove the existence of fixed points in certain situations. For mathematics, such theorems are important because sometimes we can reduce the problem of proving the existence of a certain object to proving the existence of a fixed point. For example, the argument $x$ is a root of the function $f:\mathbb {R} \to \mathbb {R}$, if and only if the function $g:\mathbb {R} \to \mathbb {R}$ with the ordering $g(x)=x-f(x)$ has a fixed point. Using the existence of a fixed point of the function $g$, we can prove the existence of a root for $f$. In the following exercise we are going to prove a kind of intermediate value theorem:
Math for Non-Geeks: Template:Aufgabe

### Assumptions of the Fixed Point Theorem

In the fixed point theorem above, the continuity is a necessary condition of the proven theorem. If we leave this condition out, we can find a function $g:[a,b]\to [a,b]$ for which this theorem is no longer true. This will be shown in the following exercise:
Math for Non-Geeks: Template:Aufgabe

## Exercise: Roots and Range of Polynomials
### Roots of Polynomials

The following exercise exemplifies a special case of the fundamental theorem of algebra. This theorem says that a non-constant polynomial
$p(z)=a_{n}z^{n}+a_{n-1}z^{n-1}+\ldots +a_{1}z+a_{0}$
with complex coefficients $a_{0},a_{1},\ldots ,a_{n-1},a_{n}$ has at least one complex root. In the real case this claim does not hold in general. A polynomial with real coefficients need not necessarily have real roots. A polyomial function without real roots could be, for example, $p(x)=x^{2}+1$. For certain polynomials, we can still prove the existence of a root:
Math for Non-Geeks: Template:Aufgabe

### Range of Polynomials

Math for Non-Geeks: Template:Aufgabe

## Exercise: The existence of n-th order Roots

The intermediate value theorem also offers a possibility to check the existence of $n$-th order roots. In the chapter "Wurzel reeller Zahlen“ we have already proven this using the concept of nested intervals. Now we will see an alternative proof that uses the intermediate value theorem. Just a reminder: the $n$-th order root ${\sqrt[{n}]{\alpha }}$ for some positive number $\alpha$ is a real number $x$ with $x^{n}=\alpha$.
Math for Non-Geeks: Template:Aufgabe

## Exercise: Solving an Equation

Both the intermediate value and root theorems can be used to justify the existence of a solution of a given equation. The equation is used to build a continuous function, on which we can apply either the root theorem or the intermediate value theorem.
Math for Non-Geeks: Template:Aufgabe