EXAMPLES ON CALCULATING MAXIMA AND MINIMA

EXAMPLES ON CALCULATING MAXIMA AND MINIMA
Example 1 Let n ∈ N, n ≥ 2 and let n be even. Let f : R2 −→ R3 be given by
f (x, y) = xn y 2 .
The problem is to calculate all maxima and minima, relative and absolute, of this function
on the disc
D = {(x, y) : x2 + y 2 ≤ 1}.
Note that as n is even, f (x, y) ≥ 0 for all (x, y) ∈ D. Critical points occur at (x, y) when
∂f
∂f
(x, y) =
(x, y) = 0.
∂x
∂x
Now we have
∂f
∂f
= nxn−1 y 2 and
= 2xn y.
∂x
∂y
Thus, in this case, we see that critical points occur if x = 0 or y = 0. That is, in D the
critical points are those of the form (x, 0) for −1 ≤ x ≤ 1 or (0, y) for −1 ≤ y ≤ 1. At
these points, f (x, y) = 0, so as f (x, y) ≥ 0 for all (x, y) ∈ D, we see that at the critical
points, f has an absolute minimum value of 0.
Now f has an absolute maximum value over D by virtue of Theorem 13 in Chapter 4
of the notes. As this maximum does not occur inside D (for if it did it would have to be
at a critical point and we have seen that these produce only minima), it must produce the
maximum at a point on the circumference. On the circumference, we have y 2 = 1 − x2 ,
so that we then have
f (x, 1 − x2 ) = xn (1 − x2 ) = xn − xn+2 .
So we have to find the maximum of the function x 7−→ xn − xn+2 for −1 ≤ x ≤ 1. At
x = 0, ±1 the function value is 0, but differentiating gives that a maximum may occur at
a non-zero x value when
nxn−1 − (n + 2)xn+1 = 0,
that is, when
x2 =
n
n
2
and then y 2 = 1 − x2 = 1 −
=
.
n+2
n+2
n+2
Thus, maxima may occur at the points
! r
!
!
!
r
r
r
r
r
r
r
n
2
n
2
n
2
n
2
,
,
,−
, −
,
, −
,−
,
n+2
n+2
n+2
n+2
n+2
n+2
n+2
n+2
all of which are on the circumference of D. In fact, the function has an absolute maximum
over D at each of these points, and the maximum value of the function (occurring at each
of these points) is
n/2
2
n
.
n+2 n+2
1
Note that we have used in several places that n is even.
A further exercise would be to try the case when n is odd.
*A further exercise is to show, using the above, is that if n is even and if
Mn = max{xn y 2 : x2 + y 2 ≤ 1},
then
n
2
nMn = .
n→∞
e
lim
even,
(not examinable !).
Example 2
Let f : R3 −→ R be given by
f (x, y, z) = x2 y + y 2 z + z 2 − 2x.
To get the critical points of f we calculate the first order partial derivatives of f and find
where they are all equal to 0. We have
D1 f (x, y, z) = 2xy − 2, D2 f (x, y, z) = x2 + 2yz and D3 f (x, y, z) = y 2 + 2z.
Thus (x, y, z) is a critical point when
2xy − 2 = 0,
(1)
2
x + 2yz = 0,
(2)
and
y 2 + 2z = 0.
(3)
2
2
3
Solving (3) we get 2z = −y . Put this in (2), which gives x − y = 0. This gives, using
(1) in the form that x = 1/y, that y 5 = 1, so that y = 1. Then from (1) we have x = 1
and from (3) we have z = −1/2. Thus, there is exactly one critical point, (1, 1, −1/2).
Example 3
Let f : R2 −→ R be given by
f (x, y) = xye−(x
2 +y 2 )/2
.
The problem is to find any maxima, minima, and saddle points. First, we look for critical
points. We have, using the product rule for differentiation,
fx (x, y) = ye−(x
2 +y 2 )/2
− x2 ye−(x
2 +y 2 )/2
= (1 − x2 )ye−(x
2 +y 2 )/2
− xy 2 e−(x
2 +y 2 )/2
2 +y 2 )/2
= x(1 − y 2 )e−(x
,
(1)
.
(2)
and
fy (x, y) = xe−(x
2 +y 2 )/2
(In fact, as f is symmetric in x, y, (2) follows from (1) simply by interchanging x, y.) (1)
and (2) show that (x, y) is a critical point when
y(1 − x2 ) = 0 and x(1 − y 2 ) = 0.
This gives 5 critical points
(0, 0), (1, 1), (1, −1), (−1, 1) and (−1, −1).
We use the “AC − B 2 ” test, to see which of these are relative maxima, relative minima
or saddle points.
2
0.32
0.24
0.16
0.08
0.0
−0.08
−0.16
−0.24
−2
−0.32
−2
−1
1
0
−1
0
x
1
22
y
FIGURE. The figure illustrates the behaviour of (x, y) 7−→ xyexp((−x2 − y 2 )/2.
There is a saddle point at (0, 0), relative maxima at (1, −1) and (−1, 1), and relative
minima at (1, 1) and (−1, −1) (see discussion below).
We have, again using the product rule in (1) and (2),
h
i
2
2
2
2
2
2
fxx = y − 2xe−(x +y )/2 − x(1 − x2 )e−(x +y )/2 = −xy(3 − x2 )e−(x +y )/2 ,
h
i
2
2
2
2
2
2
fxy = fyx = (1 − x2 ) e−(x +y )/2 − y 2 e−(x +y )/2 = (1 − x2 )(1 − y 2 )e−(x +y )/2 .
and
h
i
2
2
2
2
2
2
fyy = x − 2ye−(x +y )/2 − y(1 − y 2 )e−(x +y )/2 = −xy(3 − y 2 )e−(x +y )/2 .
Thus, at (0, 0) we have A = C = 0 and B = 1, so that AC − B 2 = −1 < 0. So, there is a
saddle point at (0, 0).
At (−1, 1) and (1, −1) we have A = C = 2e−1 > 0 and B = 0, so A > 0 and
AC − B 2 = 4e−2 > 0. So, f has relative minima at (1, −1) and (−1, 1) and the value of
3
the minimum at each point is −e−1 . These relative minimum values are absolute minimum
values for f (why?).
At (1, 1) and (−1, −1) we have A = −2e−1 and B = 0, so A < 0 and AC − B 2 =
4e−2 > 0. So, f has relative maxima at (1, −1) and (−1, 1) and the value of the maximum
at each point is e−1 . These relative maximum values are absolute maximum values for f
(why?).
Rod Nillsen May 2007
4