Maxima and Minima

The first derivative test

A critical point is a value cc where f′(c)=0f'(c) = 0 (or f′(c)f'(c) is undefined). To classify it, look at how the sign of f′f' changes as xx passes through cc:

Classifying a critical point by the sign change of f′
Sign of f′f': left of cc, then rightcc is a
++ then −-local maximum (rising, then falling)
−- then ++local minimum (falling, then rising)
no changeneither, e.g. x3x^3 at x=0x = 0

The second derivative test

At a point where f′(x)=0f'(x) = 0: if f′′(x)<0f''(x) < 0, it's a local maximum; if f′′(x)>0f''(x) > 0, it's a local minimum.

Worked example: local maximum of a cubic

Find the local maximum value of g(x)=x3−3xg(x) = x^3 - 3x.

Solution: g′(x)=3x2−3=0g'(x) = 3x^2 - 3 = 0 at x=±1x = \pm 1. Checking the second derivative, g′′(x)=6xg''(x) = 6x:

At x=−1x=-1: g′′(−1)=−6<0g''(-1) = -6 < 0, a local maximum, with value g(−1)=−1−(−3)=2g(-1) = -1 - (-3) = 2.

At x=1x=1: g′′(1)=6>0g''(1) = 6 > 0, a local minimum. So the local maximum value is 2.

The same cubic, by the first derivative test

g′(x)=3(x−1)(x+1)g'(x) = 3(x - 1)(x + 1) is positive on (−∞,−1)(-\infty, -1), negative on (−1,1)(-1, 1) and positive on (1,∞)(1, \infty). The sign goes ++ to −- at x=−1x = -1 (a local maximum) and −- to ++ at x=1x = 1 (a local minimum), agreeing with the second derivative test.

Graph of g(x) equals x cubed minus 3x, with a local maximum at (minus 1, 2) and a local minimum at (1, minus 2), where the tangent is horizontal.−2−112−22local max (−1, 2)local min (1, −2)
g(x) = x³ − 3x. The tangent is horizontal at both turning points: a local maximum of 2 at x = −1 and a local minimum of −2 at x = 1.

When f′′(c)=0f''(c) = 0, the second derivative test gives no answer and the first derivative test is the way to decide. For example, f(x)=x4f(x) = x^4 has f′′(0)=0f''(0) = 0, but f′f' goes from −- to ++ at 00, so it is a minimum.

Worked example: absolute extremes on a closed interval

Find the absolute maximum and minimum values of g(x)=x3−3xg(x) = x^3 - 3x on [0,2][0, 2].

Solution: On a closed interval, the absolute extremes occur either at a critical point inside the interval or at an endpoint. The only critical point in (0,2)(0, 2) is x=1x = 1. Evaluating gg at it and at both endpoints:

g(0)=0,g(1)=−2,g(2)=8−6=2g(0) = 0, \qquad g(1) = -2, \qquad g(2) = 8 - 6 = 2

So the absolute maximum is 22 (at x=2x = 2, an endpoint) and the absolute minimum is −2-2 (at x=1x = 1). Note that the endpoint value beats the local maximum here.

Worked example: an optimization problem

Find two positive numbers whose sum is 15 and whose sum of squares is as small as possible.

Solution: Let the numbers be xx and 15−x15-x. Minimize:

f(x)=x2+(15−x)2=2x2−30x+225f(x) = x^2 + (15-x)^2 = 2x^2 - 30x + 225

f′(x)=4x−30=0f'(x) = 4x - 30 = 0 at x=7.5x = 7.5, and f′′(x)=4>0f''(x) = 4 > 0, confirming a minimum. So the two numbers are x=7.5x = 7.5 and 15−x=7.515 - x = 7.5, split evenly.

Common mistakes

  • Assuming f′(c)=0f'(c) = 0 means an extreme. It only marks a candidate. x3x^3 has f′(0)=0f'(0) = 0 and no maximum or minimum there.
  • Ignoring the endpoints. On a closed interval the absolute maximum or minimum can sit at an endpoint, as in the example above.
  • Giving the location instead of the value. If asked for the maximum value, the answer is g(−1)=2g(-1) = 2, not x=−1x = -1.
  • Forgetting the constraint in an optimisation problem. Use it to write the quantity in one variable first, as 15−x15 - x did in the sum-of-squares example.

Continue learning

The intervals where a function is increasing and decreasing are exactly what determines whether a critical point is a maximum or a minimum.

From past GATE papers