Guides / Derivatives
Maxima and minima: critical points, endpoints, and the second-derivative test
Short answer
(1) Find f′(x). The critical points are where f′(x) = 0 or where f′(x) doesn't exist. (2) On a closed interval [a, b], also list the endpoints, evaluate f at every candidate, and pick the largest and smallest values. (3) To classify a single critical point, check whether f′ changes sign there (+ to − is a maximum, − to + a minimum, no change is neither), or use the second derivative: f″ < 0 is a maximum, f″ > 0 a minimum, and f″ = 0 tells you nothing.
Why it works
At a peak or a valley in the middle of the graph, the tangent line is flat, or the graph has a sharp corner where there is no tangent at all. Anywhere else the graph is still going up or down, so a little to one side is higher and a little to the other side is lower. That's why every maximum or minimum inside the interval has to be at a critical point.
The endpoints are different. The graph can still be climbing when the interval runs out, so the highest point is the last one, even though the slope there isn't zero. A derivative test never finds those points. You have to add them to the list yourself.
The reverse isn't true: a flat tangent doesn't guarantee a turn. The graph of x3 is flat at 0 and keeps rising on both sides. A critical point is only a candidate, and the sign of f′ on each side decides what it is.
Example 1: a closed interval
Find the maximum and minimum values of f(x) = x3 − 3x2 on [−2, 4].
- f′(x) = 3x2 − 6x = 3x(x − 2)Differentiate and factor.
- Critical points x = 0 and x = 2Both are inside (−2, 4), so both go on the list.
- f(0) = 0, f(2) = 8 − 12 = −4The values at the critical points.
- f(−2) = −8 − 12 = −20, f(4) = 64 − 48 = 16The values at the endpoints.
- Maximum 16 at x = 4, minimum −20 at x = −2Compare all four values. Both winners are endpoints. The critical points are only a local maximum and a local minimum.
Example 2: the second-derivative test
Find and classify the critical points of f(x) = x4 − 8x2.
- f′(x) = 4x3 − 16x = 4x(x − 2)(x + 2)Factor out 4x, then factor the difference of squares.
- Critical points x = −2, 0, 2The zeros of f′. It's a polynomial, so it's defined everywhere.
- f″(x) = 12x2 − 16Differentiate again.
- f″(0) = −16, f″(±2) = 48 − 16 = 32Negative means the graph curves down (a peak), positive means it curves up (a valley).
- Local max f(0) = 0; local min f(±2) = −16f(2) = 16 − 32 = −16, and f(−2) is the same because f is even. −16 is also the global minimum.
Example 3: a point where f′ doesn't exist
Find and classify the critical points of f(x) = x1/3(x − 4).
- f(x) = x4/3 − 4x1/3Multiply out so each term is a power of x.
- f′(x) = 43x1/3 − 43x−2/3 = 4(x − 1)3x2/3Factor out (4/3)x−2/3.
- f′(1) = 0, f′(0) undefinedTwo critical points: a zero of the top and a zero of the bottom. f itself is defined at 0.
- x2/3 > 0 for x ≠ 0, so f′ has the sign of x − 1f′ is negative on both sides of 0 and changes from − to + at 1.
- Local min f(1) = −3; x = 0 is neitherf(1) = 1 · (1 − 4). At 0 the graph has a vertical tangent and keeps falling: it's a critical point that isn't an extremum.
Example 4: an optimization problem
A farmer has 600 m of fence to enclose a rectangular field along a straight river. No fence is needed on the river side. What dimensions give the largest area?
- 2x + y = 600, so y = 600 − 2xx is each side going away from the river, y the side parallel to it. Only three sides are fenced.
- A(x) = x(600 − 2x) = 600x − 2x2, 0 ≤ x ≤ 300Write the area in one variable, and find the range that makes sense: y can't be negative.
- A′(x) = 600 − 4x = 0, so x = 150The only critical point.
- A(150) = 150 · 300 = 45,000; A(0) = A(300) = 0Compare with the endpoints. The critical point wins.
- 150 m by 300 m, area 45,000 m²The side along the river is twice as long as each of the other two.
Common mistakes, and the exact line they happen on
1. Forgetting the endpoints
The maximum and minimum of x3 − 3x2 on [−2, 4] (Example 1).
- Critical points 0 and 2, f(0) = 0, f(2) = −4Right so far.
- Maximum 0, minimum −4This is the mistake. Only the critical points were compared. On a closed interval the endpoints are candidates too, and here they win: f(4) = 16 and f(−2) = −20. Setting f′ = 0 finds the flat points, and the endpoints are almost never flat.
2. Treating every flat point as a maximum or minimum
Classify the critical point of g(x) = x3 − 3x2 + 3x.
- g′(x) = 3x2 − 6x + 3 = 3(x − 1)2, so g′(1) = 0Right so far: x = 1 is the only critical point.
- g″(1) = 0, so x = 1 is a maximum or a minimumThis is the mistake. A zero derivative only makes x = 1 a candidate, and g″(1) = 0 means the second-derivative test can't decide. Check the sign of g′ instead: g′(0) = 3 and g′(2) = 3, positive on both sides, because (x − 1)² is never negative. g is increasing straight through x = 1, so it's neither.
3. Fencing the side that doesn't need it
The field along the river (Example 4).
- 2x + 2y = 600, so y = 300 − xThis is the mistake. This is the perimeter of a full rectangle, but the river side has no fence. It leads to a 150 m by 150 m square with area 22,500 m², half the real answer. The calculus is fine; the equation describes a different problem. Before you differentiate, check that the constraint says exactly what the question says.
Practice
Find the maximum and minimum values of f(x) = x2 − 6x + 5 on [0, 5].
Show answer
f′(x) = 2x − 6 = 0 at x = 3. f(3) = −4, f(0) = 5, f(5) = 0. The maximum is 5 at x = 0 and the minimum is −4 at x = 3.
Find and classify the critical points of f(x) = x3 − 12x.
Show answer
f′(x) = 3x2 − 12 = 0 at x = ±2, and f″(x) = 6x. f″(−2) = −12, so f(−2) = 16 is a local maximum; f″(2) = 12, so f(2) = −16 is a local minimum.
Find the maximum value of f(x) = x2e−x for x ≥ 0.
Show answer
f′(x) = (2x − x2)e−x = x(2 − x)e−x, zero at 0 and 2. f rises on (0, 2) and falls after, so the maximum is f(2) = 4e−2 ≈ 0.541.
Two positive numbers add up to 20. What is the largest their product can be?
Show answer
P(x) = x(20 − x), P′(x) = 20 − 2x = 0 at x = 10. Both numbers are 10, and the product is 100.
Find the minimum value of f(x) = x + 4x for x > 0.
Show answer
f′(x) = 1 − 4/x2 = 0 at x = 2 (−2 is outside the domain), and f″(x) = 8/x3 > 0. The minimum is f(2) = 4.