The First Derivative Test

Read the sign either side.

Where the second derivative goes silent

On y = x⁴ the gradient is 4x³ and the second derivative is 12x². At x = 0 both are 0. The origin is a stationary point, and the second derivative test says nothing about it.

The gradient itself still speaks. At x = −0.5 it is 4 × (−0.125) = −0.5, and at x = 0.5 it is 0.5. The curve is falling before the origin and rising after it, so the origin is a trough, a local minimum.

A pause, not a turn

On y = x³ the gradient is 3x². It is 0 at x = 0, and 3 at both x = −1 and x = 1; in fact 3x² is positive for every x except 0. Walking left to right, the sign of the gradient runs +, 0, +.

So the curve climbs up to the origin, levels off for an instant, and climbs on. There is no peak and no trough. A stationary point like this, where the curve does not turn, is a stationary point of inflection.

The test

Let c be a critical point of f, with f continuous at c. Look at the sign of f' just before c and just after it.

If f' changes from positive to negative, f has a local maximum at c. If it changes from negative to positive, f has a local minimum at c. If the sign is the same on both sides, f has neither.

The reason is what the sign of f' means. Where f' is positive on an interval, f is increasing there; where it is negative, f is decreasing. If f' is positive just before c and negative just after, f rises all the way up to f(c) and falls all the way after it, so f(c) is the highest value nearby.

A sign table

Take y = x³ − 3x. Its derivative is 3x² − 3 = 3(x + 1)(x − 1), which is zero at x = −1 and x = 1. These two points cut the number line into three intervals.

Between neighboring critical points f' is continuous and never zero, so it cannot change sign there: one test value per interval is enough. At x = −2, f' = 12 − 3 = 9, positive. At x = 0, f' = −3, negative. At x = 2, f' = 9, positive.

So the signs run +, then −, then +. At x = −1 the sign changes from + to −: a local maximum, at height −1 + 3 = 2. At x = 1 it changes from − to +: a local minimum, at height 1 − 3 = −2.

xy(−1, 2)(1, −2)

The gold curve y = x³ − 3x. It climbs while f' is positive, up to the peak at (−1, 2); falls while f' is negative, down to the trough at (1, −2); then climbs again.

Where both tests are needed, and one is enough

Take f(x) = x⁴ − 4x³. Its derivative is f'(x) = 4x³ − 12x² = 4x²(x − 3), zero at x = 0 and x = 3.

The second derivative is 12x² − 24x. At x = 3 it is 108 − 72 = 36, positive, so x = 3 is a minimum. At x = 0 it is 0, and that test is silent.

The sign table settles both. At x = −1, f' = 4 × 1 × (−4) = −16. At x = 1, f' = 4 × 1 × (−2) = −8. At x = 4, f' = 4 × 16 × 1 = 64. The factor 4x² is never negative, so the sign of f' is the sign of x − 3, and it runs −, −, +.

At x = 0 the sign is − on both sides: the curve falls, levels off at (0, 0), and keeps falling, so x = 0 is neither a maximum nor a minimum. At x = 3 it changes from − to +: a local minimum, at height 81 − 108 = −27, which agrees with the second derivative.

xy(0, 0)(3, −27)

The gold curve y = x⁴ − 4x³, with the vertical scale squeezed. It is level at (0, 0) and keeps falling; it turns only at (3, −27), where f' changes from − to +.

Where f' does not exist

The first derivative test also works at a critical point where f' does not exist, as long as f is continuous there. f(x) = x^(2/3) has f'(x) = 2/(3∛x), with no value at 0. For x < 0 the cube root is negative, so f' is negative; for x > 0 it is positive. The sign changes from − to +, so x = 0 is a local minimum, the cusp at the origin.

The second derivative test cannot even start here, because f'(0) is not 0: it does not exist.

xy

The gold curve y = x⁴, where f' runs −, 0, + across the origin, a minimum; and the dashed curve y = x³, where f' runs +, 0, +, with no turn. Both have second derivative 0 at the origin.

The usual mistakes

Testing past the next critical point. For x³ − 3x, a test value for x = −1 must lie between −1 and 1 on the right; x = 2 is beyond x = 1, where f' is positive again, and would make −1 look like a pause.

Reading the sign of f instead of f'. x³ − 3x is positive at x = −0.5 and negative at x = 0.5, but what decides is the gradient, which is negative at both.

Swapping the two cases. + then − is a peak: the curve climbs, then falls.

Calling a pause a turn. x³ has f' positive on both sides of 0, so the curve only levels off there.

A bottling machine

In the application below, the waste of glass depends on a machine setting through (x − 12)⁴. Its second derivative is 0 at the best setting, and the sign of the first derivative on each side settles it.

Worked example: A Bottling Machine's Waste Against Its Setting: a Stationary Point the Second Derivative Cannot Judge

Question A bottling machine wastes W = 5 + (x − 12)41296 kilograms of glass an hour when its filling head is at setting x, for 6 ≤ x ≤ 18. (a) Over which settings is the waste falling, and over which is it rising? (b) Find the setting that wastes least, and show why the second derivative cannot settle it.

  1. 1.Differentiate: dWdx = 4(x − 12)31296 = (x − 12)3324 kilograms an hour for each unit of setting.

    55.56691518setting, xwaste, kg an hourdW/dx = 4(x − 12)3/1296= (x − 12)3/324
    55.56691518setting, xwaste, kg an hourdW/dx = 4(x − 12)3/1296= (x − 12)3/324
    Differentiating gives dWdx = 4(x − 12)31296 = (x − 12)3324.
  2. 2.A cube keeps the sign of what is cubed. For x < 12 the bracket x − 12 is negative, so dWdx is negative; for x > 12 it is positive.

    55.56691518setting, xwaste, kg an hourfallingrisingx below 12: the cube is negativex above 12: the cube is positive
    55.56691518setting, xwaste, kg an hourfallingrisingx below 12: the cube is negativex above 12: the cube is positive
    A cube keeps the sign of what is cubed, so the gradient is negative below setting 12 and positive above it.
  3. 3.(a) So the waste falls over the settings from 6 to 12 and rises over the settings from 12 to 18.

    55.56691518setting, xwaste, kg an hourfallingrisingwaste falls 6 to 12, rises 12 to 18
    55.56691518setting, xwaste, kg an hourfallingrisingwaste falls 6 to 12, rises 12 to 18
    (a) The waste falls from setting 6 to setting 12, then rises from setting 12 to setting 18.
  4. 4.The only stationary point is where dWdx = 0, and a cube is zero only when its bracket is, so x = 12.

    55.56691518setting, xwaste, kg an hourfallingrising(12, 5)dW/dx = 0 only at x = 12
    55.56691518setting, xwaste, kg an hourfallingrising(12, 5)dW/dx = 0 only at x = 12
    The only stationary point is x = 12, where the cube, and so the gradient, is zero.
  5. 5.Differentiate again: d2Wdx2 = 3(x − 12)2324 = (x − 12)2108. At x = 12 this is zero, and a second derivative of zero decides nothing: it leaves a maximum, a minimum and a point of inflection all still possible.

    55.56691518setting, xwaste, kg an hourfallingrising(12, 5)d2W/dx2= (x − 12)2/108at x = 12 it is 0: no verdict
    55.56691518setting, xwaste, kg an hourfallingrising(12, 5)d2W/dx2= (x − 12)2/108at x = 12 it is 0: no verdict
    The second derivative is (x − 12)2108, which is 0 at x = 12: it decides nothing there.
  6. 6.(b) The first-derivative test settles it. The gradient is negative just before x = 12 and positive just after, so the curve turns from falling to rising: setting 12 is a minimum, wasting W = 5 kilograms an hour. Check: settings 6 and 18 each waste 5 + 12961296 = 6 kilograms an hour, which is more.

    55.56691518setting, xwaste, kg an hourfallingrising(12, 5)both ends waste 6falling then rising: a minimumleast waste 5 kg an hour at setting 12
    55.56691518setting, xwaste, kg an hourfallingrising(12, 5)both ends waste 6falling then rising: a minimumleast waste 5 kg an hour at setting 12
    (b) The gradient turns from negative to positive, so setting 12 is a minimum, wasting 5 kg an hour against 6 at either end.

Answer: (a) the waste falls from setting 6 to setting 12 and rises from setting 12 to setting 18; (b) setting 12, wasting 5 kilograms an hour

Common mistakes

  • Calling x = 12 a point of inflection because d2Wdx2 = 0 there. A zero second derivative is needed for a point of inflection but is not enough on its own: the second derivative must also change sign, and (x − 12)2108 is positive on both sides of 12.
  • Testing only the ends of the range and reporting setting 6 as the best. Setting 6 wastes 6 kilograms an hour, while the least waste is at the stationary point x = 12, which lies inside the range.

More using differentiation problems, worked step by step →

Practice The First Derivative Test in the app