Stationary Points of Functions: Local Maximum and Local Minimum
Stationary Points of Functions: Local Maximum and Local Minimum
1
Local minimum and local maximum.
2
7. f (x) = sin(x) has local maxima at x = π/2, 5π/2 9π/2, . . . and
has local minima at x = 3π/2, 7π/2 11π/2, . . ..
3
13.
1
f (x) =
(x − 1)(x − 2)
has a local maximum at x = 3/2 where f (3/2) = −4.
4
x = 1 is a local minimum for f (x) = x3 − 3x but not a global minimum.
Exercise 1
Each of the following functions f (x) has a local maximum or mini-
mum as indicated. Which of these is a global maximum or minimum?
Solutions to exercise 1
5
Graph of x2 and −x2 .
6
We see that x = 3/2 is not a global maximum as for example f (0) =
1/2 > f (3/2).
7
17.2 Finding Local Maxima and Minima
17.2.1 Reminder about increasing and decreasing functions
The following results from Increasing and Decreasing Functions are used in
this section. Note that these results are true if f (x) is differentiable and f 0 (x)
is continuous, which we assume.
8
Local Maximum.
Local Minimum.
17.2.4 Summary
We have shown that if x = a is a local maximum or a local minimum then
df
= 0, x = a.
dx
This tells us that the tangent at x = a is horizontal i.e. parallel to the x-axis.
9
17.3 Stationary Points
Any point x = a such that
df
= 0, x = a
dx
is called a stationary point. This is because the rate of change at x = a is
0 i.e. instantaneously stationary.
So a local maximum or minimum is a stationary point. Note that for a local
maximum or a local minimum the sign of df /dx changes as x goes through
the stationary point.
Figure 1: y = x3 .
10
17.4 Finding Stationary Points
If f (x) is a function we solve the equation
df
=0
dx
for x. The values of x we find are the stationary points of f (x).
Example 2 Find the stationary points for the following functions f (x):
(a) f (x) = x2 − 5x + 6.
(c) f (x) = x3 + 3x + 5.
Solution.
(a)
df
= 2x − 5.
dx
The stationary points are given by x such that
df 5
=0⇒x= .
dx 2
So one stationary point x = 5/2.
11
Graph of x2 − 5x + 6.
(b)
df
= 3x2 − 12x.
dx
The stationary points are given by x such that
df
= 0 ⇒ 3x2 − 12x = 3x(x − 4) = 0 ⇒ x = 0, x = 4.
dx
So the stationary points are x = 0, 4.
Graph of x3 − 6x2 + 7.
12
(c)
df
= 3x2 + 3.
dx
The stationary points are given by x such that
df
= 0 ⇒ 3x2 + 3 = 0 ⇒ x2 = −1.
dx
But there are no real number solutions of this equation. So no sta-
tionary points.
(d)
df
= cos(x).
dx
The stationary points are given by x such that
df
= 0 ⇒ cos(x) = 0 ⇒ x = ±π/2, ±3π/2, ±5π/2, . . . .
dx
There are an infinite number of stationary points.
(e)
df
= ex − 2.
dx
The stationary points are given by x such that
df
= 0 ⇒ ex = 2 ⇒ x = ln(2.)
dx
So one stationary point x = ln(2).
13
Graph of ex − 2x.
(f )
df x2 + 5x + 3 − (x − 1)(2x + 5)
=
dx (x2 + 5x + 3)2
−x2 + 2x + 8
=
(x2 + 5x + 3)2
−(x − 4)(x + 2)
= .
(x2 + 5x + 3)2
14
Graph of (x − 1)/(x2 + 5x + 3).
(g)
df 3x2 − 12x − 15 3(x − 5)(x + 1)
= 3 2
= 3 .
dx x − 6x − 15x + 1 x − 6x2 − 15x + 1
The stationary points are (in theory) given by x such that
df
= 0 ⇒ x = 5, x = −1.
dx
WARNING.
Does the domain of the function include these stationary points?
x = −1 is OK as f (−1) = ln(7) but f (5) = ln(125 − 150 − 75 + 1) =
ln(−99) which does not exist!! Hence only one possible stationary
point x = −1.
The graph of y = x3 − 6x2 − 15x + 1 between x = −4 and x = 9 is
as follows and we see that it is negative between x = 0.0649952 and
x = 7.88602, and for x < −2, hence y = ln(x3 − 6x2 − 15x + 1) is
not defined for these values.
15
Graph of x3 − 6x2 − 15x + 1.
(h)
df
= 15x4 − 15x2 = 15x2 (x2 − 1).
dx
The stationary points are given by 15x2 (x2 − 1) = 0 ⇒ x = 0, x =
1, x = −1
16
(i)
df √
= 5x3/2 − 15x1/2 = 5(x − 3) x.
dx
√
The stationary points are given by 5(x − 3) x = 0 ⇒ x = 0, x = 3
Note that the domain of f (x) is all x ≥ 0.
√
Graph of 7 + (2x2 − 10x) x.
df
=0
dx
for x.
Step 2: We then test all of these points to see if they are local maxima, local
minima or perhaps points of inflection.
17
17.6 Testing Stationary Points
Let a be a stationary point for the function f (x). If we have a local minimum
at x = a then df /dx goes from negative to positive as x increases through
the stationary point, and for a local maximum df /dx decreases from positive
to negative.
17.6.2 Test for local maximum: Examining signs of the first deriva-
tive
Let b < c be test points for the stationary point a.
If df /dx is positive for x = b and is negative for x = c then a is a local
maximum.
Local maximum.
18
17.6.3 Test for local minimum: Examining signs of the first deriva-
tive
Let b < c be test points for the stationary point a.
If df /dx is negative for x = b and is positive for x = c then a is a local
minimum.
Local minimum.
2. df /dx < 0 for test points either side of the stationary point.
Example 3 You are given the function f (x) and its stationary points.
For each stationary point determine if it is a local maximum or local
minimum (or neither).
19
(b) f (x) = x3 − 6x2 + 7. Stationary points are x = 0, 4.
Solution.
(a)
f 0 (x) = 2x − 5
f 0 (2) = 4 − 5 = −1 < 0
f 0 (3) = 6 − 5 > 0.
(b)
f 0 (x) = 3x2 − 12x
f 0 (−1) = 3 + 12 = 15 > 0
f 0 (1) = 3 − 12 < 0.
20
(Note that the values −1, 1 we chose did not include any stationary
point other than 0).
Next consider the stationary x = 4.
Taking test points x = 3, 5 either side of this stationary point we
have
f 0 (3) = 27 − 36 = −9 < 0
f 0 (5) = 75 − 60 = 15 > 0.
(c)
f 0 (x) = 5x4 + 3x2 = x2 (5x2 + 3)
f 0 (−1) = 8 > 0
f 0 (1) = 8 > 0.
Since f 0 (x) is not changing sign through the stationary point there
is no local maximum or minimum. This is a point of inflexion i.e.
the first derivative does not change sign as it passes through the
stationary point.
(d)
f 0 (x) = ex − 2
21
Since f 0 (x) is going from negative to positive through this stationary
point we have a local minimum.
(e)
−(x − 4)(x + 2)
f 0 (x) =
(x2 + 5x + 3)2
with stationary points x = 4, −2.
First consider the stationary point x = −2.
Taking test points x = −3, 0 either side of this stationary point we
have
−7. − 1 7
f 0 (−3) = − 2
=− <0
(9 − 15 + 3) 9
0
f (0) = 8/9 > 0.
(f )
f 0 (x) = 15x4 − 15x2 = 15x2 (x2 − 1)
22
df /dx < 0 for a test point > −1. Hence x = −1 is a local maxi-
mum.
At x = 0 we see that df /dx < 0 for a test point < 0 and df /dx < 0
for a test point > 0. Hence x = 0 is a point of inflection.
At x = 1 we see that df /dx < 0 for a test point < 1 and df /dx > 0
for a test point > 1. Hence x = 1 is a local minimum.
(g) √
f 0 (x) = 5x3/2 − 15x1/2 = 5(x − 3) x
with stationary points x = 0, 3.
Note that f (x) is not defined for x < 0 and so we cannot test the
point x = 0 to see what type of stationary point we have as we can-
not take a test point < 0.
At x = 3 we see that df /dx < 0 for a test point < 3 and df /dx > 0
for a test point > 3. Hence x = 3 is a local minimum.
23
√
Graph of 7 + (2x2 − 10x) x.
Exercise 2
You are given the function f (x) and you have to find its stationary
points. For each stationary point determine if it is a local maximum or
local minimum (or neither).
(a) f (x) = x2 + 6x − 3.
(c) f (x) = x5 + x3 + 1.
Solutions to exercise 2
24
(a) f (x) = x2 + 6x − 3.
df
= 2x + 6.
dx
The stationary points are given by x such that
df
= 0 ⇒ x = −3.
dx
So one stationary point x = −3.
Take the test points x = −4, x = −2 and we find that the first
derivative is < 0 at x = −4 and is > 0 at x = −2.
So x = −3 is a local minimum.
df
= 6x2 − 6x − 12.
dx
The stationary points are given by x such that
df
= 0 ⇒ 6x2 − 6x − 12 = 0 ⇒ x2 − x − 2 = 0.
dx
The solutions of this quadratic equation are x = 2 and x = −1.
So there are two stationary points.
For x = −1 take the test points x = −2, x = 0 and we find that
the first derivative is > 0 at x = −2 and is < 0 at x = 0 so a local
maximum.
For x = 2 take the test points x = 1, x = 3 and we find that the first
derivative is < 0 at x = 1 and is > 0 at x = 3 so a local minimum.
(c) f (x) = x5 + x3 + 1.
df
= 5x4 + 3x2 = x2 (5x2 + 3).
dx
The stationary points are given by x such that
df
= 0 ⇒ x2 (5x2 + 3) = 0 ⇒ x = 0
dx
25
as 5x2 + 3 ≥ 0.
So there is one stationary point x = 0.
Take the test points x = −1, x = 1 and we find that the first
derivative is > 0 at x = −1 and is > 0 at x = 1 so a point of
inflection.
df x2 + 5x + 6 − x(2x + 5)
=
dx (x2 + 5x + 6)2
−x2 + 6
=
(x2 + 5x + 6)2
√ √
(x − 6)(x + 6)
= − .
(x2 + 5x + 6)2
26
Note that we could not use x = −3, −2 as test points as the function
is not defined at these
√ points.
Similarly, for x = 6, using the test points x = 2, 3, df /dx √ is
decreasing as it goes through this stationary point, hence x = 6 is
a maximum.
Graph of x − sin(x).
27
17.6.5 Choosing Test Points - a warning
The following example demonstrates that you have to be careful in choosing
your test points. You must make sure that the function is defined at all
points in the interval between the test points.
df 3x2 − 12x − 15
= 3
dx x − 6x2 − 15x + 1
3(x − 5)(x + 1)
= 3 .
x − 6x2 − 15x + 1
The stationary points are (in theory) given by x such that
df
= 0 ⇒ x = 5, x = −1.
dx
WARNING.
Does the domain of the function include these stationary points? x = −1
is OK as f (−1) = ln(7) but f (5) = ln(125 − 150 − 75 + 1) = ln(−99)
which does not exist! Hence only one possible stationary point x = −1.
To determine the type of this stationary point consider the test points
x = −2, x = 0.
We have x = −2 ⇒ df /dx = −21 < 0 and x = 0 ⇒ df /dx = −15 < 0.
Hence at first sight it seems that there is no change in sign, so neither
a local max. or local min.
BUT there is a problem here. In fact x = −2 is not in the domain of
f (x) i.e. f (−2) is not defined as f (−2) = ln(−1) which does not exist.
So we have to choose our test points carefully to make sure that f (x) is
defined at all points between the test points.
Instead of x = −2 choose x = −1.5 and now f (−1.5) = ln(6.625) and
it is true that f (x) is defined at all values in between −1.5 and 0. So
these are our test points.
28
We have x = −1.5 ⇒ df /dx = 0.7924528 > 0 and x = 0 ⇒ df /dx =
−15 < 0.
Hence we have a local maximum at x = −1.
Exercise 3
Let f (x) = ln(x3 − 5x2 + 7x − 2).
Find the stationary points of f (x).
For each stationary point determine whether it is a local max. or local
min. or neither.
Solutions to exercise 3
df
= 0 ⇒ x = 7/3, x = 1.
dx
WARNING.
Does the domain of the function include these stationary points?
x = 1 is OK as f (1) = ln(1) = 0 but f (7/3) = ln(−0.185) which does
not exist!
Hence only one possible stationary point x = 1.
To determine the type of this stationary point consider the test points
x = 0.9, x = 1.1. These points are in the domain of f (x) so they can be
used.
We have x = 0.9 ⇒ df /dx > 0 and x = 1.1 ⇒ df /dx < 0.
Hence we have a local maximum at x = 1.
29
17.7.1 Second Derivative Test.
Let
d2 f
v= evaluated at x = a.
dx2
Then
At
d2 f
x = 1, = 6 − 12 = −6 < 0.
dx2
So x = 1 is a local maximum.
At
d2 f
x = 3, = 18 − 12 = 6 > 0.
dx2
So x = 3 is a local minimum.
30
Graph of x3 − 6x2 + 9x − 2.
Exercise 4
You are given the function f (x) and you have to find its stationary
points. For each stationary point determine if it is a local maximum or
local minimum (or neither) using the Second Derivative Test.
(Note that these are the same functions as Exercise 2 and if you have
found their stationary points already you can check that the Second
Derivative Test gives the same local max or min (or neither).)
(a) f (x) = x2 + 6x − 3.
(c) f (x) = x5 + x3 + 1.
31
Solutions to exercise 4
(a)
df
= 2x + 6.
dx
One stationary point x = −3
We have at this stationary point that
d2 f
= 2 > 0.
dx2
So x = −3 is a local minimum.
d2 f
= 12x − 6x.
dx2
At x = 2 the second derivative is > 0 so a local minimum.
At x = −1 the second derivative is < 0 so a local maximum.
(c) f (x) = x5 + x3 + 1.
df
= 5x4 + 3x2 = x2 (5x2 + 3).
dx
There is one stationary point x = 0 as 5x2 + 3 ≥ 3.
d2 f
= 20x3 + 6x.
dx2
At x = 0 the second derivative is 0 so no information as to its type.
So we have to use the first derivative test and we see from the solu-
tions to Exercise 2 that this is a point of inflection.
32
(d) f (x) = ln(x) + 1/x.
df 1 1
= − 2.
dx x x
The stationary point is x = 1.
d2 f 1 2
2
= − 2 + 3.
dx x x
At x = 1 the second derivative is > 0 so a local minimum.
df x2 + 5x + 6 − x(2x + 5)
=
dx (x2 + 5x + 6)2
−x2 + 6
=
(x2 + 5x + 6)2
√ √
(x − 6)(x + 6)
= − .
(x2 + 5x + 6)2
√ √
The stationary points are x = 6, x = − 6
It is much easier to use the first derivative test as differentiating
again may lead to many mistakes! √
We have see from √ the solutions to Exercise 2 that x = − 6 is a
minimum and x = 6 is a maximum.
33
So an infinite number of stationary points.
d2 f
= sin(x) = 0
dx2
at all these stationary points. So no information using this test.
However, the solution in Exercise 2 using the first derivative test
shows that these are all points of inflexion.
34
stationary point as detailed above.
It is easier to use the second derivative test if the second derivative is easy
to find, for example in the last example where we had a polynomial.
However in an example such as
(x2 + 8) × 1 − 2x × (x − 1)
f 0 (x) =
(x2 + 8)2
−x2 + 2x + 8
=
(x2 + 8)2
−(x − 4)(x + 2)
= .
(x2 + 8)2
35
Graph of (x − 1)/(x2 + 8).
Stationary point x = 4.
The test points we choose are x = 3, x = 5 as there are no sta-
tionary points other than 4 in between them and f (x) is defined
at all points in the interval [3, 5].
Now f 0 (3) > 0 and f 0 (5) < 0 so we have a local maximum as
f 0 (x) is decreasing through the stationary point.
36
(a) f 00 (a) < 0 ⇒ a is a local maximum
(b) f 00 (a) > 0 ⇒ a is a local minimum.
0 −x2 + 2x + 8
f (x) = ⇒
(x2 + 8)2
(x2 + 8)2 .(−2x + 2) − (−x2 + 2x + 8).4x(x2 + 8)
f 00 (x) =
(x2 + 8)4
(x2 + 8)[(x2 + 8)(−2x + 2) − (−x2 + 2x + 8).4x]
=
(x2 + 8)4
2x3 − 6x2 − 48x + 16
= .
(x2 + 8)3
Stationary point x = 4.
We have f 00 (4) = (128 − 96 − 192 + 16)/243 < 0. So x = 4 is a
local maximum, agreeing with the first method.
Stationary point x = −2.
We have f 00 (−2) = (−16 − 24 + 96 + 16)/123 > 0. So x = −2 is
a local minimum, agreeing with the first method.
You can judge which of the above methods is easier for this example - but
note that a lot of mistakes can be made in finding the second derivative and
its value at the stationary points.
37
17.9 Videos
Stationary Points 1
This video finds the stationary points of f (x) = x3 − 3x2 − 1 and classi-
fies them.
Stationary Points 2
The stationary points of f (x) = 3x4 + 4x3 − 5 are found and shown to
be a local maximum, a local minimum and a point of inflection.
Stationary Points 3
√
This video finds the stationary points of f (x) = 40 + (6x3 − 56x) x and
shows that you have to take into account the domain of the function.
In this video a formula for drug absorption is given and a maximum value is
found.
38