Maxima, Minima, and Inflection Points

At the top of a hill the slope is zero, and that's how you find the top.

Before this Lesson

Walk a hilly road in fog so thick you can't see the landscape. All you have is the tilt of the ground under your feet and the way that tilt is changing. That's enough to notice the top of a hill, where the ground goes level. But level ground also comes at the bottom of a dip and on a shelf partway up a climb. And the highest spot of the whole walk may not be level at all, if the road simply ends while it's still climbing.

Tilt and change of tilt are the first and second derivatives, and between them they sort out the level spots. The road's end is one more place you'll have to check.

Hilltop: level Dip: level Shelf: level Road's end: highest, not level
Three level spots, and a high point that isn't level

Flat spots are the candidates

The sign of f′f' says whether a curve is rising or falling, as you saw in Derivatives and Slope. A smooth curve can't go from rising to falling without passing through a slope of zero, any more than you can walk from uphill to downhill without one level step. So at every peak and valley of a smooth curve, the tangent is flat and f′(x)=0f'(x) = 0. A point where that happens is a critical point.

That turns a hunt along the whole curve into algebra. Take f(x)=x3−6x2+9x+1f(x) = x^3 - 6x^2 + 9x + 1 and set its derivative to zero:

f′(x)=3x2−12x+9=3(x−1)(x−3)=0⇒x=1, x=3f'(x) = 3x^2 - 12x + 9 = 3(x - 1)(x - 3) = 0 \quad\Rightarrow\quad x = 1,\ x = 3

Those are the only two places on the entire curve that can be a peak or a valley.

0 1 2 3 4 5 6 0 1 2 3 4 f(x) x Local maximum: f′ = 0 Local minimum: f′ = 0 f′ > 0 f′ < 0 f′ > 0
f(x) = x³ − 6x² + 9x + 1, flat at its peak and its valley

The peak is a local maximum: higher than everything near it, though not higher than everything, since the curve passes that height beyond x=4x = 4. The valley is a local minimum.

Curving down or curving up

To f′f', the peak and the valley look alike: it's zero at both. To tell them apart, walk through each one and read the slope as you go. Over a peak it reads something like +2, +1, 0, −1, −2, dropping the whole way. Through a valley it reads −2, −1, 0, +1, +2, climbing the whole way.

+2 +1 0 −1 −2 walking this way Over a peak: slope dropping, f″ < 0 −2 −1 0 +1 +2 walking this way Through a valley: slope climbing, f″ > 0
Reading the slope through a peak and through a valley

How fast the slope is changing is the second derivative, f′′f'', so its sign gives the verdict. When f′′f'' is negative, the slope is dropping and the curve bends downward like a dome, which at a flat spot means a peak. When f′′f'' is positive, the slope is climbing and the curve bends upward like a bowl, which at a flat spot means a valley. That bend is the curve's concavity: concave down or concave up.

The Handbook's Differential Calculus section prints this as its Test for a Maximum and Test for a Minimum. It says only "maximum" and "minimum," with no "local" or "concave," but these are the same ideas.

Maximum at x=a:f′(a)=0 and f′′(a)<0Minimum at x=a:f′(a)=0 and f′′(a)>0\begin{aligned} \text{Maximum at } x = a&: \quad f'(a) = 0 \text{ and } f''(a) < 0 \\ \text{Minimum at } x = a&: \quad f'(a) = 0 \text{ and } f''(a) > 0 \end{aligned}

This is the second-derivative test, and its minus sign trips people up, because f′′<0f'' < 0 sounds as though it ought to mean a low point. But it's the slope that's dropping, not the height, and a slope can only drop through zero by going over a top.

For the cubic, f′′(x)=6x−12f''(x) = 6x - 12. At x=1x = 1 that's −6-6, so it's a peak, with height f(1)=5f(1) = 5. At x=3x = 3 it's +6+6, so it's a valley, with height f(3)=1f(3) = 1.

Worked Example A cubic's peak and valley
1 of 3

Find where f(x)=2x3−3x2−12x+5f(x) = 2x^3 - 3x^2 - 12x + 5 has its local maximum and its local minimum.

Beyond polynomials

The method doesn't care what kind of function you feed it. Differentiate with the rules from Differentiation Rules, set f′=0f' = 0, and test with f′′f''.

Two habits start to matter more here:

  • Check each root against the domain. The function ln⁡x\ln x exists only for x>0x > 0, and a problem may fence off the negatives itself by saying "for x>0x > 0." A root of f′f' outside the domain isn't a candidate.
  • Answer what was asked. Where a maximum occurs is an xx. The maximum value is ff at that xx, so it takes one more step: put the xx back into ff.
Worked Example The lowest value of x + 9/x
1 of 3

Find the minimum value of f(x)=x+9/xf(x) = x + 9/x for x>0x > 0.

Where the bend switches

Look at the cubic again between its peak and its valley. Left of x=2x = 2 it bends downward, and right of x=2x = 2 it bends upward. Drive along it from left to right and you'd be steering right, then left, with the wheel passing through center for just one instant. That spot is an inflection point, where the concavity switches.

0 2 4 6 0 5 10 −12 0 12 0 1 2 3 4 f f′ f″ peak inflection point valley lowest slope: −3 f″ < 0: curving down f″ > 0: curving up x
The cubic, its slope, and its slope's rate of change
Here f′(x)=3x2−12x+9f'(x) = 3x^2 - 12x + 9 and f′′(x)=6x−12f''(x) = 6x - 12.

The sign of f′′f'' is the concavity, so f′′f'' has to change sign there. The Handbook's Test for a Point of Inflection asks for exactly that: f′′(a)=0f''(a) = 0, and f′′(x)f''(x) changing sign as xx increases through aa.

So solve f′′(x)=0f''(x) = 0, then check the sign on each side. For the cubic, 6x−12=06x - 12 = 0 gives x=2x = 2, and f′′f'' is −6-6 at x=1x = 1 and +6+6 at x=3x = 3, so the sign does change. The height comes from ff: f(2)=3f(2) = 3, which puts the inflection point at (2,3)(2, 3).

An inflection point usually isn't flat. The slope here is f′(2)=−3f'(2) = -3, the steepest the curve gets between peak and valley, and that's no accident: f′f' has a valley at x=2x = 2, and a valley of f′f' is where its own derivative, f′′f'', is zero. It's the same trick as before, one derivative up.

A cubic's f′′f'' is a straight line, which crosses zero exactly once, so every cubic has exactly one inflection point. A higher polynomial can have more.

Checkpoint
1 of 2

What is the inflection point of y=x3+3x2−9x+4y = x^3 + 3x^2 - 9x + 4?

A.
(−3,31)(-3, 31)
B.
(−1,−12)(-1, -12)
C.
(−1,15)(-1, 15)
D.
(1,−1)(1, -1)

When the test has no verdict

When f′′f'' is zero at a flat spot, it's tempting to announce an inflection point. Look at y=x4y = x^4, y=−x4y = -x^4, and y=x3y = x^3 first. At x=0x = 0, all three report f′=0f' = 0 and f′′=0f'' = 0, identical readings. Yet the first has a valley there, the second a peak, and the third a shelf on a steady climb.

y = x4 f′ < 0 f′ > 0 At x = 0: f′ = 0, f″ = 0 Minimum y = −x4 f′ > 0 f′ < 0 At x = 0: f′ = 0, f″ = 0 Maximum y = x3 f′ > 0 f′ > 0 At x = 0: f′ = 0, f″ = 0 Neither: a shelf
Three curves with identical readings at x = 0

So when f′f' and f′′f'' are both zero, the second-derivative test is undetermined. The Handbook's maximum and minimum tests don't cover this case at all. Nor is f′′=0f'' = 0 proof of an inflection point, which is why the Handbook's inflection test also demands the sign change. On y=x4y = x^4, f′′=12x2f'' = 12x^2 is zero at x=0x = 0 but positive on both sides, so the curve bends upward the whole way, and there's no inflection point.

When the test goes quiet, go back to what your feet can tell you, and check f′f' a little to each side of the point. The Handbook doesn't print this check, but it's only the sign of f′f' again:

  • Positive, then negative: uphill, then downhill, so a local maximum.
  • Negative, then positive: downhill, then uphill, so a local minimum.
  • The same sign on both sides: neither, just a pause on the way up or down. On a polynomial, that shelf is an inflection point with a flat tangent.

Here's how the readings at a point add up:

What the readings at x = a tell you
At x = aWhat the point is
f′=0, f′′<0f' = 0,\ f'' < 0Local maximum
f′=0, f′′>0f' = 0,\ f'' > 0Local minimum
f′=0, f′′=0f' = 0,\ f'' = 0Undetermined: check f′ on each side
f′≠0, f′′=0f' \ne 0,\ f'' = 0Inflection point, if f″ changes sign
f′≠0, f′′≠0f' \ne 0,\ f'' \ne 0None of these: just rising or falling
Worked Example A quartic with a shelf
1 of 4

Classify every critical point of f(x)=x4−4x3f(x) = x^4 - 4x^3.

When the road ends

Everything so far has been local: a point compared with its neighbors. Now a different question. On a closed interval, a stretch such as 0≤x≤30 \le x \le 3 that includes its ends, where are the very highest and very lowest points? Those are the absolute maximum and absolute minimum.

Back on the foggy road, if it ends while you're still climbing, the end is the high point, and the ground there isn't level. Setting f′=0f' = 0 can never find it, and the Handbook's tests say nothing about ends. So add them to the candidates by hand:

  1. Solve f′(x)=0f'(x) = 0, and keep only the roots inside the interval.
  2. Compute ff at each of those and at both ends.
  3. The largest value is the absolute maximum, and the smallest is the absolute minimum.

You don't need the second-derivative test here. You're comparing heights, so it doesn't matter what kind of point each candidate is. On the same cubic, the winners change with the interval:

0 1 2 3 4 5 6 0 1 2 3 4 f(x) x 0 ≤ x ≤ 2 Largest: f(1) = 5 (peak) Smallest: f(0) = 1 (end) f(2) = 3 0 1 2 3 4 5 6 0 1 2 3 4 f(x) x 2 ≤ x ≤ 3.5 Peak: outside the interval Largest:f(2) = 3 (end) Smallest:f(3) = 1 (valley) f(3.5) = 1.875
The same cubic on two closed intervals
On 0≤x≤20 \le x \le 2, the peak gives the largest value, 5, and the left end gives the smallest, 1. On 2≤x≤3.52 \le x \le 3.5, the peak is outside the interval and gets no vote, so the left end gives the largest value, 3, and the valley gives the smallest, 1.
Worked Example The extremes of a cubic on an interval
1 of 3

Find the absolute maximum and minimum of f(x)=x3−3x+1f(x) = x^3 - 3x + 1 on 0≤x≤30 \le x \le 3.

Recap

  • Solve f′(x)=0f'(x) = 0 for the candidates. Every peak and valley of a smooth curve is flat, though not every flat spot is a peak or a valley.
  • At a flat spot, f′′<0f'' < 0 means curving down, a peak, and f′′>0f'' > 0 means curving up, a valley. If f′′=0f'' = 0, the test has no verdict, so check the sign of f′f' on each side.
  • An inflection point is where f′′f'' changes sign, not merely where it's zero: x4x^4 has f′′(0)=0f''(0) = 0 and no inflection point.
  • On a closed interval, compare ff at the critical points inside it and at both ends. The winner may sit at an end, where the slope isn't zero.
  • Answer what was asked: the location is an xx, and the value is ff at that xx.