Extrema Calculator — Local and Absolute Maximum and Minimum
Find local maxima and minima with the second derivative test, plus absolute maximum and minimum on a closed interval — every step shown.
This local max and min calculator finds all critical points of any function and classifies each one as a local maximum, local minimum, or saddle point using the first and second derivative tests — showing every step from computing f'(x) to evaluating f''(x) at each critical point. Switch to the Absolute Extrema tab to apply the closed interval method and find the absolute maximum and absolute minimum on any closed interval [a, b], including full step-by-step candidate comparison. Use the Reference tab for complete definitions, theorems, and worked examples for local extrema and absolute extrema.
Quick Reference — Extrema Tests & Theorems
Table A: First vs Second Derivative Test
| Situation at x=c | Test Used | Conclusion |
|---|---|---|
| f'(c)=0, f' goes from + to − | First Derivative Test | Local Maximum |
| f'(c)=0, f' goes from − to + | First Derivative Test | Local Minimum |
| f'(c)=0, f' has no sign change | First Derivative Test | Saddle Point |
| f'(c)=0, f''(c) < 0 | Second Derivative Test | Local Maximum |
| f'(c)=0, f''(c) > 0 | Second Derivative Test | Local Minimum |
| f'(c)=0, f''(c) = 0 | Second Derivative Test | ⚠️ Inconclusive — use First Derivative Test |
Table B: Local vs Absolute Extrema
| Type | Definition | Found By |
|---|---|---|
| Local Maximum | f(c) ≥ f(x) for all x near c (in a neighborhood) | First or second derivative test |
| Local Minimum | f(c) ≤ f(x) for all x near c (in a neighborhood) | First or second derivative test |
| 🥇 Absolute Max on [a,b] | Largest value of f over the entire interval | Closed interval method |
| 🥈 Absolute Min on [a,b] | Smallest value of f over the entire interval | Closed interval method |
Table C: Common Function Extrema Patterns
| Function | Critical Points | Local Extrema |
|---|---|---|
| ax² + bx + c | x = −b/(2a) | One: min if a>0, max if a<0 |
| ax³ + bx² + ... | Up to 2 real roots | 0, 1, or 2 local extrema |
| x⁴ + bx² + ... | Up to 3 roots of f' | Typically 2 local minima + 1 local maximum |
| sin(x) | x = π/2 + nπ | Alternating local max/min, period 2π |
| cos(x) | x = nπ | Alternating local max/min, period 2π |
| eˣ | None | No local extrema (strictly increasing) |
| |x| | x = 0 (f' undefined) | Local minimum at x=0, f'(0) undefined |
| x³ | x = 0 (f'(0)=0) | Saddle point — no local extremum |
Closed Interval Method — 3 Steps
Step 2: Evaluate f(x) at each interior critical point AND at both endpoints: f(a) and f(b).
Step 3: The largest value among all candidates = absolute maximum. The smallest = absolute minimum.
Extreme Value Theorem guarantees this works for any continuous f on [a, b].
Sign Chart — First Derivative Test Visualization
Read left to right: the sign of f' in each interval tells you whether f is increasing (↗) or decreasing (↘). The transition at each critical point determines its type.
Example: f(x) = x³−3x²−9x+5 with f'(x) = 3(x+1)(x−3). Pattern ↗MAX↘ = local maximum at x=−1; pattern ↘MIN↗ = local minimum at x=3.
Local vs Absolute Extrema — Key Definitions
Understanding the distinction between local extrema and absolute extrema is essential before using any maxima minima calculator. The four types form a hierarchy: absolute extrema are the "global winners," while local extrema are "neighborhood winners."
🟢 Local Maximum
f(c) ≥ f(x) for all x in some open interval around c. The function has a peak at c compared to nearby points. Also called relative maximum.
🔵 Local Minimum
f(c) ≤ f(x) for all x in some open interval around c. The function has a valley at c compared to nearby points. Also called relative minimum.
🥇 Absolute Maximum
f(c) ≥ f(x) for ALL x in the domain or interval. This is the largest function value overall — not just locally. Also called global maximum.
🥈 Absolute Minimum
f(c) ≤ f(x) for ALL x in the domain or interval. This is the smallest function value overall. Also called global minimum.
The Hierarchy: Local vs Absolute
Every absolute maximum on an open domain is also a local maximum. Every absolute minimum is also a local minimum. However, the reverse is not true: a function can have multiple local maxima, but at most one absolute maximum value (though it may be attained at multiple points).
Example: the function f(x) = x⁴−5x²+4 has a local maximum at x=0 with f(0)=4, but the absolute maximum on (−∞,∞) does not exist (the function grows without bound). On the closed interval [−3,3], however, the absolute maximum is f(±3)=49 — an endpoint value that exceeds the interior local maximum of 4.
Critical Point — The Starting Point of All Extrema Analysis
A critical point of f is any x=c where either f'(c) = 0 or f'(c) is undefined. Critical points are the candidates for local maxima, local minima, and saddle points. Every local extremum must occur at a critical point (Fermat's Theorem), but not every critical point is a local extremum.
Terminology: "Local" = "Relative"
In calculus, the terms local maximum and relative maximum mean exactly the same thing — a peak compared to nearby values. Similarly, local minimum and relative minimum are interchangeable. A local extrema calculator and a relative extrema calculator compute the same thing. Some textbooks prefer "relative," others prefer "local" — this calculator shows both labels.
How to Find Local Maxima and Minima — Step-by-Step
The standard four-step method used by every local max and min calculator applies the derivative tests systematically:
- Compute f'(x): Differentiate f(x) with respect to x. This requires chain rule, product rule, or quotient rule for composite functions.
- Solve f'(x) = 0: Set the first derivative equal to zero and solve. The solutions are the critical points (candidates for local extrema). Also check where f'(x) is undefined.
- Apply a classification test: At each critical point c, use either the second derivative test (evaluate f''(c)) or the first derivative test (check sign of f' on both sides of c).
- Compute f(c): Substitute the critical point x-value back into the original function f(x) to find the y-coordinate of the extremum.
When to Use Which Test
The second derivative test is faster — it only requires evaluating f''(c) at a single point. Use it first. The first derivative test is necessary when f''(c) = 0 (the second derivative test is inconclusive), and is also more visually intuitive via sign charts. The first derivative test always works; the second derivative test sometimes fails.
Example 1: f(x) = x³ − 3x² − 9x + 5
Example 2: f(x) = x⁴ − 4x²
Example 3: f(x) = x² + 4x + 3
The Second Derivative Test — f''(c) < 0 or > 0
The second derivative test is the most efficient method for classifying critical points when it applies. At a critical point c where f'(c) = 0:
- f''(c) < 0 → Local Maximum: The function is concave down at c. Picture a hill or peak (∩ shape). The function curves downward, creating a local maximum.
- f''(c) > 0 → Local Minimum: The function is concave up at c. Picture a valley or bowl (∪ shape). The function curves upward, creating a local minimum.
- f''(c) = 0 → Inconclusive: The second derivative test fails. You must switch to the first derivative test.
Memory Aid
"Concave up = cup shape = holds water = minimum valley. Concave down = frown = sad face = maximum peak." This mnemonic works because a cup (∪) holds water at its lowest point — the minimum — and a frown (∩) has its highest point at the top — the maximum.
When the Second Derivative Test Fails: f''(c) = 0
The classic counterexample is f(x) = x⁴ at x = 0: f'(0) = 0 and f''(0) = 0, but x = 0 is clearly a local minimum (and absolute minimum). The second derivative test is inconclusive here. The first derivative test shows f'(x) = 4x³ < 0 for x < 0 and > 0 for x > 0 — sign change − to +, confirming a local minimum.
Another case: f(x) = x³ at x = 0: f'(0) = 0 and f''(0) = 0. Here x = 0 is NOT a local extremum — it's a saddle point. The first derivative test shows f'(x) = 3x² ≥ 0 on both sides — no sign change, confirming a saddle point.
Rule: whenever the second derivative test gives f''(c) = 0, always follow up with the first derivative test. Never declare a saddle point based on f''(c) = 0 alone — you need to check sign changes of f' around c.
The First Derivative Test — Sign Changes of f'(x)
The first derivative test classifies critical points by examining whether f'(x) changes sign across each critical point. The sign chart makes this visual: positive means increasing (↗), negative means decreasing (↘).
- ↗ then ↘ (+ to −): f' changes from positive to negative → Local Maximum
- ↘ then ↗ (− to +): f' changes from negative to positive → Local Minimum
- No sign change (+ to + or − to −): f' keeps the same sign → Saddle Point (not a local extremum)
Sign Chart Method — How to Build One
Place the critical points on a number line. Choose a test point in each interval between critical points. Evaluate f' at each test point. Mark + (positive, increasing) or − (negative, decreasing) in each interval. Read the pattern at each critical point from left to right.
Sign Chart: f(x) = x³ − 3x² − 9x + 5, f'(x) = 3(x+1)(x−3)
test: f'(−2)=3(−1)(−5)=15>0
test: f'(0)=3(1)(−3)=−9<0
test: f'(4)=3(5)(1)=15>0
Sign Chart: f(x) = x³ (Saddle Point Case)
f'(x) = 3x². At x=0: f'(0)=0. Test points: f'(−1)=3>0, f'(1)=3>0.
3x² > 0
3x² > 0
f'(x) = 3x² ≥ 0 on BOTH sides of x=0 → no sign change → x=0 is NOT a local extremum. It's a saddle point (inflection point with zero slope).
Sign Chart: f(x) = sin(x), f'(x) = cos(x) on [0, 2π]
Absolute Extrema on a Closed Interval — The Closed Interval Method
The closed interval method is the systematic procedure for finding the absolute maximum and absolute minimum of a continuous function on a closed interval [a, b]. It is guaranteed to work by the Extreme Value Theorem.
The Three Steps of the Closed Interval Method
- Find all critical points of f in (a, b): Solve f'(x) = 0 and note where f'(x) is undefined, but keep only those with a < x < b (strictly interior).
- Evaluate f at all candidates: Compute f(x) at each interior critical point AND at both endpoints f(a) and f(b). Do not forget the endpoints!
- Compare all values: The largest function value among all candidates is the absolute maximum; the smallest is the absolute minimum.
Example: Absolute Extrema of f(x) = x³ − 3x² on [−1, 4]
Example: Absolute Extrema of f(x) = x² − 2x + 3 on [0, 3]
Note: the absolute maximum occurs at the endpoint x=3, not at any local maximum.
Example: Absolute Extrema of f(x) = x⁴ − 2x² on [−2, 2]
Critical Points That Are Not Extrema — Saddle Points
The most commonly missed case in extrema problems: a critical point where f'(c) = 0 but the function has neither a local maximum nor a local minimum. These are called saddle points (or inflection points with zero slope).
f(x) = x³ at x = 0
f(x) = x⁵ at x = 0
Why Are They Called Saddle Points?
In single-variable calculus, "saddle point" refers to a critical point where f'(c) = 0 but there's no local extremum. The function flattens out momentarily (zero slope) but continues in the same direction. These points are also called stationary points of inflection — they are inflection points (where concavity changes) with the additional property that the slope is zero at that exact location. Cross-reference: inflection point calculator — inflection points and extrema both require analyzing f'(x) and f''(x).
A critical point is a saddle point when: (1) f'(c) = 0, AND (2) f'(x) does not change sign across c. The second derivative test often fails for these (gives f''(c) = 0), which is why the first derivative test is essential for complete analysis.
Worked Examples — 8 Complete Problems
Problem 1: f(x) = x³ − 3x² − 9x + 5 — Local Extrema
Problem 2: f(x) = x⁴ − 4x² — Three Local Extrema
Problem 3: f(x) = x³ — Saddle Point, No Local Extrema
Problem 4: f(x) = sin(x) on [0, 2π] — Trig Function
Problem 5: Absolute Extrema of f(x) = x³ − 3x² on [−1, 4]
Problem 6: Absolute Extrema of f(x) = x² − 2x + 3 on [0, 3]
Problem 7: f(x) = x⁴ − 2x² + 1 — Two Local Minima, One Local Maximum
Problem 8: Endpoint Absolute Maximum Exceeds Interior Local Maximum
Common Mistakes Finding Extrema
The absolute maximum or absolute minimum might occur at an endpoint, not at any interior critical point. The closed interval method requires evaluating f at BOTH endpoints AND all interior critical points. Many students solve f'(x)=0 and stop there — missing the endpoint candidates entirely.
The critical points are found by solving f'(x) = 0 (first derivative equals zero). The second derivative test then evaluates f''(c) at those critical point x-values. Some students mistakenly solve f''(x)=0 to find critical points — this finds inflection points, not extrema.
When the second derivative test is inconclusive (f''(c) = 0), students sometimes guess "local minimum" because f''(c) = 0 sounds like "neutral." But f''(c) = 0 means the test fails — it tells you nothing. You must apply the first derivative test and check whether f' changes sign across c. If f' keeps the same sign (like f(x)=x³ at x=0), the point is a saddle point, not an extremum.
The definition of a critical point includes both f'(c)=0 AND f'(c) undefined. Functions like |x| have a critical point at x=0 where the derivative does not exist (corner point), yet x=0 is a local minimum. Cusps and corners are critical points that the second derivative test cannot classify — use the first derivative test for these.
After finding a critical point x=c, you need: (a) f''(c) for the second derivative test (substitute c into f''), and (b) f(c) for the y-coordinate of the extremum (substitute c into the original f). A common error is computing f'(c) and reporting it as the y-coordinate — but f'(c)=0 by definition of the critical point, so this always gives y=0 regardless of where the extremum actually is.
Related Calculators
Extrema analysis connects to several other calculus topics — each of these calculators handles a specific step in the process:
Inflection points and extrema both require analyzing f'(x) and f''(x) — find where concavity changes.
Need the chain rule to differentiate composite functions like sin(x²) before finding critical points.
Need the product rule to differentiate products like x·eˣ when computing f'(x) for extrema analysis.
Optimization problems connect extrema to integrals — finding max area or min cost often uses both.