Jump to content

Extreme value theorem – "Math for Non-Geeks"

From Wikibooks, open books for an open world

In the following, we are going to deal with continuous functions on compact intervals. These are intervals that are closed and bounded, i.e. have the form [a,b]. We will see that such functions are always bounded and attain a minimum and maximum. This theorem is called the Extreme Value Theorem. It is used in mathematics to prove the existence of relative extrema, i.e. points of a function that are "at the extreme" of being the lowest point in the graph (the minimum) or the highest point in the graph (the maximum).

Motivation

[edit | edit source]
Motivation and intuition behind the extreme value theorem (in German)

Let's take a continuous function f which is defined on a compact interval [a,b]. I.e. we are considering a function f:[a,b]→ℝ. This function has the value f(a) at the point a and the value f(b) at the point b.

The function values f(a) and f(b)
The function values f(a) and f(b)

Now f is defined for every intermediate point between a and b. Intuitively, for functions without gaps in the domain of definition, continuity means that we are able to draw the graph without lifting the pen from the paper. Hence, the graph of f connects the points (a,f(a)) and (b,f(b)) by a continuous path without jumps. The following graph provides an example for such a function f:

The graph of the function f
The graph of the function f

We note that the function f above is bounded. And it attains a maximum and minimum value:

The function f is bounded and attains a maximum and a minimum
The function f is bounded and attains a maximum and a minimum

Is it always that way? Try for yourself to connect the points (a,f(a)) and (b,f(b)) by different graphs without lifting the pen. Could you imagine drawing the graph of an unbounded function - even if your paper was infinitely large?

Intuitively, the answer is no. No matter how far your graph goes up or down, you need to return to the end points at (a,f(a)) or (b,f(b)). Going to infinity "forces you to lift the pen" and is therefore not allowed. However, the function f can attain very large values (like 10100 or more) while staying bounded, as long as you return in order to reach the end point. This situation is illustrated in the following figure:

Another bounded function with values f(a) and f(b), attaining a maximum and a minimum
Another bounded function with values f(a) and f(b), attaining a maximum and a minimum

So our first intuition tells us that when connecting the two points (a,f(a)) and (b,f(b)) without lifting the pen, our function stays bounded. And it attains a maximum and a minimum. Now let's think about what could go wrong when phrasing this intuition in a mathematical way. The end points a and b of the domain of definition [a,b] could become problematic: For an open domain of definition (a,b), the function could run towards ±∞ at a or b, or it could converge towards a value without attaining it. Including the boundary points {a,b} in the domain of definition excludes these cases as it "catches the function" at the end points (a,f(a)) and (b,f(b)). If we move a boundary to infinity, let's say by considering the domain of definition [a,∞), the function could have "infinitely much time" and might run towards infinity while being continuous. This happens for instance for f(x)=x2. So we also expect problems with unbounded domains of definition. A statement like "the maximum and minimum are attained" can only be expected to hold true on a compact interval [a,b]. Now, in between a and b, the function could also "break out" and tend towards ±∞ (like f(x)=1x near x=0). This scenario will be prevented by assuming continuity of the function f.

In the following, we will mathematically verify that our intuition is true. That means we prove a statement like "the maximum and minimum are attained" for continuous functions defined on a compact interval [a,b] and discuss what may go wrong if we choose other domains of definition.

Extreme value theorem

[edit | edit source]
Theorem (Extreme value theorem)
Explanation of the extreme value theorem (in German). (YouTube-Video published by Quatematik)

Every continuous function defined on a compact interval [a,b] is bounded and attains a maximum and a minimum (extreme values). That means, if f:[a,b]→ℝ with a,b∈ℝ and a<b is a continuous function, then there are arguments x~,x̂∈[a,b], such that for all arguments x∈[a,b] the inequality f(x̂)≤f(x)≤f(x~) holds.

Example (Extreme value theorem)
Graph of a function f:[0,1]→ℝ with f(x)=x2⋅cos⁡(x)⋅ecos⁡(x)−ln⁡(x+1). This function attains a maximum and a minimum, which is attained in form of a function value.

Consider f:[0,1]→ℝ with f(x)=x2⋅cos⁡(x)⋅ecos⁡(x)−ln⁡(x+1). The domain of definition [0,1] is a compact interval. In addition, f is continuous as it is composed out of continuous functions x↦x2, x↦ex, x↦cos⁡(x) and x↦ln⁡(x+1) with domains of definition [0,1]. Hence, f must attain a maximum and a minimum.

Proof (Extreme value theorem)
Proof of the extreme value theorem (in German)

Let f:[a,b]→ℝ be a continuous function with a,b∈ℝ and a<b. We will only prove explicitly that f is bounded from above and attains a maximum. The analogous statement that f is bounded from below and attains a minimum can be shown the same way.

So let us consider the image f([a,b]). This is the set of all function values, which are attained by f. Let us take the supremum sup⁡f([a,b]) of the set f([a,b]), where we explicitly allow for use of the extended definition of the supremum sup⁡f([a,b])=∞ . If f is bounded from above, then sup⁡f([a,b])=∞ and else, sup⁡([a,b])∈ℝ (since f([a,b])≠∅ , the case sup⁡∅=−∞ cannot occur).

Now, we know that there is a sequence in f([a,b]) , which tends towards the supremum sup⁡f([a,b]) (for each nonempty set M there is a subsequence in M, tending towards sup⁡M). Hence, there is a sequence (xn)n∈ℕ of arguments in [a,b] with limn→∞f(xn)=sup⁡f([a,b]).

We now make use of the Bolzano-Weierstraß theorem. This theorem tells us that each sequence in a compact interval [a,b] with a,b∈ℝ and a<b has a converging subsequence. Hence, (xn)n∈ℕ also has a convergent subsequence (xnk)k∈ℕ. Let x~ be the limit of the convergent subsequence (xnk)k∈ℕ. Since a≤xnk≤b for all k∈ℕ , there is also a≤x~≤b and therefore x~∈[a,b]. So, x~ must be an argument of the function f. Since f is continuous, we can make use of the sequential definition of continuity

f(x~)=f(limk→∞xnk)=limk→∞f(xnk)=sup⁡f([a,b])

sup⁡f([a,b]) is a function value of f and hence a real number. Therefore, we know that f is bounded from above. And we have shown that f attains its upper bound sup⁡f([a,b]) at the argument x~ . Therefore, f(x)≤f(x~) for all x∈[a,b] and indeed, f(x~)is the maximum among all function values of f.

Assumptions of the theorem

[edit | edit source]
Assumptions of the extreme value theorem (in German)

Let's take a look at the assumptions made within the extreme value theorem:

  • f is a continuous function
  • f is defined on a compact interval [a,b]

Are those assumptions really necessary, or can we relax them without losing validity of the extreme value theorem?

Assumption of continuity

[edit | edit source]
Function f(x)=1x on the interval [−1,1] with f(0)=0

First, we note that continuity prevents the function f from "breaking out" to +∞ or −∞ within its domain of definition. If we just allow any function f:[a,b]→ℝ , no matter whether it is continuous or not, we will find non-continuous functions which are violating the extreme value theorem. The following function is unbounded (so it does not attain any extrema) and non-continuous at x=0 :

f:[−1,1]→ℝ:x↦{1x;x≠00;x=0

So we cannot simply drop the assumption that f is continuous.

Interval-assumption

[edit | edit source]
The function f(x)=1x on (0,1]

The domain of definition is also important. It must include its boundary (i.e. be closed). This way we "catch" the function at the interval boundary and make sure it does not "run away" towards infinity. The function g:(0,1]→ℝ:x↦1x is an example which "runs away" as we approach x=0.

Unboundedly large domains are also problematic, since the function has "infinitely much time" to run away. An easy example is the function h:[0,∞)→ℝ:x↦x2. And there are functions, which are defined on a bounded domain of definition, continuous and do not "run away" towards infinity, but do not attain an extremum. This happens if there are open boundaries or gaps within the domain of definition. The extremum would then be attained at the boundary (or the gap) - but this argument has been removed from the domain of definition.

Question: Does the continuous function f always attain a maximum or a minimum, if it is defined on a bounded interval?

No. For instance, the function f:(0,1)→ℝ, f(x)=x does not. There is: f((0,1))=(0,1). So the infimum and maximum of the image are 0 and 1, which would be attained at the boundary (x=0 and x=1), if f was defined there. However, we removed 0 and 1 from the domain of definition, so f does no longer attain an extremum.

The same may happen when removing a maximum or minimum from the interior of the domain of definition instead of the boundary - which creates a gap. Of course, the function may also "run away" at such a gap. An example for this effect is the continuous but unbounded function j:[−1,1]∖{0}→ℝ:x↦1x. The argument x=0 is excluded from the domain of definition [−1,1]∖{0}=[−1,0)∪(0,1] . So this function is well-defined and continuous, but it "runs away" at the gap. In a mathematical language, the function is unbounded and hence violates the conclusion of the extreme value theorem.

Outlook: Generalization of the theorem

[edit | edit source]

So far, we only considered intervals (possibly with gaps) as candidates for the domain of definition. Is this restriction really necessary? This time, the answer is no. For instance, we can take the union of two intervals D=[a,b]∪[c,d] with a<b<c<d and define some continuous and real-valued function j on D. If we restrict j to only [a,b] or [c,d] , we can apply the extreme value theorem. Both the functions j1=j|[a,b] and j2=j|[c,d] with restricted domain of definition are bounded and hence attain a maximum and a minimum. The function j must therefore also be bounded. Its maximum is the larger of the both maxima of j1 and j2 , so j also attains a maximum (the same holds for the minimum). Therefore, every continuous function defined on the union of two closed intervals [a,b]∪[c,d] fulfills the conclusion of the extreme value theorem. The same holds if we consider three or more closed intervals - or an even larger class of domains of definition. In fact, we can precisely state what this larger class of domains of definition is:

If we take a second look at the proof, we note that the domain of definition is only mentioned at one point: where we make use of the Bolzano-Weierstraß theorem. We used it to show that any sequence from the domain of definition contains a convergent subsequence. Hence, the proof arguments hold true, as long as the domain of definition allows for the usage of the Bolzano-Weierstraß theorem.

So we can generalize the above theorem. It will hold not only on closed intervals [a,b], but on all sets satisfying the Bolzano-Weierstraß theorem. We will call these sets satisfying the Bolzano-Weierstraß theorem sequentially closed sets:

Definition (Sequential closedness)

A subset of the real numbers is called sequentially closed iff any sequence out of this set has a convergent subsequence.

If the domain of definition D of a continuous function f:D→ℝ is sequentially compact, then the function f must fulfill the extreme value theorem. The generalization of sequential compactness from real numbers to other sets of mathematical objects is one of the topics dealt with in topology.

Exercise: Image of polynomials of even degree

[edit | edit source]
Exercise: Image of polynomials of even degree (in German)
Exercise (Image of polynomials)

Let

p:ℝ→ℝ, p(x)=anxn+an−1xn−1+…+a1x+a0

be a polynomial function with a0,a1,…,an−1,an∈ℝ and an≠0. Let p further have an even degree n. Show that the image of p is given by

p(ℝ)={[ymin,∞) for an>0,(−∞,ymax] for an<0.

Here, ymin (an case an>0) and ymax (in case an<0) are real numbers.

Proof (Image of polynomials)

We will consider the case an>0. The proof for the case an<0 works analogously. At first, we note that the polynomial p is a composition of continuous functions and hence continuous itself on ℝ . It is temping to use the extreme value theorem in order to show that p attains a minimum. However, ℝ=(−∞,∞) is not a compact interval. However, we can cut it off at very large values and make it compact this way. For even n, there is limx→±∞xn=∞, since n. The xn-term dominates the other ones, so there is also

limx→±∞p(x)=limx→±∞xn⏟→∞(an+an−1x−1+…+a1x−n+1+a0x−n⏟→an>0)=∞

Now, let us take any function value of p – for instance p(0). Since limx→∞p(x)=∞ there is an S∈ℝ, such that p(x)>p(0) for all x≥S . Analogously, since limx→−∞p(x)=∞ there is an s∈ℝ, such that p(x)>p(0) for arguments x smaller than s . Both on (−∞,s] and [S,∞) , the polynomial p is larger than the function value p(0).

We can hence cut off the real number axis and restrict to the interval [s,S]. Since on [S,∞) the function is larger than p(0) , the argument 0 does not belong to this set and S>0. Analogously, s<0. Therefore, [s,S] is a nonempty, closed and bounded interval. Hence, it is compact and we can apply the extreme value theorem. The polynomial p indeed attains a minimum ymin on [s,S] . Now, ymin≤p(0) (since 0∈[s,S]) and therefore, ymin is also a global minimum of the polynomial.

The intermediate value theorem additionally yields that the image of p is an interval (see also Conclusions from the intermediate value theorem). Since limx→∞p(x)=∞ and ymin is a global minimum of p , the image of p must be of the form [ymin,∞).

Exercise: Continuous functions on [0,1]

[edit | edit source]
Exercise: Continuous functions on [0,1] (in German)
Exercise (There is no continuous function on a compact interval attaining all function values exactly twice)

Show that there is no continuous function f:[0,1]→ℝ attaining all its function values exactly twice. That means, there is no continuous function f:[0,1]→ℝ, such that for all y∈f([0,1]) exactly two numbers x1,x2∈[0,1] with f(x1)=f(x2)=y exist.

Solution (There is no continuous function on a compact interval attaining all function values exactly twice)

We perform a proof by contradiction. Let f:[0,1]→ℝ be a continuous function attaining all its values exactly twice. Since f is continuous and [0,1] is a compact interval, f has to be bounded and to attain a maximum M . By assumption, this maximum is attained exactly twice. So there are two arguments xM,x~M∈[0,1] with f(xM)=f(x~M)=M. Let without loss of generality be xM<x~M.

Now, f must also attain a minimum on the interval [xM,x~M] , which we call m . Since M is the maximum of f , it is also the maximum of the restriction f|[xM,x~M]. Therefore, M≥m. In case m=M , the function f would have to be constant on [xM,x~M] and hence attain exactly one value infinitely often. Therefore, m<M.

Since the minimum m is attained by f on the interval [xM,x~M] and the function attains the maximum M on both ends of the interval, there is an xm with xM<xm<x~M and f(xm)=m. And we know that m is attained at some second argument x~m∈[0,1] . This argument x~m may be situated on the inside of the interval [xM,x~M] or on the outside.

Case 1: x~m∉[xM,x~M]

First, we consider the case where x~m is not in [xM,x~M] on consider - without loss of generality - the case xM<xm<x~M<x~m . The mean M+m2 of M and m is an intermediate value and will hence be attained by the function between xM and xm by means of the intermediate value theorem. Analogously, M+m2 is attained in the intervals [xm,x~M] and [x~M,x~m] . So M+m2 is attained at least at three arguments, which leads to a contradiction to the function attaining each value exactly twice:

The function f is attaining the value (M+m)/2 three times
The function f is attaining the value (M+m)/2 three times

Case 2: x~m∈[xM,x~M]

Now, we consider the case where x~m is situated inside the interval [xM,x~M] . Without loss of generality, we assume xM<xm<x~m<x~M . Within the interval [xm,x~m] , f must attain a maximum M2 . Since m is the minimum on [xm,x~m] , there will be M2≥m. In addition, m has already been attained twice, so we need the strict inequality M2>m (else, the function would be constant on [xm,x~m]). As M is the maximum of f, which was already attained twice at xM and x~M , there is M>M2>m.

Now, the intermediate value theorem tells us that M2 is attained within the interval [xM,xm] (since f(xM)=M>M2>m=f(xm)). For the same reason (f(x~m)=m<M2<M=f(x~M)), the value M2 is also attained on [x~m,x~M]. So M2 is a value attained at least three times: inside the open interval (xM,xm), inside (xm,x~m) and inside (x~m,x~M). This is a contradiction to every value being attained exactly twice:

A function f attaining the value M_2 three times
A function f attaining the value M_2 three times

In addition, the statement of the above exercise can be generalized in multiple ways:

  1. We have shown that on a compact interval [a,b] , there is no continuous function attaining each value twice.
  2. Similarly, one may show that there is no continuous function f:ℝ→ℝattaining each of its values twice.
  3. And for each given number n∈ℕ, n>1 , one can show that there is no continuous function f:[a,b]→ℝ attaining each of its values exactly n times.
Exercise for understanding: Give an example for:
  1. A continuous function f:[0,1]→ℝ, attaining each of its function values exactly once.
  2. A function f:(0,1]→ℝ (non-continuous) attaining all of its function values exactly twice.

Possible solution:

  1. f:[0,1]→ℝ with f(x)=x
  2. f:(0,1]→ℝ with f(x)={2x0<x≤122x−112<x≤1