Why Endpoints Matter
When an objective is defined on a closed interval, its largest or smallest value may occur at an endpoint, even if there is no horizontal tangent there. Checking only where the derivative is zero can therefore miss the answer to an optimization problem.
The reliable strategy is to find the endpoints and all relevant interior critical points, evaluate the objective function at each, and compare those values. The comparison—not the derivative test by itself—identifies the absolute extrema.
Critical Points and Candidate Values
Let \(f\) be an objective function on the closed interval \([a,b]\), where \(a<b\). An interior critical number is a number \(c\in(a,b)\) such that either \(f'(c)=0\) or \(f'(c)\) does not exist. The corresponding point on the graph is sometimes called a critical point.
The endpoint values \(f(a)\) and \(f(b)\) must be checked separately. An endpoint can be an absolute maximum or minimum without being a critical number: the derivative condition for an interior extremum does not apply at the boundary of the interval.
To compare candidates, calculate their objective values, not their derivative values. The greatest candidate value is the absolute maximum value, and the least is the absolute minimum value. Report both the value and where it occurs. If several candidates have the same greatest or least value, each is a location of the corresponding absolute extremum.
Why the Candidate Method Works
The extreme value theorem says that a continuous real-valued function on a closed, bounded interval \([a,b]\) attains both an absolute maximum and an absolute minimum. It ensures that the extrema exist, but it does not by itself say where to look.
The location follows from a derivative fact often called Fermat’s theorem: if a function has a local maximum or local minimum at an interior point \(c\), and is differentiable at \(c\), then \(f'(c)=0\). Here is the argument for a local maximum.
For sufficiently small positive \(h\), \(c+h\) is in the interval and local maximality gives \(f(c+h)-f(c)\leq 0\). Dividing by \(h>0\) preserves the inequality. For sufficiently small negative \(h\), the numerator is still nonpositive, but dividing by \(h<0\) reverses the inequality. Therefore:
Because \(f\) is differentiable at \(c\), both one-sided limits equal \(f'(c)\). The first inequalities imply \(f'(c)\leq 0\), and the second imply \(f'(c)\geq 0\). Hence \(f'(c)=0\). At a local minimum, the inequalities reverse, and the same conclusion follows.
Now take a point where the absolute maximum on \([a,b]\) is attained. If it is \(a\) or \(b\), it is an endpoint candidate. If it is interior and \(f\) is differentiable there, Fermat’s theorem makes it a critical number with derivative zero. If it is interior and \(f\) is not differentiable there, it is also a critical number by definition. The same reasoning applies to an absolute minimum. Therefore comparing endpoints and all interior critical points captures the absolute extrema.
A Practical Comparison Procedure
Identify the closed feasible interval \([a,b]\) and verify that the objective is continuous throughout it. This is the condition that guarantees the absolute extrema are attained.
Within \((a,b)\), solve \(f'(x)=0\) and also locate points where \(f'(x)\) does not exist but \(f(x)\) is defined.
Compute \(f(a)\), \(f(b)\), and \(f(c)\) for each interior critical number \(c\).
The least value is the absolute minimum; the greatest value is the absolute maximum. Include every location where a tied extreme occurs.
The derivative helps find interior candidates; it does not rank the objective values. This method also does not assume that an interior critical point must be a maximum or minimum: a critical point may be neither, and its value is still included in the comparison.
Worked Comparisons
Worked Example: A Maximum at an Endpoint
Find the absolute minimum and maximum of \(f(x)=x^2-4x+1\) on \([0,5]\).
The function is a polynomial, so it is continuous on \([0,5]\). Differentiate:
Set the derivative equal to zero and solve:
The critical number \(2\) lies inside \((0,5)\). Evaluate the function at that point and at both endpoints:
Among \(1,-3,6\), the least value is \(-3\) and the greatest is \(6\). Thus the absolute minimum is \(-3\) at \(x=2\), and the absolute maximum is \(6\) at \(x=5\). Substitution checks both reported values: \(f(2)=-3\) and \(f(5)=6\). In particular, checking only the critical point would have missed the maximum.
Worked Example: Tied Absolute Extrema
Find the absolute extrema of \(g(x)=x^3-3x\) on \([-2,2]\).
The polynomial \(g\) is continuous on the closed interval. Its derivative is:
Thus \(g'(x)=0\) at \(x=-1\) and \(x=1\), both interior points. Evaluate at both critical numbers and both endpoints:
The greatest candidate value is \(2\), attained at \(x=-1\) and \(x=2\). The least candidate value is \(-2\), attained at \(x=-2\) and \(x=1\). The substitutions verify the ties: \(g(-1)=g(2)=2\), while \(g(-2)=g(1)=-2\). An answer should report all these locations, not just one of them.
Worked Example: A Nondifferentiable Interior Candidate
Find the absolute extrema of \(h(x)=|x|\) on \([-2,1]\).
The absolute-value function is continuous on the interval. For \(x<0\), \(h(x)=-x\), so \(h'(x)=-1\). For \(x>0\), \(h(x)=x\), so \(h'(x)=1\). The derivative does not exist at \(x=0\), which is an interior critical number and must be checked. The derivative is not zero on either open piece, so there are no other interior critical numbers.
Evaluate at the endpoints and at \(0\):
The least value is \(0\), attained at \(x=0\), and the greatest value is \(2\), attained at \(x=-2\). Direct substitution verifies \(h(0)=0\) and \(h(-2)=2\). This example shows why checking only points where the derivative is zero is not sufficient: here the interior minimum occurs where the derivative is undefined.
Common Mistake: Ignoring the Boundary
In the first example, a tempting but incorrect calculation is to solve \(f'(x)=0\), find \(x=2\), and conclude that \(f(2)=-3\) is the absolute maximum because the derivative changes from negative to positive. That conclusion is wrong: it identifies a minimum, and it overlooks the endpoints.
The endpoint check corrects the mistake:
Since \(6>-3\), the absolute maximum is \(6\) at \(x=5\), not the value at the critical point. More generally, a local-maximum or local-minimum test describes behavior near a point; it does not compare that point with the entire feasible interval. Always evaluate the original objective at both endpoints and every interior critical point before deciding.
What to Report in an Optimization Answer
A clear conclusion distinguishes the extreme value from the location where it occurs. For example, “the absolute minimum value is \(-3\), attained at \(x=2\)” gives both. In an applied problem, translate the location and value back into the original variables and include units when relevant.
If different candidates have the same value, report every location attaining it. If the objective is continuous on a closed interval but the list of critical points is not straightforward to enumerate, the endpoint-and-critical-point principle still states what must be considered; it does not, by itself, guarantee that the candidate list is finite or easy to compute.
Check Your Understanding
For each question, identify which locations must be checked and explain what the comparison determines.
- Why must both endpoints be evaluated even when the objective has an interior critical point?
- For a continuous function on \([a,b]\), what kinds of interior points belong in the candidate list?
- If two candidates have the same greatest objective value, how should the absolute maximum be reported?
- Can a point where the derivative does not exist be an interior candidate? Give the reason.
- What condition on the function and interval guarantees that an absolute maximum and minimum are attained?