Finding the highest and lowest points of a function is one of the most practical uses of calculus. Engineers use it to minimize material costs, economists use it to maximize profit, and physics students use it to find the peak of a projectile’s path. The good news: at every smooth peak and valley, the tangent line goes flat — its slope is zero. That single fact turns a geometry problem into algebra you can solve in minutes.
In this guide you will learn how to locate critical points, run the first derivative test, classify local maxima and minima, and find absolute extrema on a closed interval — with two fully worked examples.
What Are Maxima and Minima?
Maxima and minima (together called extrema) are the highest and lowest points of a function:
- Local maximum: a peak where the function value is higher than every nearby point.
- Local minimum: a valley where the function value is lower than every nearby point.
- Absolute (global) extrema: the single highest or lowest value across the entire domain, or across a specific closed interval.
Before working with optimization, it helps to be comfortable with how curves bend around turning points — review our guide on finding inflection points and concavity. To brush up on the differentiation itself, check our step-by-step guide on how to use the power rule for derivatives. You can also verify critical values and function outputs using the CalcSolver calculation engine.
Understanding Critical Points
A critical point occurs at any x = c in the domain where:
- f'(c) = 0 (the tangent line is perfectly horizontal), or
- f'(c) is undefined (a sharp corner, cusp, or vertical tangent).
Local extrema can only happen at critical points (or at the endpoints of a closed interval). So finding critical points gives you a short list of candidates — then you test which ones are real peaks and valleys.
The 4-Step Framework for Finding Extrema
- Compute the first derivative: find f'(x) using standard differentiation rules.
- Find critical points: set f'(x) = 0 and solve for x; also note where f'(x) is undefined.
- Run the first derivative test: place the critical points on a number line and test the sign of f'(x) in each interval. A sign change from + to − means a local maximum; − to + means a local minimum.
- Calculate the y-coordinates: plug each confirmed critical x-value back into the original function f(x) to get the full coordinate points.
Worked Example 1: Locating Local Maxima and Minima
Find all local extrema of:
f(x) = 2x^3 – 9x^2 + 12x + 1
Step 1: Find the first derivative
Using the power rule:
f'(x) = 6x^2 – 18x + 12
Step 2: Set the derivative equal to zero
6x^2 – 18x + 12 = 0
Divide everything by 6:
x^2 – 3x + 2 = 0
Factor:
(x – 1)(x – 2) = 0
So the critical numbers are x = 1 and x = 2.
Step 3: Test intervals on a sign chart
The critical points split the number line into three intervals. Test one point in each:
- (−∞, 1) — test x = 0: f'(0) = 12 > 0, so the function is increasing.
- (1, 2) — test x = 1.5: f'(1.5) = 6(2.25) − 27 + 12 = 13.5 − 27 + 12 = −1.5 < 0, so the function is decreasing.
- (2, ∞) — test x = 3: f'(3) = 54 − 54 + 12 = 12 > 0, so the function is increasing.
At x = 1 the derivative switches from positive to negative: local maximum. At x = 2 it switches from negative to positive: local minimum.
Step 4: Calculate the y-coordinates
- f(1) = 2(1)³ − 9(1)² + 12(1) + 1 = 2 − 9 + 12 + 1 = 6 → local maximum at (1, 6).
- f(2) = 2(8) − 9(4) + 12(2) + 1 = 16 − 36 + 24 + 1 = 5 → local minimum at (2, 5).
Shortcut — the second derivative test: instead of a sign chart, compute f”(x) = 12x − 18 and plug in each critical point. If f”(c) > 0 the point is a local minimum (the curve cups upward); if f”(c) < 0 it is a local maximum. Here f”(1) = −6 < 0 confirms the maximum at (1, 6), and f”(2) = 6 > 0 confirms the minimum at (2, 5).
Worked Example 2: Absolute Extrema on a Closed Interval
Find the absolute maximum and minimum of f(x) = x^3 – 3x^2 on the closed interval [−1, 3].
Step 1: Find critical points inside the interval
f'(x) = 3x^2 – 6x = 3x(x – 2)
Setting f'(x) = 0 gives x = 0 and x = 2 — both lie inside (−1, 3).
Step 2: Evaluate f(x) at every candidate and both endpoints
- f(−1) = (−1)³ − 3(−1)² = −1 − 3 = −4 (left endpoint)
- f(0) = 0³ − 3(0)² = 0
- f(2) = 8 − 3(4) = 8 − 12 = −4
- f(3) = 27 − 3(9) = 27 − 27 = 0 (right endpoint)
Step 3: Compare
The largest value is 0 and the smallest is −4. So the absolute maximum is 0 (at x = 0 and x = 3) and the absolute minimum is −4 (at x = −1 and x = 2). Notice the extremes happened at the endpoints as well as the interior points — this is why the closed interval method checks every candidate, not just the critical points.
3 Critical Mistakes to Avoid
- Plugging critical numbers into f'(x) for y-values: plugging an x-value into the derivative always gives zero. Always evaluate the original function f(x) to find the actual point on the graph.
- Assuming every critical point is an extremum: if f'(x) = 0 but the sign doesn’t change on both sides (like f(x) = x³ at x = 0), the curve just flattens — no peak, no valley.
- Forgetting the endpoints: on a closed interval, the absolute max or min often sits right at a boundary. Never skip f(a) and f(b).
With the first derivative test and the closed interval method in your toolkit, you can pin down peaks, valleys, and boundary extremes on any calculus problem — the same ideas that power real-world optimization from profit curves to bridge design.