Notice: this material must not be used as a substitute for attending
ation. Maxima/minima occur when f (x) = 0.
• x = a is a maximum if f (a) = 0 and f (a) < 0;
• x = a is a minimum if f (a) = 0 and f (a) > 0;
A point where f (a) = 0 and f (a) = 0 is called a point of inﬂection.
Geometrically, the equation y = f (x) represents a curve in the two-dimensional (x, y)
plane, and we call this curve the graph of the function f (x).
Our aim is to generalise these ideas to functions of two variables. Such a function
would be written as
z = f (x, y)
where x and y are the independent variables and z is the dependent variable. The
graph of such a function is a surface in three dimensional space. A simple example
1 + x
z is the height of the surface above a point (x, y) in the x − y plane.
minimum points (or both). But for surfaces there is a third possibility - a saddle
A point (a, b) which is a maximum, minimum or saddle point is called a stationary
we need is a mathematical method for ﬁnding the stationary points of a function
f (x, y) and classifying them into maximum, minimum or saddle point. This method
is analogous to, but more complicated than, the method of working out ﬁrst and
second derivatives for functions of one variable.
Let’s remind ourselves about partial derivatives. The sort of function we have in mind
might be something like
f (x, y) = x
and the partial derivatives of this would be
use the other, subscript, notation for partial derivatives:
Finding stationary points
To ﬁnd the stationary points of f (x, y), work out
This gives you two equations for two unknowns x and y. Solve these equations for x
and y (often there is more than one solution, as indeed you should expect. After all,
even functions of one variable may have both maximum and minimum points).
Classifying stationary points
ogous to, but somewhat more involved, than the corresponding ‘second derivative
test’ for functions of one variable. Below is, essentially, the second derivative test for
functions of two variables:
Let (a, b) be a stationary point, so that f
= 0 and f
= 0 at (a, b). Then:
• if f
< 0 at (a, b) then (a, b) is a saddle point.
> 0 at (a, b) then (a, b) is either a maximum or a minimum.
– if f
< 0 at (a, b) then (a, b) is a maximum point
> 0 and f
> 0 at (a, b) then (a, b) is a minimum point
= 0 then anything is possible. More advanced methods are required
Let’s give some idea where the above conditions come from. It is all based on Taylor’s
theorem for a function of two variables. Taylor’s theorem for a function of one variable
f (a + h) = f (a) + hf (a) +
f (a + h, b + k) = f (a, b) + h
(a, b) + k
(a, b) +
(a, b) + 2hk
(a, b) + k
The higher order terms can be neglected in straightforward cases. Lets suppose (a, b)
is a maximum point. Then f
= 0 at (a, b) and, because (a, b) is a local
maximum the function must be smaller at neighbouring points, i.e. when h and k are
f (a + h, b + k) < f (a, b)
But from Taylors theorem, neglecting higher order terms and noting that the ﬁrst
derivative terms are zero at (a, b),
f (a + h, b + k) = f (a, b) +
at (a, b).
However f (a + h, b + k) < f (a, b), hence
at (a, b)
for all small values of h and k. Dividing by k
Let ξ = h/k. Then even though h and k are both small, ξ doesn’t have to be small.
So we have
ξ + f
for all real numbers ξ.
Thus we have a quadratic expression that is negative for all values of its variable ξ
(and so, in particular, has no roots). A few graphs will show that this is only possible
< 0, f
> 0 - the latter condition is the one to do with
Similar analysis yields the conditions under which a stationary point is a minimum
or saddle point.
Lets work out the stationary points for the function
f (x, y) = x
and classify them into maxima, minima and saddles.
We need all the ﬁrst and second derivatives so lets work them out. we have
= 0. This gives 2x = 0 and 2y = 0 so that
there is just one stationary point, namely (x, y) = (0, 0). We now need to classify it.
= (2)(2) − 0
= 4 > 0
= 2 > 0 and f
= 2 > 0. Hence it is a
minimum. Our conclusion is that this function has just one stationary point (0, 0)
and that it is a minimum.
The example we have just done is very straightforward. It is untypical in that most
functions have more than one stationary point. The next example again has just one
stationary point but the analysis is slightly more involved.
f (x, y) = e
The ﬁrst and second order partial derivatives of this function are:
(1 − 2x
by the product rule
(1 − 2y
Stationary points are whenf
= 0 and so there is only one stationary
= (−2)(−2) − 0
< 0 and f
< 0 it is a maximum.
f (x, y) = 2 − x
− xy − y
For this function
= −2x − y
= −x − 2y
(x, y) = (0, 0). We have
= (−2)(−2) − (−1)
= 3 > 0
f (x, y) = 2x
= 12xy − 9y
For stationary points we need
− 150 = 0 and 12xy − 9y
= 25 and y(4x − 3y) = 0
these possibilities now need to be considered. If y = 0 then the ﬁrst equation implies
= 25 so that x = ±5 giving (5, 0) and (−5, 0) as stationary points.
stationary points (3, 4) and (−3, −4).
Thus in total there are four stationary points (5, 0), (−5, 0), (3, 4) and (−3, −4).
Each of these must now be classiﬁed into max, min or saddle.
• Lets start with (5, 0). For this stationary point, f
> 0 so it is
either a max or a min. But f
= 60 > 0 and f
= 60 > 0. Hence (5, 0) is a
• Now deal with (−5, 0). For this stationary point, f
> 0 so
= −60 < 0 and f
= −60 < 0. Hence
(−5, 0) is a maximum.
• Now deal with (3, 4). For this stationary point, f
(3, 4) is a saddle.
• Now deal with (−3, −4). For this stationary point, f
= −3600 < 0
Practical Example 1
A container with an open top is to have 10 m
capacity and be made of thin sheet
amount of metal.
Solution: Let A be the total area of metal used to make the box, and let x and y be
the length and width and z the height. Then
A = 2xz + 2yz + xy
because the volume is 10 m
. This implies that z =
. Putting this into the formula
A = 2x
We shall apply our techniques to this function. Now
Since the zero root y = 0 is obviously not consistent with having a volume of 10 m
we reject y = 0 and conclude that y
= 20 so that y = 20
= 2.714 metres.
we conclude x = 2.714 metres also. To ﬁnd z, use z =
We have to show that these values do indeed give a minimum. Now
So, when (x, y) = (2.714, 2.714),
= (2)(2) − 1
> 0 and A
> 0 so it is a minimum.
Our conclusion is that the box should have length 2.714 m, width 2.714 m and height
1.357 m. The actual area of metal used will then (from the formula for A) be 22.1 m
Practical Example 2
Let’s make some guttering from a strip of metal 12 in wide. We want to determine
where to bend it (i.e. the value of x in the notation introduced below) and what angle
to bend it at so as to maximise the cross-sectional area and hence the capacity of the
Solution. Look at the cross-section of the gutter. Let x be the length of each of the
“sloping” bits so that the base length is 12 − 2x. Let θ be the angle that each sloping
side makes with the horizontal.
The ‘height’ of the cross section is x sin θ. the rectangular part of the cross-section
(the middle part) has area (12 − 2x)x sin θ.
Each triangle at the end has area
(x cos θ)(x sin θ) =
sin θ cos θ.
Thus the total area A of the cross-section is given by
A = (12 − 2x)x sin θ + x
sin θ cos θ
= (12 − 2x)x cos θ + x
θ − sin
θ − 1)
(12 − 4x) sin θ + 2x sin θ cos θ = 0
might be zero ﬁrst. if this were so then we would have θ = 0 or θ = π. These
possibilities imply, respectively, that the metal has not been folded at all or that it
has been folded completely and neither of these possibilities is likely to result in a
sensibly designed gutter. Hence it is OK to cancel sin θ and in doing so we get
2x cos θ = 4x − 12
cos θ =
Putting this into the equation ∂A/∂θ = 0 gives
2x − 6
2x − 6
− 1 = 0
x = 4. This gives cos θ =
so that θ = π/3 radians or 60
Strictly speaking we should now evaluate the second derivatives and check that we