A Computation like the Proof of The Extreme Value Theorem

by
K. D.  Stroyan
University of Iowa

copyright 1997 by Academic Press, Inc. - All rights reserved.

NoteBook Overview: The Extreme Value Theorem

Theorem 11.3 & Mathematical Background Theorem 4.4

If  f[x]  is a real function defined on a real compact interval  [a,b],  then  f  attains its maximum and minimum for the interval; that is, there are real numbers  (Subscript[x, m])  and  (Subscript[x, M])  such that  a≤(Subscript[x, m])≤b,  a≤(Subscript[x, M])≤b, and for all  x  with  a≤x≤b,  f[(Subscript[x, m])] ≤ f[x] ≤ f[(Subscript[x, M])].

Proof:

See the intuitive idea in Chapter 11 or the complete technical proof in Math Background Chapter 4.

A Computer Version of the Proof

The idea of the proof of the Extreme Value Theorem is to choose a small increment  Δx  and partition the interval  [a,b]  into steps of size  Δx.  We take the max and min along the finite partition to be the approxiamte max and min.  The only question is: Why is this a good approximation?

Here is some computer code to partition and find a partition max and min:

\(Clear[x, dx, f, a, b]; 
f[x_]\  := \ x - x^3; 
a\  = \ \(-1\); 

    b\  = \ 3; 
dx\  = \ 1/10; 
partition\  = \ Table[x, {x, a, b, dx}]\)values  =  Map[f[#]&, partition]fMAX = Max[values]index = Position[values, fMAX][[1, 1]]\(xMAX\  = partition[\([index]\)]
\)\(curve = Plot[f[x], {x, a, b}]; 

    Show[curve, Graphics[{AbsolutePointSize[5], Point[{xMAX, fMAX}]}]]; \)

-FindMinimum[-f[x], {x, b}]

FindMinimum[f[x], {x, a}]

Exercises

Exercise 11.3.9

Complete the program above to find dx-approximations to the maximum and minimum and test your program with several functions and smaller and smaller dx's.