/

Extrema Calculator — Local Max, Min & Absolute Extrema with Steps

Extrema Calculator — Local Max, Min & Absolute Extrema with Steps

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 examples:
Quick examples:

Quick Reference — Extrema Tests & Theorems

f''(c) > 0
Concave Up → Cup → Holds water → Local Minimum
f''(c) < 0
Concave Down → Frown → Sad face → Local Maximum

Table A: First vs Second Derivative Test

Situation at x=cTest UsedConclusion
f'(c)=0, f' goes from + to −First Derivative TestLocal Maximum
f'(c)=0, f' goes from − to +First Derivative TestLocal Minimum
f'(c)=0, f' has no sign changeFirst Derivative TestSaddle Point
f'(c)=0, f''(c) < 0Second Derivative TestLocal Maximum
f'(c)=0, f''(c) > 0Second Derivative TestLocal Minimum
f'(c)=0, f''(c) = 0Second Derivative Test⚠️ Inconclusive — use First Derivative Test

Table B: Local vs Absolute Extrema

TypeDefinitionFound By
Local Maximumf(c) ≥ f(x) for all x near c (in a neighborhood)First or second derivative test
Local Minimumf(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 intervalClosed interval method
🥈 Absolute Min on [a,b]Smallest value of f over the entire intervalClosed interval method

Table C: Common Function Extrema Patterns

FunctionCritical PointsLocal Extrema
ax² + bx + cx = −b/(2a)One: min if a>0, max if a<0
ax³ + bx² + ...Up to 2 real roots0, 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π
NoneNo local extrema (strictly increasing)
|x|x = 0 (f' undefined)Local minimum at x=0, f'(0) undefined
x = 0 (f'(0)=0)Saddle point — no local extremum

Closed Interval Method — 3 Steps

Step 1: Find all critical points of f in the open interval (a, b) by solving f'(x) = 0 and checking where f' is undefined.
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.

x
(−∞, −1)
x=−1
(−1, 3)
x=3
(3, +∞)
f'(x)
+ ↗
0
− ↘
0
+ ↗
f(x)
increasing
🟢 MAX
decreasing
🔵 MIN
increasing

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:

  1. Compute f'(x): Differentiate f(x) with respect to x. This requires chain rule, product rule, or quotient rule for composite functions.
  2. 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.
  3. 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).
  4. 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

Step 1 — Find f'(x):
f'(x) = 3x² − 6x − 9 = 3(x² − 2x − 3) = 3(x − 3)(x + 1)
Step 2 — Solve f'(x) = 0:
3(x − 3)(x + 1) = 0 → x = 3 or x = −1
Step 3 — Second derivative test: f''(x) = 6x − 6
f''(−1) = 6(−1) − 6 = −12 < 0 → concave down → Local Maximum at x = −1 f''(3) = 6(3) − 6 = 12 > 0 → concave up → Local Minimum at x = 3
Step 4 — Compute f(c):
f(−1) = (−1)³ − 3(−1)² − 9(−1) + 5 = −1 − 3 + 9 + 5 = 10 f(3) = 27 − 27 − 27 + 5 = −22
Local Maximum at (−1, 10)  |  Local Minimum at (3, −22)

Example 2: f(x) = x⁴ − 4x²

Step 1: f'(x) = 4x³ − 8x = 4x(x² − 2)
Step 2: 4x(x−√2)(x+√2) = 0 → x = 0, x = √2 ≈ 1.414, x = −√2 ≈ −1.414
Step 3: f''(x) = 12x² − 8
f''(0) = −8 < 0 → Local Maximum at x = 0 f''(√2) = 24 − 8 = 16 > 0 → Local Minimum at x = √2 f''(−√2) = 16 > 0 → Local Minimum at x = −√2
Step 4: f(0) = 0, f(±√2) = 4 − 8 = −4
Local Maximum at (0, 0)  |  Two Local Minima at (±√2, −4)

Example 3: f(x) = x² + 4x + 3

Step 1: f'(x) = 2x + 4
Step 2: 2x + 4 = 0 → x = −2 (one critical point)
Step 3: f''(x) = 2 > 0 for all x → concave up everywhere → Local Minimum at x = −2
Step 4: f(−2) = 4 − 8 + 3 = −1
Local Minimum (and absolute minimum on ℝ) at (−2, −1)

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.
f''(c) < 0 → Local Maximum
"Concave down = frown = peak = maximum"
f''(c) > 0 → Local Minimum
"Concave up = cup = holds water = minimum"

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)

x
(−∞, −1)
x = −1
(−1, 3)
x = 3
(3, +∞)
f'(x)
+ ↗
test: f'(−2)=3(−1)(−5)=15>0
f'=0
− ↘
test: f'(0)=3(1)(−3)=−9<0
f'=0
+ ↗
test: f'(4)=3(5)(1)=15>0
Result
increasing
🟢 LOCAL MAX (−1, 10)
decreasing
🔵 LOCAL MIN (3, −22)
increasing

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.

x
(−∞, 0)
x = 0
(0, +∞)
f'(x)
+ ↗
3x² > 0
f'=0
+ ↗
3x² > 0
Result
increasing
⚠️ SADDLE POINT — No sign change
increasing

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π]

x
(0, π/2)
π/2
(π/2, 3π/2)
3π/2
(3π/2, 2π)
cos(x)
+ ↗
0
− ↘
0
+ ↗
Result
increasing
🟢 MAX (π/2, 1)
decreasing
🔵 MIN (3π/2, −1)
increasing

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.

Extreme Value Theorem: If f is continuous on the closed interval [a, b], then f is guaranteed to attain both an absolute maximum and an absolute minimum on [a, b]. This theorem ensures the closed interval method always succeeds for continuous functions on a closed, bounded interval.

The Three Steps of the Closed Interval Method

  1. 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).
  2. 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!
  3. 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]

Step 1 — Critical points in (−1, 4):
f'(x) = 3x² − 6x = 3x(x − 2) = 0 Critical points: x = 0 and x = 2 Both 0 and 2 are in (−1, 4) ✓
Step 2 — Evaluate at all candidates:
f(−1) = −1 − 3 = −4 ← Endpoint a f(0) = 0 − 0 = 0 ← Critical point f(2) = 8 − 12 = −4 ← Critical point f(4) = 64 − 48 = 16 ← Endpoint b
Step 3 — Compare:
Largest: f(4) = 16 → Absolute Maximum at (4, 16) Smallest: f(−1) = f(2) = −4 → Absolute Minimum at (−1, −4) and (2, −4)
Absolute Maximum: 16 at x=4  |  Absolute Minimum: −4 at x=−1 and x=2

Example: Absolute Extrema of f(x) = x² − 2x + 3 on [0, 3]

f'(x) = 2x − 2 = 0 → x = 1 (in (0, 3) ✓) f(0) = 3 ← Endpoint f(1) = 1 − 2 + 3 = 2 ← Critical point (local minimum) f(3) = 9 − 6 + 3 = 6 ← Endpoint
Absolute Maximum: 6 at x=3  |  Absolute Minimum: 2 at x=1

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]

f'(x) = 4x³ − 4x = 4x(x−1)(x+1) = 0 → x = −1, 0, 1 (all in (−2, 2) ✓) f(−2) = 16 − 8 = 8 ← Endpoint f(−1) = 1 − 2 = −1 ← Critical point f(0) = 0 ← Critical point f(1) = 1 − 2 = −1 ← Critical point f(2) = 8 ← Endpoint
Absolute Maximum: 8 at x=±2 (endpoints!)  |  Absolute Minimum: −1 at x=±1

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) = 3x² → f'(0) = 0 → x=0 is a critical point ✓ f''(x) = 6x → f''(0) = 0 → Second derivative test: INCONCLUSIVE First derivative test: f'(−0.01) = 3(0.0001) = 0.0003 > 0 (positive, increasing) f'(+0.01) = 3(0.0001) = 0.0003 > 0 (positive, increasing) → f' does NOT change sign across x=0 → x=0 is a SADDLE POINT — neither local max nor local min
x=0 is a saddle point. f(x)=x³ has NO local extrema anywhere.

f(x) = x⁵ at x = 0

f'(x) = 5x⁴ → f'(0) = 0 → critical point f''(x) = 20x³ → f''(0) = 0 → INCONCLUSIVE (again) First derivative test: f'(x) = 5x⁴ ≥ 0 for ALL x (a perfect square of x²) No sign change → SADDLE POINT

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

f'(x) = 3x² − 6x − 9 = 3(x+1)(x−3) Critical points: x=−1, x=3 f''(x) = 6x − 6 f''(−1) = −12 < 0 → Local Maximum at (−1, 10) f''(3) = 12 > 0 → Local Minimum at (3, −22)

Problem 2: f(x) = x⁴ − 4x² — Three Local Extrema

f'(x) = 4x³ − 8x = 4x(x−√2)(x+√2) Critical points: x=0, ±√2 f''(x) = 12x² − 8 f''(0) = −8 < 0 → Local Maximum at (0, 0) f''(√2) = 16 > 0 → Local Minimum at (√2, −4) f''(−√2) = 16 > 0 → Local Minimum at (−√2, −4)

Problem 3: f(x) = x³ — Saddle Point, No Local Extrema

f'(x) = 3x² → f'(0) = 0 → critical point x=0 f''(0) = 0 → Second derivative test INCONCLUSIVE First derivative test: f'(x) = 3x² ≥ 0 always → no sign change → x=0 is a SADDLE POINT. f(x)=x³ has NO local extrema.

Problem 4: f(x) = sin(x) on [0, 2π] — Trig Function

f'(x) = cos(x) = 0 → x = π/2, x = 3π/2 f''(x) = −sin(x) f''(π/2) = −sin(π/2) = −1 < 0 → Local Maximum at (π/2, 1) f''(3π/2) = −sin(3π/2) = 1 > 0 → Local Minimum at (3π/2, −1)

Problem 5: Absolute Extrema of f(x) = x³ − 3x² on [−1, 4]

f'(x) = 3x(x−2) → critical points x=0, x=2 ∈ (−1,4) Candidates: f(−1)=−4, f(0)=0, f(2)=−4, f(4)=16 Absolute Maximum: f(4)=16 at x=4 (endpoint!) Absolute Minimum: f(−1)=f(2)=−4 at x=−1 and x=2

Problem 6: Absolute Extrema of f(x) = x² − 2x + 3 on [0, 3]

f'(x) = 2x−2=0 → x=1. Candidates: f(0)=3, f(1)=2, f(3)=6 Absolute Maximum: 6 at x=3  |  Absolute Minimum: 2 at x=1

Problem 7: f(x) = x⁴ − 2x² + 1 — Two Local Minima, One Local Maximum

f'(x) = 4x³ − 4x = 4x(x−1)(x+1) → x=−1, 0, 1 f''(x) = 12x² − 4 f''(−1) = 8 > 0 → Local Minimum at (−1, 0) f''(0) = −4 < 0 → Local Maximum at (0, 1) f''(1) = 8 > 0 → Local Minimum at (1, 0) Note: f(x) = (x²−1)² ≥ 0, so the two local minima are also absolute minima.

Problem 8: Endpoint Absolute Maximum Exceeds Interior Local Maximum

f(x) = −x³ + 3x on [−1, 3] f'(x) = −3x² + 3 = 0 → x = ±1. Interior: x=1 ∈ (−1,3) f''(x) = −6x; f''(1) = −6 < 0 → Local Maximum at (1, 2) Candidates: f(−1)=1+−3=−1+−3=1−3=−2... f(−1)=−(−1)³+3(−1)=1−3=−2 f(1)=−1+3=2 ← local maximum f(3)=−27+9=−18 Absolute Maximum: 2 at x=1 (coincides with local maximum here) Absolute Minimum: −18 at x=3 (endpoint minimum, below interior)

Common Mistakes Finding Extrema

1
Forgetting endpoints when finding absolute extrema on a closed interval

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.

2
Confusing f'(c)=0 with f''(c)=0 in the second derivative test

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.

3
Declaring a saddle point a local extremum when f''(c) = 0

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.

4
Forgetting that f'(c) undefined can also be a critical point

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.

5
Substituting the critical point into f' instead of f for the y-coordinate

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:

Free chemistry, physics, biology & math calculators with step-by-step solutions. Trusted by 100,000+ students. Solve any science problem instantly!

Newsletter

Subscribe to our Newsletter to be updated. We promise not to spam.

Copyright © 2026 SciSolveLab. All Rights Reserved

Scroll to Top