Skip to content
Tutorials Center
My learning

Topics

Lesson 21 of 37 ยท Continuity

The Extreme Value Theorem

Prove that a continuous function on a closed bounded interval is bounded and attains its maximum and minimum, using Bolzano-Weierstrass, with counterexamples.

Does every continuous function have a largest value? On the whole real line, no: f(x) = x grows forever. On an open interval, no: f(x) = x on (0, 1) approaches 1 but never reaches it. But on a closed and bounded interval [a, b], yes. This is the Extreme Value Theorem (EVT). It is the reason optimization problems in calculus have solutions.

Statement

Theorem (EVT). If f : [a, b] โ†’ โ„ is continuous, then f is bounded, and there exist p, q โˆˆ [a, b] with f(p) โ‰ค f(x) โ‰ค f(q) for all x โˆˆ [a, b]. In other words, f attains its minimum and its maximum.

The proof relies on the Bolzano-Weierstrass theorem: every bounded sequence of real numbers has a convergent subsequence. Because a โ‰ค xโ‚™ โ‰ค b, the limit of such a subsequence also lies in [a, b]; this is where closedness of the interval is used.

Step 1: f is bounded

Suppose f is not bounded above. Then for each n there is xโ‚™ โˆˆ [a, b] with f(xโ‚™) > n. By Bolzano-Weierstrass some subsequence x_{nโ‚–} converges to a point x โˆˆ [a, b]. By continuity (sequential criterion), f(x_{nโ‚–}) โ†’ f(x), so the sequence f(x_{nโ‚–}) is bounded. But f(x_{nโ‚–}) > nโ‚– โ†’ โˆž. Contradiction. Hence f is bounded above. The same argument handles bounded below.

Step 2: the supremum is attained

Let M = sup f([a, b]), which exists by Step 1. For each n pick xโ‚™ with f(xโ‚™) > M - 1/n. Choose a convergent subsequence with limit q โˆˆ [a, b]. Then f(x_{nโ‚–}) โ†’ f(q) by continuity, while M - 1/nโ‚– < f(x_{nโ‚–}) โ‰ค M forces f(x_{nโ‚–}) โ†’ M. So f(q) = M. The minimum is obtained by applying this to -f. โˆŽ

The proof shows what makes [a, b] special: every sequence in it has a subsequence that converges to a point still in the set. Sets with this property are called compact. In โ„, a set is compact exactly when it is closed and bounded.

Why each hypothesis is needed

Failure Example What goes wrong
Not closed f(x) = x on (0, 1) sup is 1, never attained
Not closed f(x) = 1/x on (0, 1] unbounded above
Not bounded f(x) = x on [0, โˆž) unbounded
Not continuous f(x) = x on [0, 1), f(1) = 0 sup is 1, never attained
Python Sup that is never attained

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Finding the extremes numerically

The EVT guarantees that a maximizer exists; it does not say where it is. A simple strategy is to evaluate f on a grid and refine around the best point. Because a continuous function on [a, b] is uniformly close to its grid values (see uniform continuity), the grid maximum converges to the true maximum as the grid is refined.

Python Grid search with refinement

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Consequences

  • A continuous function on [a, b] has a bounded image, and by the IVT its image is exactly the closed interval [min f, max f]. So the continuous image of a closed bounded interval is a closed bounded interval.
  • Rolle's theorem (in a later lesson on the Mean Value Theorem) uses the EVT to find an interior extremum.
  • Existence of a minimizer is the starting point for proofs that an optimization problem has a solution.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which tool is used in the proof of the Extreme Value Theorem?

    A bounded sequence in [a, b] has a convergent subsequence whose limit lies in [a, b]. Continuity then transfers the limit to f.
  2. 2. f(x) = 1/x on (0, 1] is continuous. Which hypothesis of the EVT fails?

    The domain (0, 1] is not closed, because 0 is a limit point not in the set, so f can be unbounded.
  3. 3. If f is continuous on [0, 1], what is its image?

    The EVT gives a min m and a max M attained, and the IVT fills in everything between them.
  4. 4. Which function on [0, 1] has no maximum?

    The sup is 1, approached as x goes to 1 from below, but the jump at 1 means the value 1 is never taken.

Summary

  • EVT: a continuous f on [a, b] is bounded and attains its max and min.
  • The proof uses Bolzano-Weierstrass: bounded sequences in [a, b] have subsequences converging inside [a, b].
  • Dropping closedness, boundedness or continuity can destroy the conclusion.
  • Together with the IVT, f([a, b]) = [min f, max f].

Next: Uniform Continuity