How to Find Local Max and Min: A Practical Guide
You're driving through hilly terrain, and you notice something interesting — every time you crest a hill, you momentarily stop going up before you start going down. And the valley at the bottom, where you stop going down and start going up again? That turning point, where the direction changes, is essentially what mathematicians call a local maximum. That's a local minimum.
This isn't just abstract math. Finding local maxima and minima is one of the most practical skills in calculus, and it shows up everywhere — from optimizing business profits to understanding how objects move to figuring out the best shape for a bridge.
Quick note before moving on.
So let's dig into how you actually find these points Which is the point..
What Are Local Max and Min?
A local maximum (sometimes called a relative maximum) is a point on a function where the function's value is higher than everything around it. Think of the peak of a hill. It's not necessarily the highest point in existence — just the highest point in its immediate neighborhood.
A local minimum works the same way, just in reverse. It's a point lower than all its nearby points. The bottom of a valley.
Here's what trips people up: a local max or min doesn't have to be the highest or lowest point on the entire graph. That's what we call a global maximum or minimum, and it's a different thing entirely. A function can have multiple local extrema — think of a road with lots of hills and valleys — but only one global highest point and one global lowest point (if they exist).
Some disagree here. Fair enough Worth keeping that in mind..
The formal definition gets a little wonky with "there exists some interval containing c" and all that, but here's the intuition that actually matters: at a local maximum, if you nudge a little to the left or right, the function value goes down. At a local minimum, nudging left or right makes the function value go up But it adds up..
Critical Points: Where the Action Happens
Before you can find local extrema, you need to find critical points. These are the only places where local maxima and minima can happen Most people skip this — try not to..
A critical point of a function f(x) is any x-value where either:
- The derivative f'(x) = 0, or
- The derivative f'(x) doesn't exist (is undefined)
That's it. Those are your suspects. Consider this: every local max or min must occur at a critical point — but not every critical point is a local max or min. Some critical points are just flat spots where the function keeps going in the same direction, like a plateau.
This is the part where students often get confused. They find where the derivative equals zero, celebrate, and assume they've found an extremum. Now, not so fast. You still have to check whether that critical point is actually a peak, a valley, or neither Small thing, real impact. And it works..
Why Does This Matter?
Here's the thing — finding local maxima and minima isn't just a homework exercise. It's how we solve real optimization problems.
In economics, you might want to find the price point that maximizes revenue or profit. In physics, the trajectory of a projectile reaches its highest point — another local maximum. That's a local maximum problem. Engineers designing bridges want to minimize stress and material costs while maximizing strength — local minima and maxima all the way through.
This is where a lot of people lose the thread.
Even in everyday life, you're implicitly solving these problems. But what's the fastest route to work? That's an optimization problem. How do you schedule your day to get the most done? Same thing That's the whole idea..
The techniques you're about to learn are the foundation for all of this. Once you can find where a function peaks and valleys, you can start answering the questions that actually matter: What's the best way to do X?
How to Find Local Max and Min
Now for the good stuff. There are two main approaches, and I'll walk you through both.
The First Derivative Test
This is the more intuitive method, and it's usually where people start Most people skip this — try not to..
Step 1: Find the critical points. Take your function f(x) and find where f'(x) = 0 or where f'(x) doesn't exist. Write down those x-values — those are your critical points And that's really what it comes down to..
Step 2: Test the intervals. For each critical point, look at what the derivative does on either side. This tells you whether the function is increasing or decreasing.
- If f' changes from positive to negative at a critical point, you've got a local maximum. The function was going up, then it turned around and went down.
- If f' changes from negative to positive, you've got a local minimum. The function was going down, then it turned around and went up.
- If f' doesn't change sign — it's positive on both sides or negative on both sides — then that critical point is neither a max nor a min. It's just a flat spot.
Let me give you a quick example. Say f(x) = x³ - 3x It's one of those things that adds up..
First, find the derivative: f'(x) = 3x² - 3 That alone is useful..
Set it equal to zero: 3x² - 3 = 0, so x² = 1, and x = ±1.
Now test the intervals. Pick a number less than -1, one between -1 and 1, and one greater than 1:
- At x = -2: f'(-2) = 3(4) - 3 = 9 (positive)
- At x = 0: f'(0) = -3 (negative)
- At x = 2: f'(2) = 3(4) - 3 = 9 (positive)
So at x = -1, the derivative goes from positive to negative — that's a local maximum. At x = 1, it goes from negative to positive — that's a local minimum.
See how it works? You're literally watching the function change direction.
The Second Derivative Test
This method is faster when it works, but it has a catch — it doesn't always give you an answer That alone is useful..
Step 1: Find the critical points. Same as before. Find where f'(x) = 0 or doesn't exist.
Step 2: Find the second derivative. Take the derivative of the derivative. That's f''(x) It's one of those things that adds up..
Step 3: Plug in your critical points.
- If f''(c) < 0 (negative), then c is a local maximum. The function is concave down — like an upside-down bowl — so you've hit the top.
- If f''(c) > 0 (positive), then c is a local minimum. The function is concave up — like a right-side-up bowl — so you've hit the bottom.
- If f''(c) = 0, the test is inconclusive. You have to go back to the first derivative test.
Using our example f(x) = x³ - 3x:
f'(x) = 3x² - 3, so f''(x) = 6x Not complicated — just consistent. But it adds up..
At x = -1: f''(-1) = -6 (negative) → local maximum. ✓ At x = 1: f''(1) = 6 (positive) → local minimum. ✓
Both tests agree. Nice when that happens Most people skip this — try not to..
When to Use Which Test
Here's my honest take: learn both. The first derivative test is more reliable — it always works, even when the second derivative test fails. But the second derivative test is faster when you can use it, and it also tells you about the concavity of the function, which is useful information Turns out it matters..
In practice, a lot of people check the second derivative first. If it's inconclusive or easier to compute, they fall back to the first derivative test Simple as that..
Common Mistakes People Make
Let me save you some pain by pointing out where most people go wrong.
Assuming every critical point is an extremum. I already mentioned this, but it bears repeating. Finding where f'(x) = 0 doesn't automatically give you a local max or min. You have to check. A function can have a horizontal tangent that's neither a peak nor a valley — like f(x) = x³ at x = 0. The derivative is zero, but the function just keeps going up.
Forgetting about points where the derivative doesn't exist. Critical points include places where the derivative is undefined, not just where it's zero. A sharp corner (like at x = 0 in f(x) = |x|) can be a local max or min even though there's no derivative there. Don't limit your search to f'(x) = 0.
Confusing global and local extrema. A local maximum isn't necessarily the highest point on the graph. Make sure you're answering the question you're actually being asked.
Ignoring endpoints. If you're working with a function on a closed interval [a, b], the endpoints can be global extrema even if they're not local ones. Always check f(a) and f(b).
Skipping the sign chart. With the first derivative test, it's tempting to just plug in one point on each side and call it done. But if you pick a weird number, you might get misleading results. A quick sign chart — testing points in each interval — keeps you honest.
Practical Tips That Actually Help
Here's what I'd tell a student sitting next to me:
-
Always find the domain first. If your function isn't defined at some points, you can't have extrema there. Save yourself some work and know your domain upfront Simple, but easy to overlook..
-
Make a habit of checking endpoints. Especially on applied problems, the "best" solution often happens at a boundary, not in the middle. Don't forget to look there Most people skip this — try not to. No workaround needed..
-
Draw a rough sketch if you can. Even a messy sketch helps you visualize what's happening. Are you expecting one peak or two? Does your algebra match your intuition?
-
Double-check your derivative. So many errors come from a derivative that's just slightly wrong. If your answer looks weird, re-derive it before you panic.
-
The second derivative test fails more often than you'd think. When f''(c) = 0, don't waste time trying to force it. Just go back to the first derivative test.
Frequently Asked Questions
What's the difference between a local max/min and a global max/min? A local max/min is the highest or lowest point in its immediate neighborhood. A global max/min is the highest or lowest point on the entire domain. A function can have many local extrema but only one of each global one (if they exist).
Can a local maximum be lower than a local minimum? Absolutely. Think of a small hill next to a huge mountain. The hill's peak (local max) is lower than the mountain's valley (local min) would be, if such a thing made sense. Local just means "around here."
What if the second derivative test is inconclusive? Go back to the first derivative test. It's more work, but it always gives you an answer. The second derivative test failing doesn't mean there's no extremum — it just means you need a different tool.
Do local extrema always occur at critical points? Yes, by definition. If a point isn't a critical point (where f' = 0 or f' doesn't exist), the function is either increasing or decreasing through that point, so it can't be a peak or valley Worth knowing..
Can a function have more than two local extrema? Yes, as many as you want, within reason. A polynomial of degree n can have up to n-1 local extrema. The function sin(x) has infinitely many Small thing, real impact..
The Bottom Line
Finding local maxima and minima comes down to three steps: find your critical points, figure out whether each one is a peak, valley, or neither, and then check your endpoints if you're working on a closed interval.
The first derivative test is your reliable workhorse — it always works, and it's not that much harder than the shortcut. The second derivative test is nice when it cooperates, but don't count on it Easy to understand, harder to ignore..
Once you can do this reliably, you've got a tool that applies everywhere — physics, economics, engineering, data science. It's one of those skills that starts as abstract math and turns into something you actually use.
So practice with a few functions. Graph them. Day to day, watch the derivative change sign. It clicks pretty fast, and then you'll never look at a curve the same way again That's the part that actually makes a difference..