# 6.6. Continuous Functions on Closed Intervals

As already mentioned briefly continuous functions unfold a special wealth of properties on closed intervals. This part deals solely with the intermediate value theorem and the extreme value theorem, two outstanding examples within this context.

The results in this part are only valid for closed intervals. Furthermore they are completely confined to the real numbers due to the fact that all essential proofs use the completeness axiom, a feature only valid in $ℝ$.

The zero theorem, a special case of the intermediate theorem, is easily depicted: As the real x-axis has no gaps any continuous function to cross this axis will do this by intersection.

Theorem (zero theorem):  Take  $f\in {\mathcal{C}}^{0}\left(\left[a,b\right]\right)$. If its values at a and b differ in their algebraic sign, e.g.  $f\left(a\right)<0f  has a zero within the interior of $\left[a,b\right]$, i.e. there is a number $\stackrel{˜}{x}\in \right]a,b\left[$ such that

 $f\left(\stackrel{˜}{x}\right)=0$ [6.6.1]

Proof:  Let's outline the basic idea first: If we could choose the greatest x from all $x\in \left[a,b\right]$ with a negative value we would only find numbers with a positive value right to that position. It is at this transition where we expect a zero for  f.

Thus we consider the set

$A≔\left\{x\in \left[a,b\right]|f\left(x\right)\le 0\right\}\subset \left[a,b\right]$

A is non-empty, infact a is member of A as  $f\left(a\right)<0$. Being a subset of $\left[a,b\right]$ A turns out to be bounded thus has a supremum according to the completeness axiom.

For $\stackrel{˜}{x}≔\mathrm{sup}A$ we have $\stackrel{˜}{x}\in \left[a,b\right]$ and as there are no elements of A beyond $\stackrel{˜}{x}$ we know that

Excluding the options  $f\left(\stackrel{˜}{x}\right)>0$ and  $f\left(\stackrel{˜}{x}\right)<0$ now proves the assertion:  $f\left(\stackrel{˜}{x}\right)=0$:

• If  $f\left(\stackrel{˜}{x}\right)>0$, in particular $\stackrel{˜}{x}\ne a$, proposition [6.4.1] provides a relative $\epsilon$-neighbourhood ${\left[a,b\right]}_{\stackrel{˜}{x},\epsilon }=\left[a,b\right]\cap \right]\stackrel{˜}{x}-\epsilon ,\stackrel{˜}{x}+\epsilon \left[$ such that

As $\stackrel{˜}{x}\ne a$ we find a number $y<\stackrel{˜}{x}$ inside $\left[a,b\right]$ such that  $f\left(x\right)>0$ for all $x\in \left[y,\stackrel{˜}{x}\right]$. Combining this with the information in [0] yields $A\subset \left[a,y\left[$ and thus the contradiction  $\stackrel{˜}{x}=\mathrm{sup}A\le y<\stackrel{˜}{x}$.

• If  $f\left(\stackrel{˜}{x}\right)<0$, in particular $\stackrel{˜}{x}\ne b$, we employ [6.4.1] again to get a relative $\epsilon$-neighbourhood ${\left[a,b\right]}_{\stackrel{˜}{x},\epsilon }=\left[a,b\right]\cap \right]\stackrel{˜}{x}-\epsilon ,\stackrel{˜}{x}+\epsilon \left[$ such that

With $\stackrel{˜}{x}\ne b$ we find an $x>\stackrel{˜}{x}$ inside $\left[a,b\right]$ such that  $f\left(x\right)<0$ in contradiction to [0].

So we have  $f\left(\stackrel{˜}{x}\right)=0$ which also proves that $\stackrel{˜}{x}\in \right]a,b\left[$.

Consider: The premise of the zero theorem cannot be lessened. For example

• $\frac{1}{\mathrm{X}}$ is continuous on ${\left[-1,1\right]}^{\ne 0}$ but has no zero.

• $\mathrm{H}-\frac{1}{2}$ is discontinuous on $\left[-1,1\right]$ and has no zero.

• $\left({\mathrm{X}}^{2}-2\right)|ℚ$ is continuous on $\left[0,2\right]\cap ℚ$ and has no zero.

•

The zero theorem opens the door to a different approach to solve equations. As only few equations have exactly computable roots the need for approximation methods is obvious. Often these methods are iterative, producing a sequence of roots with increasing accuracy.

A common example is the iterated bisection of intervals, a method that isolates the root within intervals of decreasing diameters. As an example we consider the equation

${x}^{3}+x-1=0$

Its roots are the zeros of the continuous function  $f={\mathrm{X}}^{3}+\mathrm{X}-1$. The zero theorem now allows to argue as follows:

1. As  $f\left(0\right)=-1$ and  $f\left(1\right)=1$  f  has to have a zero within the initial interval  $\left[0,1\right]$.

2. For its midpoint ${x}_{m}=0.5$ we have  $f\left(0.5\right)=-0.375$. Consequently  f has a zero within the right subinterval  $\left[0.5,1\right]$.

3. Iterating the previous step will yield a sequence of zero intervals with halfed diameters in each step.

The following table shows the initial situation. Iterating about 20 times will overstrain the computers precision bounds. Let us with steps:

 step  |   $f\left({x}_{m}\right)={x}_{m}^{3}+{x}_{m}-1$|    zero interval

With , the last zero interval's midpoint, we now got a number not more than 2 = units away from the 'real' zero. Thus we have found a root accurate to at least decimal places.

Iterated bisection of intervals is quite a simple approximation method with no special emphasis on its rate. With more sophisticated methods (such as e.g. the regula falsi or Newton's method) running times could be improved.

Turning now back to the actual issue of this part we will prove the intermediate value theorem. Using the common 'difference trick' it comes easily from the zero theorem.

Theorem (intermediate value theorem):  Take  $f\in {\mathcal{C}}^{0}\left(\left[a,b\right]\right)$ and $c\in ℝ$. If c is intermediate between  $f\left(a\right)$ and  $f\left(b\right)$, for example  $f\left(a\right), than there is an $\stackrel{˜}{x}\in \right]a,b\left[$ such that

 $f\left(\stackrel{˜}{x}\right)=c$ [6.6.2]

Proof:  The continuous function  $f-c\in {\mathcal{C}}^{0}\left(\left[a,b\right]\right)$ satisfies  $f-c\left(a\right)<0. Thus the zero theorem [6.6.1] provides a suitable $\stackrel{˜}{x}\in \right]a,b\left[$ such that

$f-c\left(\stackrel{˜}{x}\right)=0\text{ }⇔\text{ }f\left(\stackrel{˜}{x}\right)=c$

The difference trick could also be employed for the comparison of two functions: Two continuous functions are to intersect if their values at the interval's endpoints are differently orientated.

Task:  Take  $f,g\in {\mathcal{C}}^{0}\left(\left[a,b\right]\right)$ such that $f\left(a\right) and  $f\left(b\right)>g\left(b\right)$.

Show:  f and g have an intersection point in the interior of $\left[a,b\right]$ i.e. there is an $\stackrel{˜}{x}\in \right]a,b\left[$ holding

 $f\left(\stackrel{˜}{x}\right)=g\left(\stackrel{˜}{x}\right)$ [6.6.3]

Proof:  $\phantom{|}$ ?

Preparing the extreme value theorem we now prove that continuous functions on closed intervals are always bounded. In many cases this is a helpful property of continuous functions.

Theorem:  If  $f\in {\mathcal{C}}^{0}\left(\left[a,b\right]\right)$ then  f is bounded, i.e. there is a number c such that

 [6.6.4]

Proof:  According to [6.5.5]  f is uniformly continuous on $\left[a,b\right]$. Thus there is a  $\delta >0$ such that

$|x-y|<\delta \text{ }⇒\text{ }|f\left(x\right)-f\left(y\right)|<1$[1]

for all $x,y\in \left[a,b\right]$. As $ℝ$ is an archimedean field
 i That means: $ℕ$ is an unbounded subset of $\left(ℝ,\le \right)$. So there will be a greatest natural k such that $k\le \frac{b-a}{\delta }$.
the set $\left[a,b\right]\cap \left\{a+n\delta |n\in ℕ\right\}$ is finite, thus we find a $k\in ℕ$ such that

$\left[a,b\right]\cap \left\{a+n\delta |n\in ℕ\right\}=\left\{a+0\cdot \delta ,\dots ,a+k\cdot \delta \right\}$

From that we get the estimate

$|f\left(x\right)|\le c≔\mathrm{max}\left\{|f\left(a+0\cdot \delta \right)|,\dots ,|f\left(a+k\cdot \delta |,|f\left(b\right)|\right\}+1$,

because for each $x\in \left[a,b\left[$ we find a number $i\le k$ such that $x\in \left[a+i\cdot \delta ,a+\left(i+1\right)\cdot \delta \left[$, i.e. $|x-\left(a+i\cdot \delta \right)|<\delta$, so that [1] will ensure

$\begin{array}{ll}\hfill & |f\left(x\right)|-|f\left(a+i\cdot \delta \right)|\le |f\left(x\right)-f\left(a+i\cdot \delta \right)|\le 1\hfill \\ ⇒\text{ }\hfill & |f\left(x\right)|\le |f\left(a+i\cdot \delta \right)|+1\le c\hfill \end{array}$

So we know that continuous functions on closed intervals have bounds. The next theorem shows that some of these are even actual values.

Theorem (extreme value theorem):  For each  $f\in {\mathcal{C}}^{0}\left(\left[a,b\right]\right)$ there are two numbers $\underset{¯}{x},\overline{x}\in \left[a,b\right]$ such that

 [6.6.5]

Proof:  At first we show that a minimum value exists: Due to [6.6.4] we may use the number

$c≔\mathrm{inf}\left\{f\left(x\right)|x\in \left[a,b\right]\right\}$

which turns out to be a value of  f. Certainly we have $c\le f\left(x\right)$ [2] for all $x\in \left[a,b\right]$ and as there are no further bounds above c we find an ${x}_{n}\in \left[a,b\right]$ for each $n\in {ℕ}^{\ast }$ such that

$c\le f\left({x}_{n}\right)[3]

According to the Bolzano-Weierstrass theorem [5.8.6] the bounded sequence $\left({x}_{n}\right)$ has an accumulation point $\underset{¯}{x}\in \left[a,b\right]$ that could be represented as the limit of suitable subsequence: $\underset{¯}{x}=lim{x}_{{k}_{n}}$.

Using [3] we get $c\le f\left({x}_{{k}_{n}}\right). The nesting theorem [5.5.8] and the continuity of  f now establish the equality

$c=limf\left({x}_{{k}_{n}}\right)=f\left(lim{x}_{{k}_{n}}\right)=f\left(\underset{¯}{x}\right)$

Due to [2]  $c=f\left(\underset{¯}{x}\right)$ is thus a minimum value for  f.

A maximum value is now easy to find: If $-f\left(\overline{x}\right)$ is a minimum value for the continuous function $-f$ then  $f\left(\overline{x}\right)$ is a maximum value for  f.

Consider:

• The sine function on $\left[0,8\pi \right]$ for example shows that a function could take its extreme values more than once. So uniqueness isn't guaranteed.

• Also it is indispensable for the interval to be closed ( $\frac{1}{\mathrm{X}}$ is unbounded on $\right]0,1\right]$) as well as for the function being continuous:

for example has no maximum value.

• Finally [6.6.6] is strictly confined to the reals: The function ${\left(\mathrm{X}-2\right)}^{2}|ℚ$ is continuous on $\left[0,2\right]\cap ℚ$  but has no minimum value!

•

Combining the two major theorems of this part results in an interesting property of the domain of a continuous function.

Proposition:  Continuous functions map intervals on intervals:

 $f\in {\mathcal{C}}^{0}\left(\left[a,b\right]\right)\text{ }⇒\text{ }f\left(\left[a,b\right]\right)$ is an interval [6.6.6]

Proof:  According to [6.6.5] there are numbers $\underset{¯}{x},\overline{x}\in \left[a,b\right]$ such that

$f\left(\left[a,b\right]\right)\subset \left[f\left(\underset{¯}{x}\right),f\left(\overline{x}\right)\right]$

Otherwise the intermediate value theorem [6.6.2] guarantees that every number in $\left[f\left(\underset{¯}{x}\right),f\left(\overline{x}\right)\right]$ is a value for  f, i.e. we have additionally

$f\left(\left[a,b\right]\right)\supset \left[f\left(\underset{¯}{x}\right),f\left(\overline{x}\right)\right]$

 6.5. 6.7.