The Candidates Test
The test
The reason is short. Since is continuous on a closed interval, the Extreme Value Theorem guarantees that an absolute maximum exists. Suppose it occurs at a point inside . Then for every near , so has a relative maximum at . By Fermat's theorem, is a critical point. So the maximum is at a critical point or at an endpoint, and the same argument works for the minimum.
The test never asks which critical points are relative extrema. A critical point where has no extremum, or a relative maximum lower than an endpoint, loses the comparison, as does above.
Both hypotheses are needed. If isn't continuous on , or the interval isn't closed, there may be no absolute maximum at all. Then the largest of a few computed values proves nothing. An absolute maximum is a value of , so state the value and the where it occurs.
A polynomial
Where f′ doesn't exist
A critical point is a point of the domain where or where doesn't exist. Both kinds go on the list.
A trigonometric function
Critical points outside the interval
Only critical points inside are candidates. A critical point outside the interval says nothing about the values of on . When none lies inside, the extrema are at the endpoints.
From a table
The test needs only the values of at the candidates. When those come from a table, sign information about locates the critical points. It can also show that a missing value isn't an extremum.