Why Candidate Checks Need a Theorem
When optimizing a function on a closed interval, checking the endpoints and interior critical points is a familiar strategy. Two theorems explain why this strategy can find an absolute maximum and minimum: continuity on a closed bounded interval guarantees that both extrema are attained, and differentiability forces any interior extremum to have derivative zero.
These facts justify where to look. They do not, by themselves, guarantee that there are only finitely many points to check. That distinction matters: the candidate method gives a finite list only when the relevant endpoints and interior critical points form a finite set.
Continuity Guarantees Attainment
A function is continuous on \([a,b]\) if it is continuous at every point of that interval, with continuity at an endpoint understood relative to the interval. The extreme value theorem says that continuity on a closed bounded interval is enough to ensure that an absolute maximum and an absolute minimum exist.
The word attains is essential. The theorem guarantees that the greatest and least function values actually occur at points in the interval; it does not merely guarantee that the function values have a supremum and infimum.
Why the Extreme Value Theorem Holds
Here is a proof using the Bolzano–Weierstrass theorem: every bounded sequence of real numbers has a convergent subsequence. Since \([a,b]\) is closed, the limit of a convergent sequence in \([a,b]\) also belongs to \([a,b]\).
If \(f\) were unbounded on \([a,b]\), we could choose \(x_n\in[a,b]\) with \(|f(x_n)|>n\) for each \(n\in\mathbb{N}\). The sequence \((x_n)\) is bounded, so it has a subsequence \(x_{n_k}\) converging to some \(c\in[a,b]\). Continuity would imply \(f(x_{n_k})\to f(c)\), a finite real number. But \(|f(x_{n_k})|>n_k\) and \(n_k\to\infty\), a contradiction. Therefore \(f\) is bounded.
Because the values of \(f\) are bounded, they have a supremum \(M=\sup\{f(x):x\in[a,b]\}\). By the definition of supremum, for each \(n\in\mathbb{N}\) we can choose \(x_n\in[a,b]\) such that \(M-\frac1n<f(x_n)\le M\).
A subsequence \(x_{n_k}\) converges to some \(c_{\max}\in[a,b]\). Continuity gives \(f(x_{n_k})\to f(c_{\max})\). The inequalities \(M-\frac1{n_k}<f(x_{n_k})\le M\) show that \(f(x_{n_k})\to M\). Limits are unique, so \(f(c_{\max})=M\). Thus \(f\) attains its absolute maximum.
Apply the same maximum argument to the continuous function \(-f\). It attains a maximum at some \(c_{\min}\in[a,b]\). Thus \(-f(c_{\min})\ge -f(x)\) for every \(x\in[a,b]\), which is equivalent to \(f(c_{\min})\le f(x)\). Therefore \(f\) attains its absolute minimum as well.
Why an Interior Extremum Must Be Stationary
Attainment alone does not tell us where an extremum occurs. For an interior point, differentiability supplies a necessary condition. A point \(c\in(a,b)\) is an interior local maximum if \(f(x)\le f(c)\) for all \(x\) sufficiently close to \(c\); a local minimum is defined with the inequality reversed. An absolute extremum at an interior point is also a local extremum.
To prove the result, first suppose \(c\) is a local maximum. For all sufficiently small positive \(h\), the local maximum condition gives \(f(c+h)-f(c)\le0\). Dividing by \(h>0\) gives $$ \frac{f(c+h)-f(c)}{h}\le0. $$ For all sufficiently small negative \(h\), the numerator is still nonpositive but the denominator is negative, so $$ \frac{f(c+h)-f(c)}{h}\ge0. $$ Because \(f\) is differentiable at \(c\), both one-sided limits of these difference quotients equal \(f'(c)\). The quotients from positive \(h\) are nonpositive, so their limit is at most zero; those from negative \(h\) are nonnegative, so their limit is at least zero. Hence \(f'(c)\le0\) and \(f'(c)\ge0\), and therefore \(f'(c)=0\). At a local minimum, the inequalities reverse, giving the same conclusion.
This is a necessary condition, not a guarantee: a point with derivative zero need not be an extremum. Also, the theorem applies only at interior points where the function is differentiable. Endpoints and interior points where the derivative does not exist require separate consideration.
How the Results Locate Absolute Extrema
Suppose \(f\) is continuous on \([a,b]\) and differentiable at every point of \((a,b)\). The extreme value theorem guarantees that absolute extrema are attained. If an extremum is at an endpoint, it is among \(a\) and \(b\). If it occurs at an interior point, Fermat’s theorem says the derivative there is zero.
This conclusion explains the logic behind endpoint-and-critical-point checks. It does not say every candidate is an extremum, or that the candidate set is finite. The examples show both limitations.
Worked Example: A Finite Candidate Set
Find the absolute extrema of \(f(x)=x^2-2x\) on \([0,3]\). The function is a polynomial, so it is continuous on \([0,3]\) and differentiable on \((0,3)\). Its derivative is $$ f'(x)=2x-2. $$ A stationary point satisfies \(2x-2=0\), so \(2x=2\) and \(x=1\). The candidate points are therefore \(0,1,3\). Evaluate the function at each: $$ f(0)=0^2-2(0)=0,\qquad f(1)=1^2-2(1)=-1,\qquad f(3)=3^2-2(3)=9-6=3. $$ The least of these values is \(-1\), and the greatest is \(3\). Thus the absolute minimum is \(-1\) at \(x=1\), and the absolute maximum is \(3\) at \(x=3\). To check the candidates, the derivative vanishes at \(1\), and substitution confirms all three listed function values.
Worked Example: A Nondifferentiable Interior Extremum
Consider \(f(x)=|x|\) on \([-1,1]\). This function is continuous on the closed interval, so it attains both absolute extrema. For \(x<0\), \(f(x)=-x\), and for \(x>0\), \(f(x)=x\). The left and right derivatives at \(0\) are \(-1\) and \(1\), respectively, so \(f'(0)\) does not exist. The endpoints and this nondifferentiable interior point must be checked: $$ f(-1)=|-1|=1,\qquad f(0)=|0|=0,\qquad f(1)=|1|=1. $$ For every \(x\in[-1,1]\), \(0\le |x|\le1\). Therefore the absolute minimum is \(0\) at \(x=0\), and the absolute maximum is \(1\) at both endpoints. The interior minimum does not contradict Fermat’s theorem, because the function is not differentiable at \(0\).
Worked Example: A Stationary Point Need Not Be an Extremum
Let \(f(x)=x^3\) on \([-1,2]\). It is continuous on the interval and differentiable in its interior. Its derivative is $$ f'(x)=3x^2. $$ The equation \(3x^2=0\) gives the interior candidate \(x=0\). The full candidate list is \(x=-1,0,2\), and the corresponding values are $$ f(-1)=(-1)^3=-1,\qquad f(0)=0^3=0,\qquad f(2)=2^3=8. $$ Thus the absolute minimum is \(-1\) at \(x=-1\), and the absolute maximum is \(8\) at \(x=2\). The stationary point \(0\) is not a local extremum: if \(x<0\), then \(x^3<0\), while if \(x>0\), then \(x^3>0\). It is included because it satisfies the necessary condition, not because that condition guarantees an extremum. Substitution confirms the candidate values, and differentiating \(x^3\) returns \(3x^2\).
When Are There Finitely Many Candidates?
To conclude that a finite comparison suffices, the candidate set must actually be finite. Continuity on a closed bounded interval guarantees extrema, and Fermat’s theorem restricts differentiable interior extrema to points where the derivative is zero. Neither theorem says that the equation \(f'(x)=0\) has only finitely many solutions.
For example, take the constant function \(f(x)=5\) on \([0,1]\). It is continuous and differentiable, and $$ f'(x)=0\qquad\text{for every }x\in(0,1). $$ Every point of the interval is an absolute maximum and an absolute minimum, and there are infinitely many stationary points. The theorem’s conclusions hold, but there is no finite list of all candidate points.
Common Mistake: Treating a Necessary Condition as a Guarantee
A common error is to infer that every point where \(f'(c)=0\) is a maximum or minimum. For \(f(x)=x^3\), the calculation \(f'(0)=0\) is correct, but the function takes negative values just to the left of \(0\) and positive values just to its right. So \(0\) is not an extremum. Fermat’s theorem runs in one direction: a differentiable interior extremum must have derivative zero; a zero derivative alone does not establish an extremum.
Another error is to assume that the extreme value theorem guarantees finitely many points to check. The constant-function example disproves that claim. The theorem guarantees attainment, while finiteness requires an additional fact about the candidate set.
Why These Results Matter
Optimization requires more than finding a point where the derivative vanishes. One must know that an absolute best value exists and that the search includes every possible location where it could occur. The extreme value theorem supplies existence on a closed bounded interval; Fermat’s theorem identifies the differentiable interior locations that must be considered. Endpoints matter because the interior derivative condition does not apply there, and nondifferentiable points matter because differentiability is part of Fermat’s hypothesis.
Together, these results provide a rigorous basis for candidate checks. They also tell you what to verify before treating such a check as a finite calculation: the function must satisfy the relevant continuity conditions, all types of candidates must be included, and the candidate set must in fact be finite.
Check Your Understanding
Answer these questions using the hypotheses of the theorems, not just their conclusions.
- What does the extreme value theorem guarantee for a continuous function on \([a,b]\)?
- Why does a differentiable local maximum at an interior point have derivative zero?
- Why must a nondifferentiable interior point be considered separately?
- Does \(f'(c)=0\) prove that \(c\) is a local extremum? Explain using \(f(x)=x^3\).
- Why does the extreme value theorem not imply that there are finitely many candidate points?