WORKSHEET 7
MATH1014 (CALCULUS), SPRING SEMESTER
(1) Find the critical points of the function f (x, y) = x 4 − 4x 2 + y 2 and classify them.
Solution. The gradient of f is
(4x 3 − 8x, 2 y).
p
Setting this to zero, we get y = 0 and x 3 = 2x, which means that either x = 0 or x = ± 2.
The Hessian matrix is
12x 2 − 8 0
.
0
2
At x = 0, p
y = 0, the determinant of the Hessian is negative, which corresponds to a saddle point.
At x = ± 2, the determinant of the Hessian as well as the first entry are both positive, which
corresponds to local minima.
□
(2) Find the point on the plane x −2 y +3z = 6 that is closest to the point (0, 1, 1), without using Lagrange
multipliers.
Solution. The square of the distance of a point (x, y, z) to the given point (0, 1, 1) is computed
using the equation x 2 + ( y − 1)2 + (z − 1)2 . On the given plane, we have x = 6 + 2 y − 3z. So
we are trying to minimise
(6 + 2 y − 3z)2 + ( y − 1)2 + (z − 1)2
with respect to ( y, z) without any further constraints. The unique critical point of this function
is where y = 2/7 and z = 29/14, and thus x = 5/14. One can check that this is the unique
minimum.
□
(3) Find the points on the sphere x 2 + y 2 +z 2 = 36 that are closest to and farthest from the point (1, 2, 2),
using Lagrange multipliers. Think about how you might do this without Lagrange multipliers.
Solution. Set g(x, y, z) = x 2 + y 2 + z 2 , so that ∇g = (2x, 2 y, 2z). The square of the distance
from the point (1, 2, 2) is given by
f (x, y, z) = (x − 1)2 + ( y − 2)2 + (z − 2)2 .
The gradient of f is
∇ f = (2(x − 1), 2( y − 2), 2(z − 2)).
We now use Lagrange multipliers to set ∇ f = λ∇g, which gives
2(x − 1) = λ(2x),
2( y − 2) = λ(2 y),
2(z − 2) = λ(2z).
These can be rewritten as
x = 1/(1 − λ),
y = 2/(1 − λ),
Putting in the constraint, we have
z = 2/(1 − λ).
1+4+4
= 36,
(1 − λ)2
which means that 1−λ = ±1/2. This gives two possible max/min points: (2, 4, 4) and (−2, −4, −4).
□
ADAPTED FROM THE WORKSHEET 7 OF DR. ASILATA BAPAT, 2021
1
(4) Find the extreme values of f on the region described by the inequality, where
f (x, y) = e−x y ,
x 2 + 4 y 2 ≤ 1.
Note that you must compare the critical points in the interior with the points on the boundary obtained from the Lagrange multiplier constraint.
Solution. First let us compute the gradient:
∇ f = − y e−x y
−x e−x y .
The gradient vanishes only at the point (x, y) = (0, 0). This point is in the interior of the region
described. At this point, the value of f is f (0, 0) = 1.
On the boundary, we use Lagrange multipliers with g(x, y) = x 2 + 4 y 2 = 1. We have ∇g =
(2x, 8 y). Setting ∇ f = λ∇g, we have
− y e−x y = 2λx,
−x e−x y = 8λ y.
Note that λ = 0 gives the point (x, y) = (0, 0), which is not on the boundary. Therefore λ ̸= 0.
Again, setting x = 0 implies that y = 0, and setting y = 0 implies that x = 0, which is not on
the boundary, so we see that both x and y are nonzero. Now dividing the two equations, we
have
y
x
=
.
x
4y
This gives that x 2 = 4 y 2 , which means x = ±2 y. Plugging this into the constraint, we have
g(x, y) = x 2 + 4 y 2 = 8 y 2 = 1,
p
p
which gives y = ±1/2 2. Therefore x = ±1/ 2. This gives four additional critical points
(for the four combinations). Let us compute the values of f at these points. At two of the four
points, we have x y = 1/4. At the other two, we have x y = −1/4. In the first case, we have
f (x, y) = e−1/4 and in the second case we have e1/4 . The first value is less than 1, so it is the
minimum. The second value is larger than 1, so it is the maximum.
□
(5) The plane x − y + z = 2 intersects the cylinder x 2 + y 2 = 4 in an ellipse. Find the points on this
ellipse that are closest to and farthest away from the origin.
Solution. The square of the distance of a point (x, y, z) from the origin is given by the quantity
f (x, y, z) = x 2 + y 2 + z 2 . The first constraint is that g(x, y, z) = x − y + z = 2, and the second
constraint is that h(x, y, z) = x 2 + y 2 = 4. Let us set up the Lagrange multiplier equation:
∇ f = λ∇g + µ∇h.
This gives
(2x, 2 y, 2z) = λ(1, −1, 1) + µ(2x, 2 y, 0) = (λ + 2µx, −λ + 2µ y, λ).
Therefore λ = 2z, and
2x = 2z + 2µx, 2 y = −2z + 2µ y.
This gives x(1 − µ) = z and y(1 − µ) = −z, which means that x(1 − µ) = − y(1 − µ).
(a) The first possibility is that µ = 1. In this case, z = 0, which means that we have
x − y = 2,
x 2 + y 2 = 4.
So y = x − 2, which gives x 2 + (x p
− 2)2 = 4. This equation expands to 2x 2 − 4x = 0, which
means that either x = 0 or p
x = 2. If x = 0 then y = −2. In this case, the distance of
(0, −2,p
0) from the origin
is
0 + 4 + 0 = 2.
p
p p
If
x
=
2
then
y
=
2
−
2.
In
this
case,
the
distance
of
(
2, 2 − 2, 0) from the origin is
p
p
p
p
2 + 2 − 4 2 + 4 = 8 − 4 2 ≈ 1.53.
2
2
(b) The second possibility
is that
p
p µ ̸= 1, which
p means that x =p− y. This means that x + y = 4
gives
of
p yp= ± 2.pIf y = 2 then x = − 2, so z = 2 + 2 2. In this
p case, the distance
p
(− 2,
2,
2+2
2)
from
the
origin
is
approximately
5.22.
If
y
=
−
2
then
x
=
2,
so
z
=
p
p
p
p
2 − 2 2. In this case, the distance of ( 2, − 2, 2 − 2 2) from the origin is approximately
2.16.
2
We see that the maximum value is approximately 5.16 and the min is approximately 1.53.
□
3