The Extreme Value Theorem and Critical Points

Absolute and relative extrema

A relative extremum compares f(c)f(c) only with values nearby, on both sides of cc. So it occurs at a point inside the domain. An endpoint of a closed interval can't be a relative extremum under this definition, though it can be an absolute one. An absolute extremum at an interior point is also a relative one.
On [a, b], f has its absolute maximum at c, which is also a relative maximum. Its absolute minimum is at the endpoint a. The relative minimum at d isn't absolute, since f(a) is smaller.

The Extreme Value Theorem

The theorem says the extrema exist. It doesn't say where they are, and either one can be at an endpoint. Each hypothesis is needed: drop either one, and the conclusion can fail.
f(x) = (x − 1)² + 1 on the open interval (0, 3). The minimum is f(1) = 1. The values approach 5 near x = 3 but never reach it, so there's no maximum.
g(x) = x for 0 ≤ x < 2 and g(x) = 3 − x for 2 ≤ x ≤ 4. The values approach 2 near x = 2 from the left, but g(2) = 1, so there's no maximum.
On the left, ff is continuous, but the interval is open. For any xx in (0,3)(0, 3), some point between xx and 33 gives a larger value of ff, so no value is the largest. On the right, the interval is closed, but gg jumps at x=2x = 2. Its values get as close to 22 as we like and never equal 22, so again no value is the largest. Each graph still has an absolute minimum: f(1)=1f(1) = 1 and g(4)=−1g(4) = -1.

Critical points

Suppose ff has a relative maximum at cc, so f(x)≤f(c)f(x) \le f(c) for every xx near cc. For x>cx > c, the quotient f(x)−f(c)x−c\frac{f(x) - f(c)}{x - c} has a numerator ≤0\le 0 and a positive denominator. So the quotient is ≤0\le 0, and its limit as x→c+x \to c^+ is ≤0\le 0. For x<cx < c the denominator is negative, the quotient is ≥0\ge 0, and its limit as x→c−x \to c^- is ≥0\ge 0. Both one-sided limits equal f′(c)f'(c), so f′(c)≤0f'(c) \le 0 and f′(c)≥0f'(c) \ge 0. Thus f′(c)=0f'(c) = 0. A relative minimum works the same way, with the inequalities reversed.
So at a relative extremum, either f′(c)=0f'(c) = 0 or f′(c)f'(c) doesn't exist. Either way cc is a critical point: every relative extremum of ff occurs at a critical point of ff.
A relative maximum where f′(c) exists: the tangent is horizontal, so f′(c) = 0.
A relative minimum at a corner: f′(c) doesn't exist.
y = x³ has a horizontal tangent at 0 and no extremum there.
The converse is false: a critical point needn't be a relative extremum. For f(x)=x3f(x) = x^3, f′(0)=0f'(0) = 0, so 00 is a critical point. But x3<0x^3 < 0 for x<0x < 0 and x3>0x^3 > 0 for x>0x > 0, so f(0)=0f(0) = 0 is neither the largest nor the smallest value near 00.
The graph in Example 1 has three critical points. Its parabola has a horizontal tangent at the vertex, so f′(1)=0f'(1) = 0. At x=−1x = -1 and x=3x = 3 the graph has corners, so f′f' doesn't exist there. The critical points −1-1 and 11 are relative extrema, and 33 isn't. On a closed interval the endpoints aren't counted as critical points. They're checked separately, as candidates for absolute extrema.

Finding critical points

Compute f′f'. Then solve f′(x)=0f'(x) = 0, and find where f′(x)f'(x) doesn't exist. Keep only the numbers that lie in the domain of ff.