The extreme value theorem
Statement
Let \( a, b \in \mathbb{R} \) with \( a \lt b \), and let \( f : [a,b] \to \mathbb{R} \) be continuous at every point of the closed bounded interval \( [a,b] \). Then \( f \) is bounded on \( [a,b] \), and \( f \) attains both its supremum and its infimum: there exist points \( c, d \in [a,b] \) such that \[ f(c) \;=\; \inf_{x \in [a,b]} f(x) \qquad \text{and} \qquad f(d) \;=\; \sup_{x \in [a,b]} f(x), \] so that \( f(c) \le f(x) \le f(d) \) for all \( x \in [a,b] \). Every hypothesis is used: the domain must be closed, the domain must be bounded, \( f \) must be continuous on all of it, and the codomain is \( \mathbb{R} \) with its completeness and order.
Why it matters
The extreme value theorem (EVT) is the existence engine of one-variable optimisation. Before you differentiate anything, you need to know that a maximiser exists; Fermat's theorem and the endpoint check only tell you where an extremum can hide, not that there is one. Rolle's theorem — and hence the mean value theorem, Taylor's theorem with remainder, and most of the quantitative estimates of Calculus I — begins by invoking EVT to produce the interior extremum whose derivative vanishes.
Conceptually, EVT is the first theorem in the degree where compactness does real work: continuous functions transport the closed-and-bounded character of \( [a,b] \) to the image. It is also a completeness result in disguise — over \( \mathbb{Q} \) it is false — so it marks the exact point where calculus stops being algebra and starts depending on the structure of \( \mathbb{R} \).
Hypotheses
Proof
The proof has two movements: (I) \( f \) is bounded above; (II) the supremum is attained. The minimum statement then follows by applying the result to \( -f \). We use the Bolzano–Weierstrass theorem, the completeness axiom (supremum property), the sequential characterisation of continuity, the fact that weak inequalities pass to limits, and uniqueness of limits — each cited where used.
Result
Reading. A continuous function on a closed bounded interval cannot run off to infinity, and cannot merely flirt with its best value: somewhere in the interval the largest value is actually taken, and somewhere the smallest. "Sup" and "inf" upgrade to "max" and "min".
Scope. Applies to any real-valued function continuous on a closed bounded interval \( [a,b] \subseteq \mathbb{R} \) — more generally, to continuous real-valued functions on any compact set. It says nothing on open, half-open, or unbounded intervals, nothing for functions with even one point of discontinuity, and nothing about where the extrema lie or whether they are unique.
Corollaries & converses
- Boundedness theorem. \( f \in C([a,b]) \Rightarrow \exists K \ \forall x: |f(x)| \le K \). (Contained in Steps 1–4; take \( K = \max\{|f(c)|, |f(d)|\} \).)
- Image is a closed bounded interval. Combining EVT with the intermediate value theorem, \( f([a,b]) = [m, M] \) where \( m = f(c) \), \( M = f(d) \): EVT gives the endpoints, IVT fills the interior.
- Rolle's theorem. If additionally \( f \) is differentiable on \( (a,b) \) and \( f(a) = f(b) \), EVT produces the extremum which (if interior) Fermat's theorem converts into \( f'(\xi) = 0 \).
- Positive continuous functions are bounded away from \( 0 \). If \( f \gt 0 \) on \( [a,b] \) then \( \inf f = f(c) \gt 0 \). (Worked Example 1 below.)
- Converse fails. Attaining a max and a min does not imply continuity: \( f(1/2) = 1 \), \( f(x) = 0 \) otherwise on \( [0,1] \) attains max \( 1 \) and min \( 0 \) yet is discontinuous at \( 1/2 \). Even "attains max and min on every closed subinterval" fails to force continuity (same example).
Fails without
- Drop closedness: \( f(x) = x \) on \( (0,1) \) — continuous, bounded, attains neither \( \sup = 1 \) nor \( \inf = 0 \). Worse, \( f(x) = 1/x \) on \( (0,1] \) is continuous and unbounded.
- Drop boundedness of the domain: \( f(x) = x \) on \( [0,\infty) \) is continuous on a closed set and unbounded above; \( f(x) = \arctan x \) on \( \mathbb{R} \) is bounded but attains no extremum.
- Drop continuity at one point: \( f(0) = 0 \), \( f(x) = 1/x \) on \( (0,1] \): unbounded on \( [0,1] \). Bounded variant: \( f(x) = x \) on \( [0,1) \), \( f(1) = 0 \): supremum \( 1 \) not attained.
- Drop completeness: on \( [0,2] \cap \mathbb{Q} \), \( f(x) = \dfrac{1}{x^2 - 2} \) is continuous at every point of its domain yet unbounded — the "hole" at \( \sqrt{2} \) is invisible to \( \mathbb{Q} \) but fatal to EVT.
Common errors
- Sup–max conflation. Writing "\( f \) is bounded, so it has a maximum". Boundedness gives a supremum (by completeness); attainment is exactly what EVT adds, and it needs closedness plus continuity.
- Open-interval smuggling. Invoking EVT on \( (a,b) \), \( [a,b) \), or \( [a,\infty) \). The theorem is silent there; extrema may or may not exist and each case needs its own argument (e.g. coercivity, as in Problem 4).
- "The max is where \( f' = 0 \)". EVT guarantees a maximiser; Fermat's theorem only constrains interior ones. Forgetting endpoint candidates (or points of non-differentiability) loses genuine extrema — see Worked Example 2, where the maximum sits at an endpoint too.
- Uniqueness assumption. EVT asserts existence, never uniqueness: \( \sin \) on \( [0, 4\pi] \) attains its maximum twice.
- Circularity in proofs. Using the mean value theorem (which rests on Rolle, which rests on EVT) inside a proof of EVT.
- Vector-valued misuse. Quoting EVT for \( f : [a,b] \to \mathbb{R}^2 \): with no order on \( \mathbb{R}^2 \), "maximum" is meaningless; only \( \|f\| \) (a real-valued continuous function) has one.
Discussion
Historically the theorem crystallised in two stages. Bernard Bolzano proved the boundedness half around 1830 (in work unpublished until the twentieth century), and Karl Weierstrass, in his Berlin lectures of the 1860s, proved attainment — which is why the result is often called the Weierstrass extreme value theorem. It belongs to the same rigorisation programme as the intermediate value theorem and the modern \( \varepsilon\text{-}\delta \) definition of continuity: replacing the geometric self-evidence of "a curve has a highest point" with proofs traceable to the completeness of \( \mathbb{R} \).
The two classical proofs are worth contrasting. The sequential proof given above leans on Bolzano–Weierstrass; an alternative bisection proof repeatedly halves \( [a,b] \), always keeping a half on which \( f \) has the same supremum, and uses the nested interval property. Both are avatars of the same fact: closed bounded intervals are compact. Once the language of topology is available, EVT factors into two clean statements — the continuous image of a compact set is compact (open-cover argument: pull back a cover of the image), and a compact subset of \( \mathbb{R} \) contains its supremum and infimum. That factorisation is the correct generalisation: it holds for continuous real-valued functions on any compact topological space, which is why EVT survives intact in \( \mathbb{R}^n \) (Heine–Borel: compact \( = \) closed and bounded) and on closed bounded sets far stranger than intervals.
EVT is also the prototype of every existence theorem in optimisation. "Minimise a cost over a constraint set" is answerable in the affirmative the moment the cost is continuous and the constraint set compact — this is precisely how one proves that a best polynomial approximation exists, that a continuous function on a compact set is uniformly continuous (via an EVT-adjacent compactness argument), and that shortest paths exist in reasonable geometric settings. When compactness fails, the failure modes in the "Fails without" list are exactly the pathologies optimisers meet in practice: minimising sequences that escape to infinity or converge to a point outside the feasible set.
Two refinements matter at the frontier of analysis. First, full continuity is more than the maximum needs: an upper semicontinuous function on a compact set attains its supremum (run Steps 5–8 above, replacing sequential continuity by \( \limsup_{k} f(y_{n_k}) \le f(d) \), which combined with \( f(y_{n_k}) \to M \ge f(d) \) still forces \( f(d) = M \)); dually, lower semicontinuous functions attain their infimum. This asymmetric weakening is the engine of Tonelli's direct method in the calculus of variations, where integral functionals are rarely continuous but often weakly lower semicontinuous on weakly compact sets. Second, in infinite-dimensional normed spaces closed bounded sets are never compact (Riesz's lemma), so EVT genuinely fails there — continuous functionals on the closed unit ball of an infinite-dimensional Hilbert space need not attain their infimum — and recovering existence requires weak topologies, convexity, or reflexivity. The theorem thus marks the boundary between finite- and infinite-dimensional analysis. Foundationally, note that Step 1 invokes countable choice to select \( (x_n) \); over ZF alone the standard proof needs minor rearrangement, and constructively (in Bishop's sense) EVT holds only in the weakened form "the supremum exists", attainment being nonconstructive.
Common misconceptions. EVT does not say the extremum is unique, does not say it lies in the interior, does not locate it at all, and does not require differentiability anywhere. Conversely, it is not "obvious": its truth depends on completeness, as the \( \mathbb{Q} \) counterexample shows, and any proof must use completeness somewhere — through Bolzano–Weierstrass, nested intervals, or the supremum property.
Worked examples
Example 1 (bounded away from zero). Let \( f : [a,b] \to \mathbb{R} \) be continuous with \( f(x) \gt 0 \) for every \( x \in [a,b] \). Show there exists \( \delta \gt 0 \) such that \( f(x) \ge \delta \) for all \( x \in [a,b] \). (Note this is false on \( (0,1] \): take \( f(x) = x \).)
Reading. On a compact interval, "strictly positive at every point" self-upgrades to "uniformly bounded below by a positive constant". This lemma is used constantly: it shows \( 1/f \) is continuous and bounded, and it underlies estimates in integration and ODE theory.
Scope. Needs both compactness and continuity; on \( (0,1] \) with \( f(x) = x \) the infimum is \( 0 \) and no such \( \delta \) exists.
Example 2 (locating global extrema). Find the global maximum and minimum of \( f(x) = x^3 - 3x + 1 \) on \( [-2, 2] \), justifying existence before computing anything.
Reading. EVT certifies that the candidate list is exhaustive for global extrema — the comparison of four numbers settles the problem completely. Note both extrema are attained twice: once at an endpoint and once at an interior critical point, illustrating that EVT promises existence, not uniqueness or location.
Scope. The candidate method is valid whenever \( f \) is continuous on \( [a,b] \) and differentiable except at finitely many points (which then join the candidate list).
Problems
- Find the global maximum and minimum of \( f(x) = x^2 - 4x + 1 \) on \( [0,3] \), citing every theorem you use.
Solution
\( f \) is a polynomial, hence continuous on the closed bounded interval \( [0,3] \); by the extreme value theorem the global maximum and minimum exist and are attained. By Fermat's theorem, extrema occur at endpoints or interior critical points. \( f'(x) = 2x - 4 = 0 \iff x = 2 \in (0,3) \). Evaluate: \( f(0) = 1 \), \( f(2) = 4 - 8 + 1 = -3 \), \( f(3) = 9 - 12 + 1 = -2 \). Comparing, the global maximum is \( 1 \), attained at \( x = 0 \), and the global minimum is \( -3 \), attained at \( x = 2 \). (Without EVT the comparison would only show these are the extreme candidates; EVT is what makes the list conclusive.)
- Give an example of a continuous bounded function on \( (0,1) \) that attains neither its supremum nor its infimum. State precisely which hypothesis of EVT fails and where your function's sup and inf "live".
Solution
Take \( f(x) = x \) on \( (0,1) \). It is continuous and bounded, with \( \sup_{(0,1)} f = 1 \) and \( \inf_{(0,1)} f = 0 \). Neither is attained: \( f(x) = 1 \) would force \( x = 1 \notin (0,1) \), and similarly for \( 0 \). The failing hypothesis is closedness of the domain: \( (0,1) \) is bounded but not closed, so it is not compact. The sup and inf are "attained in the limit" at the missing endpoints — sequences \( x_n \to 1 \) and \( x_n \to 0 \) are maximising and minimising sequences whose limits escape the domain. This is exactly the escape that Step 3 of the main proof (limits stay in \( [a,b] \)) rules out for closed intervals. A more dramatic variant: \( f(x) = \sin(1/x) \) on \( (0,1) \) has \( \sup = 1 \) and \( \inf = -1 \), both attained infinitely often — showing that failure of attainment is possible but not forced when compactness fails.
- Let \( f : [0,1] \to \mathbb{R} \) be continuous with \( f(x) \gt 0 \) for all \( x \in [0,1] \). Prove that \( g = 1/f \) is bounded on \( [0,1] \), and show by example that this fails on \( (0,1] \).
Solution
By EVT (minimum half), \( f \) attains its minimum: there is \( c \in [0,1] \) with \( f(x) \ge f(c) \) for all \( x \). Since \( f(c) \gt 0 \) by hypothesis, set \( m := f(c) \gt 0 \). Then for every \( x \in [0,1] \), \[ 0 \lt g(x) = \frac{1}{f(x)} \le \frac{1}{m}, \] using that \( t \mapsto 1/t \) is decreasing on \( (0,\infty) \). Hence \( g \) is bounded by \( 1/m \). (One can also note \( g \) is continuous as a quotient of continuous functions with nonvanishing denominator, and apply EVT to \( g \) directly — but the argument above shows the bound comes from the minimum of \( f \).) Failure on \( (0,1] \): take \( f(x) = x \), continuous and strictly positive there, yet \( g(x) = 1/x \) is unbounded as \( x \to 0^{+} \). The domain \( (0,1] \) is not closed, so EVT does not apply and \( \inf f = 0 \) is not attained.
- Let \( f : \mathbb{R} \to \mathbb{R} \) be continuous and coercive: \( f(x) \to +\infty \) as \( x \to +\infty \) and as \( x \to -\infty \). Prove that \( f \) attains a global minimum on \( \mathbb{R} \). (EVT does not apply directly — \( \mathbb{R} \) is not bounded.)
Solution
Fix the value \( f(0) \). By coercivity (definition of the two infinite limits with threshold \( f(0) \)): there exists \( R \gt 0 \) such that \[ |x| \gt R \implies f(x) \gt f(0). \] (Choose \( R_1 \) for \( x \to +\infty \), \( R_2 \) for \( x \to -\infty \), and let \( R = \max\{R_1, R_2, 1\} \).) Now restrict to the closed bounded interval \( [-R, R] \): \( f \) is continuous there, so by EVT it attains a minimum at some \( c \in [-R,R] \): \[ f(c) \le f(x) \quad \forall x \in [-R,R]. \] In particular \( f(c) \le f(0) \), since \( 0 \in [-R,R] \). We claim \( c \) is a global minimiser. Let \( x \in \mathbb{R} \) be arbitrary. If \( |x| \le R \), then \( f(x) \ge f(c) \) by the displayed inequality. If \( |x| \gt R \), then \( f(x) \gt f(0) \ge f(c) \). Either way \( f(x) \ge f(c) \), so \( f(c) = \min_{\mathbb{R}} f \). \(\blacksquare\)
Remark: this "compactify by coercivity" pattern is the standard route to existence on unbounded domains, and the one-dimensional model of the direct method of the calculus of variations. Note the maximum genuinely need not exist here: \( f(x) = x^2 \) is coercive with no global max.
- (Harder.) Let \( f : [a,b] \to \mathbb{R} \) be continuous, and suppose that for every \( x \in [a,b] \) there exists \( y \in [a,b] \) with
\[ |f(y)| \le \tfrac{1}{2} |f(x)|. \]
Prove that \( f \) has a zero in \( [a,b] \). Show by example that the conclusion fails on \( (0,1] \).
Solution
The function \( |f| \) is continuous on \( [a,b] \) (composition of \( f \) with the continuous absolute value). By EVT it attains its minimum: there exists \( c \in [a,b] \) with \[ |f(c)| \le |f(x)| \quad \forall x \in [a,b]. \] Apply the hypothesis at \( x = c \): there is \( y \in [a,b] \) with \( |f(y)| \le \tfrac{1}{2}|f(c)| \). But minimality of \( |f(c)| \) gives \( |f(c)| \le |f(y)| \). Chaining, \[ |f(c)| \le |f(y)| \le \tfrac{1}{2} |f(c)| \implies \tfrac{1}{2}|f(c)| \le 0 \implies |f(c)| = 0, \] so \( f(c) = 0 \). \(\blacksquare\)
The whole proof is EVT: without attainment, the halving hypothesis only drives the infimum of \( |f| \) to \( 0 \), which does not produce a zero. Counterexample on the non-compact domain \( (0,1] \): take \( f(x) = x \). For any \( x \in (0,1] \), the point \( y = x/2 \in (0,1] \) satisfies \( |f(y)| = x/2 = \tfrac{1}{2}|f(x)| \), so the hypothesis holds, yet \( f(x) = x \gt 0 \) has no zero on \( (0,1] \). The infimum \( 0 \) of \( |f| \) is not attained precisely because \( (0,1] \) is not closed.