§ 01Local vs Global — Two Types of Extreme Value
A function can have many peaks and valleys scattered across its domain, and one overall highest and lowest point. The first are called local extrema; the second are called global (or absolute) extrema. Every problem in optimisation is ultimately asking for one of these two things.
The definitions are precise. A local maximum at x = c means f(c) ≥ f(x) for all x near c, the function is higher there than anywhere in some open interval around c. A local minimum is the same idea but lower. A global maximum means f(c) ≥ f(x) for every x in the domain, nothing anywhere is higher.
§ 02Critical Points — Where to Look
Every local extremum hides at a critical point. A critical point of f is any value x = c in the domain where either f′(c) = 0 or f′(c) does not exist. This is Fermat's Theorem in action:
The second sentence is crucial. The classic counter-example is f(x) = x³ at x = 0: f′(0) = 0 so x = 0 is a critical point, but f is increasing on both sides: no extremum at all. Setting f′ = 0 gives candidates; a further test determines whether each candidate is a maximum, minimum, or neither.
Also called a stationary point (for the f′ = 0 case). Points where f′ doesn't exist, corners, cusps, vertical tangents, are critical points even though the derivative test doesn't apply there directly.
Step 1 in Every Extremum Problem — Find all Critical Points
Differentiate f to find f′(x).
Set f′(x) = 0 and solve. These are the stationary points.
Find where f′(x) does not exist within the domain of f. Include these too.
You now have a complete list of critical point candidates. Test each one.
§ 03The First Derivative Test
The first derivative test classifies a critical point by examining the sign of f′ on either side of it. The logic is geometric: if f′ changes from positive to negative, the function was rising then falling, that is a peak. If f′ changes from negative to positive, it was falling then rising, that is a valley.
If f′ changes from + to − at c → f has a local maximum at c.
If f′ changes from − to + at c → f has a local minimum at c.
If f′ does not change sign at c → f has neither a maximum nor a minimum (e.g., an inflection point).
The practical tool is a sign chart: divide the real line at every critical point, then evaluate the sign of f′ in each interval by plugging in a test value.
- Differentiate: f′(x) = 3x² − 3 = 3(x²−1) = 3(x−1)(x+1).
- Critical points: f′(x) = 0 → x = 1 and x = −1.
- Sign chart: test x = −2, 0, 2 in f′(x):
| Interval | Test point | f′ sign | f behaviour |
|---|---|---|---|
| (−∞, −1) | x = −2 | + | Increasing ↗ |
| x = −1 | — | 0 | Local MAX |
| (−1, 1) | x = 0 | − | Decreasing ↘ |
| x = 1 | — | 0 | Local MIN |
| (1, ∞) | x = 2 | + | Increasing ↗ |
- f(−1) = −1−3(−1) = 2 → local max at (−1, 2).
- f(1) = 1−3 = −2 → local min at (1, −2).
- f′(x) = 4x³ − 16x = 4x(x²−4) = 4x(x−2)(x+2).
- Critical points: x = −2, 0, 2.
- Signs: f′ < 0 on (−∞,−2), f′ > 0 on (−2,0), f′ < 0 on (0,2), f′ > 0 on (2,∞).
- At x=−2: − to + → local min. At x=0: + to − → local max. At x=2: − to + → local min.
- Values: f(±2) = 16−32 = −16. f(0) = 0.
- f′(x) = −1 for x < 0, and f′(x) = 1 for x > 0. At x = 0, f′ is undefined (corner).
- Sign of f′ changes from − to + at x = 0 → local (and global) minimum at x = 0.
§ 04The Second Derivative Test
Once a stationary point (f′(c) = 0) is found, the second derivative f″(c) often classifies it instantly: no sign chart needed.
- From §03: critical points x = ±1. f″(x) = 6x.
- f″(−1) = −6 < 0 → local maximum at x = −1.
- f″(1) = 6 > 0 → local minimum at x = 1.
- f′(x) = 4x³ = 0 → x = 0. f″(x) = 12x² → f″(0) = 0. Test fails.
- Use first derivative test: f′(x) = 4x³ < 0 for x < 0, > 0 for x > 0 → sign changes − to + → local (global) minimum.
- f′(x) = 2cos x − 1 = 0 → cos x = 1/2 → x = π/3, 5π/3.
- f″(x) = −2sin x.
- f″(π/3) = −2sin(π/3) = −√3 < 0 → local max at x = π/3.
- f″(5π/3) = −2sin(5π/3) = √3 > 0 → local min at x = 5π/3.
- Values: f(π/3) = √3 − π/3 ≈ 0.685. f(5π/3) = −√3 − 5π/3 ≈ −6.97.
§ 05Absolute Extrema and the Closed Interval Method
Local extrema tell us about peaks and valleys in the interior. But many real problems ask for the absolute best or worst over a specific range, that is the global extremum on a closed, bounded interval.
The EVT guarantees existence. Finding those values is mechanical: the Closed Interval Method:
Find all critical points of f in the open interval (a, b).
Evaluate f at each critical point and at both endpoints a and b.
The largest value is the absolute maximum; the smallest is the absolute minimum.
- f′(x) = 3x²−3 = 0 → critical points x = ±1. Both lie in (−2, 3).
- Evaluate at critical points and endpoints:
| x | f(x) = x³ − 3x | Type |
|---|---|---|
| −2 (endpoint) | −8+6 = −2 | Endpoint |
| −1 (critical) | −1+3 = 2 | Critical pt |
| 1 (critical) | 1−3 = −2 | Critical pt |
| 3 (endpoint) | 27−9 = 18 | Endpoint |
- f′(x) = 2x − 4 = 0 → x = 2. Lies in (0, 5).
- f(0) = 3, f(2) = 4−8+3 = −1, f(5) = 25−20+3 = 8.
- f′(x) = cos x − sin x = 0 → tan x = 1 → x = π/4, 5π/4.
- Evaluate: f(0) = 1, f(π/4) = √2, f(5π/4) = −√2, f(2π) = 1.
§ 06Further Worked Examples
- f′(x) = eˣ + x·eˣ = eˣ(1+x). Since eˣ > 0 always, f′ = 0 only when 1+x = 0 → x = −1.
- For x < −1: (1+x) < 0, so f′ < 0. For x > −1: (1+x) > 0, so f′ > 0.
- Sign changes − to + → local (and global) minimum.
- f(−1) = −1·e⁻¹ = −1/e ≈ −0.368.
- Domain: x > 0. f′(x) = 1/x − 1 = 0 → x = 1.
- f″(x) = −1/x². f″(1) = −1 < 0 → local (and global) maximum.
- f(1) = 0 − 1 = −1. As x→0⁺ f→−∞; as x→∞ f→−∞. So this is the global max.
- f′(x) = 6x² − 18x + 12 = 6(x²−3x+2) = 6(x−1)(x−2). Critical points: x = 1, 2.
- f(0) = −3. f(1) = 2−9+12−3 = 2. f(2) = 16−36+24−3 = 1. f(3) = 54−81+36−3 = 6.
§ 07Quick Reference — Choosing the Right Test
| Method | When to use | What it requires | Limitation |
|---|---|---|---|
| First Derivative Test | Always — never fails | Signs of f′ on either side of c | Slightly more work than SDT |
| Second Derivative Test | When f″ is easy to compute | f′(c) = 0 and f″(c) ≠ 0 | Fails when f″(c) = 0 |
| Closed Interval Method | Absolute extrema on [a, b] | Continuity on [a, b] | Only works on closed intervals |
Common Mistakes
§ 08Test Yourself — 10-Question Quiz
What is a critical point of f?
A critical point is any x in the domain where f′(x) = 0 (stationary point) or f′(x) does not exist. These are the only candidates for local extrema by Fermat's Theorem.
How many critical points does f(x) = x³ − 3x have?
- f′(x) = 3x²−3 = 3(x−1)(x+1) = 0 → x = 1 and x = −1.
- Two critical points.
For the first derivative test, a critical point is a local maximum when:
f′ changes from + to −: the function was increasing then decreasing: that is a peak (local max). f′ changes from − to + gives a local minimum.
For f(x) = x³ − 3x, the second derivative is f″(x) = 6x. What does f″(1) tell us about x = 1?
f″(1) = 6 > 0 means concave up at x = 1 (a bowl shape) so x = 1 is a local minimum. f(1) = 1−3 = −2.
Find the absolute maximum of f(x) = x² − 4x + 1 on [0, 4].
- f′=2x−4=0 → x=2. Evaluate: f(0)=1, f(2)=4−8+1=−3, f(4)=16−16+1=1.
- Absolute max = 1 (attained at both x=0 and x=4). Absolute min = −3 at x=2.
The second derivative test is inconclusive (gives no information) when:
When f′(c) = 0 and f″(c) = 0 the SDT gives no information. The point could be a max, min, or inflection. Use the first derivative test instead.
Find the x-coordinate of the local minimum of f(x) = x⁴ − 8x². (There are two: enter the positive one.)
- f′ = 4x(x−2)(x+2) = 0 → x = 0, ±2.
- Sign chart: f′ goes − to + at x = 2 and x = −2 (local minima). f′ goes + to − at x = 0 (local max).
- Positive local min at x = 2. f(2) = 16−32 = −16.
The Extreme Value Theorem guarantees that a function attains both its absolute max and min on [a, b] provided the function is:
The EVT requires continuity on the closed interval [a, b]. Differentiability is not needed. A continuous function on a closed interval is guaranteed to attain its extreme values.
What is the absolute minimum value of f(x) = x³ − 3x on [−2, 3]? (from Example 7)
From the closed interval method: f(−2)=−2, f(−1)=2, f(1)=−2, f(3)=18. The minimum value is −2, attained at both x=−2 and x=1.
f(x) = x³ has f′(0) = 0. What type of point is x = 0?
f′(x) = 3x². At x = 0: f′ = 0, but f′ > 0 on both sides (no sign change). So x = 0 is a critical point that is neither a max nor a min, it is an inflection point. f is increasing through it.
Quiz complete!