In short
The standard derivative tests for maxima and minima assume the function is differentiable everywhere. When a function has corners, cusps, or is restricted to a closed interval, those tests miss important extrema. In such cases, you must also check endpoints and points of non-differentiability. The Extreme Value Theorem guarantees that a continuous function on a closed interval always attains both its global maximum and global minimum.
Take f(x) = |x| on the interval [-2, 3]. Where is the minimum?
Your instinct says: set f'(x) = 0 and solve. But f'(x) = -1 for x < 0 and f'(x) = 1 for x > 0. The derivative is never zero. Does that mean the function has no minimum?
Look at the graph. The function reaches its lowest value at x = 0, where f(0) = 0. That is clearly a minimum — lower than every nearby point. But the derivative at x = 0 does not exist. The function has a sharp corner there, and the standard test f'(c) = 0 never catches it.
This is the first lesson: extrema can occur at points where the derivative does not exist. The standard first derivative test finds extrema only among critical points where f'(c) = 0. But there are other places to look.
Three places where extrema can hide
For a function f defined on some domain, extrema can occur at exactly three types of points:
- Stationary points: where f'(c) = 0 — the usual critical points with horizontal tangent lines.
- Points of non-differentiability: where f'(c) does not exist — corners, cusps, and vertical tangents.
- Endpoints: if the domain is a closed interval [a, b], the endpoints a and b must be checked separately.
The first derivative test only covers type 1. This article is about types 2 and 3.
Non-differentiable functions
Corners
The simplest case is a corner — a point where the graph makes a sharp turn. At a corner, the left-hand and right-hand derivatives exist but are different, so the derivative itself does not exist.
For f(x) = |x|, the point x = 0 is a local (and global) minimum. The function decreases as you approach from the left (slope -1) and increases as you leave to the right (slope +1). The sign change in the derivative — from negative to positive — is exactly the condition the first derivative test looks for at a minimum. The only difference is that the transition happens through a jump rather than through zero.
Cusps
A cusp is a sharper version of a corner. At a cusp, both one-sided derivatives exist but one goes to +\infty and the other to -\infty (or both go to +\infty or both to -\infty).
Take f(x) = x^{2/3}. The derivative is f'(x) = \frac{2}{3}x^{-1/3} = \frac{2}{3\sqrt[3]{x}}.
As x \to 0^+, f'(x) \to +\infty. As x \to 0^-, f'(x) \to -\infty. The tangent line is becoming vertical from both sides. At x = 0, the derivative does not exist — the function has a cusp.
The cusp at x = 0 is clearly a minimum: x^{2/3} \geq 0 for all real x, and f(0) = 0. But the derivative is undefined there, so the test f'(c) = 0 would never find it.
How to handle non-differentiable points
The approach is straightforward:
- Compute f'(x) wherever it exists.
- Find all points where f' is zero (stationary points) and all points where f' does not exist (corners, cusps, vertical tangents).
- Evaluate f at every such point.
- Use the sign of f' on each side of these points to classify them as local maxima, local minima, or neither.
The sign-change test works exactly the same way at a corner or cusp as at a stationary point: if f' changes from negative to positive, you have a local minimum; if from positive to negative, a local maximum.
Endpoints of intervals
When a function is defined on a closed interval [a, b], the endpoints require special attention.
Consider f(x) = x^2 on [-1, 3]. The derivative is f'(x) = 2x, which is zero only at x = 0. The first derivative test says x = 0 is a local minimum (slope goes from negative to positive). So f(0) = 0 is the minimum.
But what about the maximum? f'(x) = 2x is positive for all x > 0, so the function is increasing on (0, 3]. It keeps climbing to the right. The highest value is at the right endpoint: f(3) = 9.
The endpoint x = 3 gives the global maximum, but the derivative there is f'(3) = 6 \neq 0. There is nothing special about the derivative at an endpoint maximum — the function simply runs out of domain before it can start decreasing. Endpoints are not found by solving f'(x) = 0; they must be checked separately.
Endpoint behaviour
At a left endpoint x = a:
- If f'(a) > 0, the function is increasing away from a, so a gives a local minimum.
- If f'(a) < 0, the function is decreasing away from a, so a gives a local maximum.
At a right endpoint x = b:
- If f'(b) > 0, the function was increasing toward b, so b gives a local maximum.
- If f'(b) < 0, the function was decreasing toward b, so b gives a local minimum.
Global vs local extrema
This is the distinction that matters most in applications. A local extremum is a point that is higher (or lower) than all nearby points. A global (or absolute) extremum is the highest (or lowest) point over the entire domain.
Every global extremum is automatically a local extremum. But a local extremum is not necessarily global — a function can have many local hills and valleys, and only the tallest hill is the global maximum.
The closed interval method
On a closed interval [a, b], finding the global maximum and minimum is a finite procedure:
Step 1. Find all critical points of f in (a, b) — both where f'(x) = 0 and where f'(x) does not exist.
Step 2. Evaluate f at every critical point and at both endpoints a and b.
Step 3. The largest value is the global maximum. The smallest is the global minimum.
That is the entire algorithm. No sign-change analysis needed — just compute the function value at every candidate and compare.
Why this works: the Extreme Value Theorem
Extreme Value Theorem
If f is continuous on a closed interval [a, b], then f attains its global maximum and global minimum on [a, b]. That is, there exist points c, d \in [a, b] such that f(c) \leq f(x) \leq f(d) for all x \in [a, b].
Both conditions — continuity and closed interval — are essential.
- Without continuity: the function f(x) = 1/x on [{-1}, 1] (excluding 0) is not continuous on the interval, and it takes arbitrarily large positive and negative values near 0. No maximum or minimum.
- Without a closed interval: the function f(x) = x on the open interval (0, 1) gets arbitrarily close to both 0 and 1 but never actually reaches either. There is no minimum value and no maximum value.
The Extreme Value Theorem says that if both conditions hold, the global extrema are guaranteed to exist. And since a continuous function on a closed interval can only achieve extrema at critical points or endpoints, the closed interval method finds them all.
Worked examples
Example 1: Global extrema of $f(x) = 2x^3 - 3x^2 - 12x + 5$ on $[-2, 4]$
Step 1. Find critical points.
Setting f'(x) = 0: x = 2 and x = -1. Both lie in (-2, 4), so both are candidates.
Why: the derivative is a polynomial, so it exists everywhere. The only critical points are where f'(x) = 0.
Step 2. Evaluate f at the critical points and endpoints.
Why: the closed interval method requires comparing the function value at every candidate. No sign-change analysis needed — just arithmetic.
Step 3. Compare all values.
| Point | f value | Type |
|---|---|---|
| x = -2 (endpoint) | 1 | |
| x = -1 (critical) | 12 | local max |
| x = 2 (critical) | -15 | local min |
| x = 4 (endpoint) | 37 |
Why: the largest value tells you the global maximum; the smallest tells you the global minimum.
Step 4. Read off the answer.
Why: the global extrema are simply the extreme values from the comparison table.
Result: The global maximum is 37 at x = 4 (an endpoint). The global minimum is -15 at x = 2 (a critical point).
The key takeaway: the global maximum turned out to be at an endpoint, not at a critical point. If you had only checked where f'(x) = 0, you would have missed it entirely.
Example 2: Extrema of $f(x) = |2x - 3|$ on $[0, 4]$
This function has a corner, so the standard derivative test misses the key point.
Step 1. Rewrite the function in piecewise form.
Why: the absolute value creates two linear pieces. The expression inside, 2x - 3, is zero at x = 3/2, which is where the corner occurs.
Step 2. Find critical points.
For x < 3/2: f'(x) = -2. For x > 3/2: f'(x) = 2. The derivative is never zero, but it is undefined at x = 3/2 (the left and right derivatives are -2 and +2, which disagree). So x = 3/2 is a critical point.
Why: at a corner, the derivative does not exist. This is a critical point just as much as a point where f'(x) = 0.
Step 3. Evaluate f at the critical point and endpoints.
Why: three candidates, three function values — compare and conclude.
Step 4. Compare.
Why: the smallest value is the global minimum, the largest is the global maximum.
Result: The global minimum is 0 at x = 3/2 (the corner). The global maximum is 5 at x = 4 (an endpoint).
Neither of these extrema is a stationary point. One is a corner, the other is an endpoint. The closed interval method catches both because it does not rely on f'(x) = 0 alone — it checks every type of candidate.
Common confusions
-
"If f'(c) does not exist, then c cannot be an extremum." Exactly backwards. Non-differentiable points are among the most common locations for extrema. The absolute value function has its minimum at its corner.
-
"The global maximum of a function always occurs where f'(x) = 0." Only if the domain is an open interval (or all of \mathbb{R}) and the function is differentiable everywhere. On a closed interval, the global maximum might be at an endpoint. With a non-differentiable function, it might be at a corner or cusp.
-
"A continuous function always has a maximum." Only on a closed interval. On an open interval like (0, 1), even a continuous function like f(x) = x has no maximum — it gets arbitrarily close to 1 but never reaches it. On an unbounded domain like \mathbb{R}, f(x) = x clearly has no maximum.
-
"Local maximum means the function value is large." A local maximum just means the value is larger than at all nearby points. The function f(x) = -x^4 + x has a local maximum at a certain point, but the function value there could be negative. "Maximum" is a relative term, not an absolute statement about size.
Going deeper
If you came here to learn about endpoints and non-differentiable extrema, you have it — you can stop here. What follows is the proof of the Extreme Value Theorem and some additional subtleties.
Why the Extreme Value Theorem is true (sketch)
The full proof uses the completeness of the real numbers — a deep property that distinguishes the reals from the rationals. Here is the key idea.
Let f be continuous on [a, b]. The set of all values \{f(x) : x \in [a, b]\} is bounded above (this uses the Boundedness Theorem, which says continuous functions on closed intervals are bounded). So this set has a least upper bound M — the supremum.
Now you need to show that some c \in [a, b] actually achieves f(c) = M. The argument: there is a sequence x_1, x_2, x_3, \ldots in [a, b] such that f(x_n) \to M. Since [a, b] is closed and bounded, the Bolzano-Weierstrass theorem guarantees a convergent subsequence x_{n_k} \to c for some c \in [a, b]. By continuity, f(c) = \lim f(x_{n_k}) = M. So the maximum is attained.
The same argument works for the minimum.
Darboux's theorem: a constraint on derivatives
There is a surprising fact about derivatives that constrains how they can behave.
Darboux's theorem states: if f is differentiable on [a, b], then f' satisfies the intermediate value property. That is, if f'(a) < k < f'(b) (or vice versa), then there exists some c \in (a, b) with f'(c) = k.
This means a derivative cannot jump — it must pass through every intermediate value, just like a continuous function. A derivative can be discontinuous (and there exist differentiable functions whose derivatives are discontinuous), but it cannot have a jump discontinuity.
The relevance here: at a corner of a continuous function, the left and right derivatives are different, and there is no derivative at the corner itself. Darboux's theorem does not apply because the function is not differentiable at the corner. This is why corners can produce extrema — the derivative "jumps" past zero without ever equalling zero.
Functions on open intervals
On an open interval (a, b) or on all of \mathbb{R}, a continuous function need not have a global maximum or minimum. But it can have local extrema. The first derivative test and second derivative test work for local extrema without any change. The only thing you lose is the guarantee that global extrema exist.
If a function on an open interval does have a global extremum, it must occur at a critical point (where f'(c) = 0 or f'(c) does not exist). There are no endpoints to check. So on open domains, the equation f'(x) = 0 combined with checking non-differentiable points is the complete strategy for finding all possible extrema.
Where this leads next
- Optimization Problems — applying the closed interval method and endpoint analysis to real-world problems in geometry, physics, and economics.
- Concavity and Points of Inflection — using the second derivative to understand the shape of a curve between its extrema.
- Curve Sketching — combining all the derivative tools — critical points, endpoints, concavity, inflection — into a complete sketch.
- Maxima and Minima - Second Derivative Test — the other main test for classifying critical points.
- Maxima and Minima - First Derivative Test — the foundational test, which works even where the second derivative test fails.