Critical Points and the First and Second Derivative Tests
Find where a function can peak or bottom out, then use sign charts or the second derivative to decide which it is.
Key takeaways
- Critical points are places in the domain where f′ equals zero or is undefined.
- Every interior local extremum is a critical point, but a critical point need not be an extremum.
- First derivative test: a sign change from positive to negative marks a local maximum, and from negative to positive a local minimum.
- Second derivative test: where f′ is zero, f″ negative means a maximum, f″ positive a minimum, and f″ zero decides nothing.
- Absolute extrema on a closed interval require comparing critical values with the endpoint values.
A critical point of a function is a point in its domain where the derivative is either zero or does not exist. Local maxima and minima in the interior of an interval can only occur at such points, so finding them narrows an infinite search to a short list.
Being on the list does not make a point a peak or a valley. The first derivative test decides by checking the sign of the slope on each side. The second derivative test decides by checking which way the curve bends.
Local and absolute extremes
A function f has a local maximum at c if f(c) is at least as large as f(x) for all x near c. It has an absolute maximum there if f(c) is at least as large as every value on the whole domain. Minima are defined the same way with the inequality reversed. The shared word for maxima and minima is extrema.
A result usually credited to Fermat explains where to look. Suppose f has a local extremum at an interior point c and is differentiable there. Then f′(c) = 0. The reason: if the slope were positive, values just to the right would be higher and values just to the left lower, so c could be neither a top nor a bottom. A negative slope fails the same way.
The theorem says nothing about points without a derivative, which is why they go on the list too. The function |x| has its minimum at a corner, one of the situations described in differentiability and continuity.
The first derivative test
Where f′ is positive, f is increasing; where f′ is negative, f is decreasing. So for a function continuous at a critical point c, look at the sign of f′ just before and just after.
Take f(x) = x³ − 3x² − 9x + 5.
f′(x) = 3x² − 6x − 9 = 3(x − 3)(x + 1)
critical points: x = −1 and x = 3 | Interval | Test value | Sign of f′ | Behavior |
|---|---|---|---|
| x < −1 | −2 | f′(−2) = 15, positive | increasing |
| −1 < x < 3 | 0 | f′(0) = −9, negative | decreasing |
| x > 3 | 4 | f′(4) = 15, positive | increasing |
There is a local maximum at x = −1, with f(−1) = 10, and a local minimum at x = 3, with f(3) = −22.
One test value per interval is enough when f′ is continuous, because it cannot change sign without passing through zero, and all zeros are already marked. This relies on the intermediate value theorem.
The second derivative test
The second derivative measures how the slope changes. Suppose f′(c) = 0.
- If f″(c) > 0, the slope is passing upward through zero, so c is a local minimum.
- If f″(c) < 0, the slope is passing downward through zero, so c is a local maximum.
- If f″(c) = 0, the test gives no information.
For the cubic above, f″(x) = 6x − 6. Then f″(−1) = −12, confirming a maximum, and f″(3) = 12, confirming a minimum. No sign chart was needed.
A way to remember the direction: a positive second derivative means the graph is cupped upward and holds water, so a flat spot there is at the bottom.
Why the second derivative test works
Near a critical point with f′(c) = 0, a function with a continuous second derivative behaves approximately like a parabola:
f(c + h) ≈ f(c) + f″(c) · h²/2 The factor h² is positive whether you step left or right. So the sign of f″(c) alone decides whether nearby values are above or below f(c). A positive value lifts both sides, making a valley, and a negative value lowers both sides, making a peak. When f″(c) = 0, this approximation is flat and the behavior is decided by smaller terms that the test never looks at. That is the whole story behind the inconclusive case.
The size of f″(c) carries information too. A large value means a narrow, steep valley or a sharp peak. A value near zero means the function barely changes when you move away, which matters when you care how sensitive a best choice is to small errors.
An example with an exponential
Let p(x) = x² e^(−x). The product and chain rules give:
p′(x) = 2x e^(−x) − x² e^(−x) = x (2 − x) e^(−x) The exponential factor is always positive, so the sign depends only on x(2 − x). The critical points are 0 and 2. The derivative is negative for x < 0, positive between 0 and 2, and negative beyond 2.
That makes x = 0 a local minimum with value 0, and x = 2 a local maximum with value 4/e², about 0.541. What about absolute extremes on the whole real line? Since p is never negative, 0 is the absolute minimum. There is no absolute maximum, because p grows without bound as x heads toward negative infinity. A local test cannot tell you that; you have to look at the ends of the domain.
When the second test is silent
Three simple functions show that f″(0) = 0 allows anything.
| Function | f′(0) and f″(0) | What happens at 0 |
|---|---|---|
| x⁴ | both zero | local minimum |
| −x⁴ | both zero | local maximum |
| x³ | both zero | neither |
Now consider g(x) = x⁴ − 4x³. Here g′(x) = 4x³ − 12x² = 4x²(x − 3), so the critical points are 0 and 3. The second derivative is g″(x) = 12x² − 24x. At 3 it equals 36, giving a local minimum with g(3) = 81 − 108 = −27. At 0 it equals zero, so go back to the first derivative test. The factor x² is positive on both sides of 0, while x − 3 is negative nearby. So g′ is negative on both sides, and there is no extremum at 0, only a momentary flattening.
A higher derivative test extends the idea. If the first nonzero derivative at c has even order, there is an extremum, a minimum if that derivative is positive and a maximum if negative. If it has odd order, three or higher, there is none. Some smooth functions have every derivative zero at a point, and then even this fails.
Critical points without a zero slope
For h(x) = x^(2/3), the derivative is (2/3) x^(−1/3), which is never zero and is undefined at 0. Because h(0) exists, 0 is a critical point. The derivative is negative on the left and positive on the right, so 0 is a local minimum. The second derivative test cannot even be attempted.
Be careful with points outside the domain. Take k(x) = x + 1/x.
k′(x) = 1 − 1/x²
k′(x) = 0 gives x = 1 or x = −1
k″(x) = 2/x³ The derivative is undefined at x = 0, but so is k, so 0 is not a critical point. It still belongs on a sign chart, since the behavior can change across it. At x = −1 the second derivative is −2, giving a local maximum of −2. At x = 1 it is 2, giving a local minimum of 2. The local maximum is lower than the local minimum, which is perfectly possible: "local" compares only with neighbors, and the two points sit on separate branches.
Absolute extrema on a closed interval
If f is continuous on a closed interval [a, b], the extreme value theorem guarantees an absolute maximum and minimum. To find them:
- Find the critical points inside the interval.
- Evaluate f at each of them and at a and b.
- The largest value is the absolute maximum; the smallest is the absolute minimum.
For f(x) = x³ − 3x² − 9x + 5 on [−2, 6]:
f(−2) = 3
f(−1) = 10
f(3) = −22
f(6) = 59 The absolute maximum is 59, at the right endpoint, even though there is a local maximum at −1. The absolute minimum is −22 at x = 3. No derivative test is required, since you are simply comparing numbers.
This procedure is the engine of optimization problems.
A trigonometric case works the same way. Let q(x) = x + 2 sin x on [0, 2π]. Then q′(x) = 1 + 2 cos x, which is zero when cos x = −1/2, that is, at x = 2π/3 and x = 4π/3. Since q″(x) = −2 sin x, the first is a local maximum and the second a local minimum. The four values to compare are q(0) = 0, q(2π/3) ≈ 3.83, q(4π/3) ≈ 2.46 and q(2π) ≈ 6.28. Both absolute extremes sit at the endpoints, and neither local extremum wins.
Choosing a test, and avoiding slips
Use the second derivative test when f″ is easy to compute and you only care about points with zero slope. Use the first derivative test when f″ is messy, when it vanishes, or when the derivative fails to exist. The sign chart also tells you where the function rises and falls, which you need anyway for curve sketching.
Frequent slips include:
- reporting x = −1 as "the maximum" when the question asks for the maximum value, 10;
- plugging critical points into f′ instead of f to find heights;
- dividing both sides of f′(x) = 0 by a factor such as x² and losing a root;
- reading f″(c) = 0 as proof of an inflection point or of no extremum;
- forgetting endpoints.
With two input variables, a similar test uses a combination of second partial derivatives and introduces a new possibility, the saddle, covered in saddle points and extrema in two variables.