Higher than everything nearby
Take . Its derivative is , which is zero at x = −1 and x = 1. The heights there are and .
The point is a local maximum: f(−1) is at least as large as f(x) for every x close enough to −1. Close enough means inside some interval around −1, however small. The point is a local minimum in the same sense, the lowest point in its neighborhood.
Local says nothing about the rest of the curve. A local maximum is the top of one hill, not necessarily the highest point the function ever reaches.
Local and global
Look at the same curve over the window from x = −2.5 to x = 2.5. At the right-hand end the height is , about 2.71, which is higher than the local maximum . So on this window the global maximum, the largest value of all, is at the end x = 2.5, and the local maximum at x = −1 is not it. In the same way, the global minimum on the window is , lower than the local minimum .
Over all real numbers this function has no global maximum at all: grows without bound, so f(x) passes any height you name once x is large enough. Every local extreme is a question about a neighborhood; a global extreme is a question about the whole domain.
The gold curve from x = −2.5 to x = 2.5. The hilltop at is higher than everything near it, but the right-hand end, at height , is higher still; the left-hand end, at , is lower than the trough at .
Critical points
A critical point of f is a number c in the domain of f where either f'(c) = 0 or f'(c) does not exist. Either condition is enough.
For the derivative exists everywhere, so the critical points are the solutions of : x = −1 and x = 1.
The height plays no part in the definition. A critical point is decided by f' alone: f(c) can be 0, positive or negative.
c must be in the domain. For the derivative does not exist at x = 0, but neither does the function, so 0 is not a critical point of . This function has no critical points at all, since is never zero.
Where the derivative does not exist
is the cube root of x, squared. It is 0 at x = 0 and positive everywhere else, so x = 0 is a minimum. Its derivative is , which is never zero, and at x = 0 it does not exist.
The chords show why. From the origin to x = h the chord gradient is : 10 when h = 0.001, and 100 when h = 0.000001. To the left the chords have gradients −10 and −100. The two sides never agree on a gradient, and both grow without bound, so the curve meets the origin in a sharp point, a cusp.
Solving f'(x) = 0 finds nothing here, because is never zero. The minimum is found only because x = 0, where f' does not exist, is on the list of critical points.
A corner does the same. f(x) = |x| has gradient −1 to the left of 0 and 1 to the right, so f'(0) does not exist, and x = 0 is a critical point. It is the minimum of |x|.
the gradients h^(−1/3) and −h^(−1/3) grow without bound with opposite signs as h → 0: a vertical tangent, so f′(0) does not exist
Shrink h on each curve and see whether the two gradients meet
Chords from the origin to x = h and x = −h on . Shrink h: the two gradients, and , grow apart instead of meeting. Switch to and they close on the same number, 0.
Why every interior extreme is critical
Suppose c is inside the domain, not at an end, and f'(c) exists and is not zero. If f'(c) > 0, the curve is climbing through c: just to the right it is higher than f(c), and just to the left it is lower. So f(c) is neither the highest nor the lowest value nearby. If f'(c) < 0 the same holds with the sides swapped.
For at x = 0, f'(0) = −1. Then f(−0.1) = 0.0997 and f(0.1) = −0.0997, rounded, one above f(0) = 0 and one below. Nothing turns at 0.
So at an interior local maximum or minimum, f' is zero or does not exist: every interior local extreme is at a critical point. To find the local extremes, list the critical points; they are the only candidates.
The word interior matters. At an end of an interval the curve can be highest simply because it stops there, with a gradient that is not zero. Those ends are the subject of a later row, absolute extrema on a closed interval.
A critical point need not be an extreme
The converse is false. has derivative , which is 0 at x = 0, so x = 0 is a critical point. But is −0.001 at x = −0.1 and 0.001 at x = 0.1: below 0 on the left, above it on the right. The curve flattens for an instant and climbs straight through.
A critical point where f' does not exist can fail in the same way. has derivative , which does not exist at x = 0, so 0 is critical. The tangent there is vertical, the curve rises through the origin, and there is no peak or trough.
So a critical point is a candidate, not a verdict. Deciding which candidates are peaks, which are troughs and which are neither is the job of the second derivative test and the first derivative test, the next two rows.
The gold curve is flat at the origin, along the gold tangent y = 0, and the dashed curve is vertical there. Both have a critical point at x = 0, and both rise straight through it.
Both kinds on one curve
Take . Its derivative is .
f'(x) = 0 when , so or , which gives x = 1 and x = −1. f'(x) does not exist at x = 0, where is in the denominator. All three are in the domain, so the critical points are −1, 0 and 1, with heights f(−1) = −1 + 3 = 2, f(0) = 0 and f(1) = 1 − 3 = −2.
The drawing shows a peak at (−1, 2), a trough at (1, −2), and at the origin a vertical tangent: just either side of 0, at , the gradient is 1 − 100 = −99, so the curve falls steeply straight through. Of the three critical points, two are extremes and one is not, and solving f' = 0 alone would have missed the third.
The gold curve and its three critical points: f' = 0 at the peak (−1, 2) and the trough (1, −2), and f' does not exist at the origin, where the curve falls through a vertical tangent.
The usual mistakes
Solving only f'(x) = 0. That misses every point where f' does not exist, and with them the cusp minimum of .
Solving f(x) = 0. That finds where the curve crosses the x-axis. The trough of is at height , not on the axis.
Listing a point outside the domain. has no derivative at 0, but it has no value there either, so 0 is not a critical point.
Calling every critical point a maximum or a minimum. and both have a critical point at 0 with no turn there.
Calling a local maximum the global one. On the window from −2.5 to 2.5, the local maximum of is beaten by the end value .