0% found this document useful (0 votes)
86 views5 pages

Homework 22 Solutions: Math 21a Spring, 2014

This document contains solutions to homework problems involving using Lagrange multipliers to find extrema of functions subject to constraints. The first problem finds the maximum of an exponential function on a constraint, explaining why there is no minimum. The second problem finds the maximum and minimum of a multi-variable function on a sphere. The third problem finds the maximum and minimum of another function on a disk. The fourth problem uses Lagrange multipliers to minimize the cost of materials for an aquarium given a volume constraint.

Uploaded by

PARVATI SINGH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views5 pages

Homework 22 Solutions: Math 21a Spring, 2014

This document contains solutions to homework problems involving using Lagrange multipliers to find extrema of functions subject to constraints. The first problem finds the maximum of an exponential function on a constraint, explaining why there is no minimum. The second problem finds the maximum and minimum of a multi-variable function on a sphere. The third problem finds the maximum and minimum of another function on a disk. The fourth problem uses Lagrange multipliers to minimize the cost of materials for an aquarium given a volume constraint.

Uploaded by

PARVATI SINGH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Math 21a Homework 22 Solutions Spring, 2014

1. (Based on Stewart 11.8 #6 ) Consider the function f (x, y) = exy , and the constraint x3 + y 3 = 16.
(a) Use Lagrange multipliers to find the coordinates (x, y) of any points on the constraint where the function f could
attain a maximum or minimum.

Solution: We wish to find the extreme values of the function f (x, y) = exy subject to the constraint g(x, y) =
x3 + y 3 = 16. Lagrange multipliers tells us that ∇f = λ∇g or hyexy , xexy i = h3λx2 , 3λy 2 i, and so we get the
system

yexy = 3λx2
xexy = 3λy 2
x3 + y 3 = 16.

Note that if either x or y is zero, then x = y = 0, which contradicts x3 + y 3 = 16, so we can assume that x 6= 0
and y 6= 0. Then
yexy xexy
λ= = ,
3x2 3y 2
from which we get x3 = y 3 and so x = y. Since x3 + y 3 = 16, we get 2x3 = 16 or x = y = 2. Thus the point (2, 2)
is a point on the constraint where the function f could attain a maximum or minimum.

(b) For each point you found in part (a), is the point a maximum, a minimum, both or neither? Explain your answer
carefully. What are the minimum and maximum values of f on the constraint? Please explain your answers
carefully.

Solution: We can see that there is no minimum value, since we can choose points satisfying the constraint
x3 + y√3 = 16 that make f (x, y) = exy arbitrarily close to 0 (but never equal 0). More specifically, if x is given, then
y = 3 16 − x3 . If x grows positive without bound (x → +∞), then y grows negative without bound (y → −∞)
and so exy approaches zero (xy → −∞ and so exy → 0). So there is no minimum value of f and the maximum
value is f (2, 2) = e4 .

(c) The extreme value theorem, which we covered last week, guarantees that under the right circumstances, we are
guaranteed to find absolute minima and maxima for a function f on a certain constraint. Please explain why parts
(a) and (b) don’t violate the extreme value theorem.

Solution: The extreme value theorem states that if a real-valued function f is continuous in a closed and
bounded region, then f must attain its maximum and minimum value, each at least once. This isn’t satisfied when
considering the lower bound, since the constraint approaches 0 but never reaches it. So we haven’t broken any
rules of the extreme value theorem.
In Figure 1, we show the constraint g(x, y) = 16 and a number of level curves f (x, y). These level curves are all

Figure 1: The constraint and level curves for Problem 1

powers of 2. In the first and third quadrant they are positive powers, increasing as we come out from the origin.
In the second and fourth quadrants they are negative powers of 2, decreasing as we come out from the origin. The
maximum is shown as a red dot; the value f (2, 2) = e4 ≈ 54.6 puts it between the level curves f = 32 and f = 64.
2. (Stewart 11.8 #10 ) Use Lagrange multipliers to find the maximum and minimum values of the function f (x, y, z) =
x2 y 2 z 2 subject to the constraint x2 + y 2 + z 2 = 1.

Solution: We wish to find the extreme values of the function f (x, y, z) = x2 y 2 z 2 subject to the constraint g(x, y, z) =
x2 + y 2 + z 2 = 1. Lagrange multipliers tells us that ∇f = λ∇g or h2xy 2 z 2 , 2yx2 z 2 , 2zx2 y 2 i = h2λx, 2λy, 2λzi, and so
we get the system

2xy 2 z 2 = 2λx
2yx2 z 2 = 2λy
2zx2 y 2 = 2λz
x2 + y 2 + z 2 = 1

Let’s consider two cases: λ = 0 or λ 6= 0.


If λ = 0, then the product of x, y and z is zero. This means that one, two or all three of these variables are zero. It
can’t be all three because of the constraint equation, so we end up with the points
     
(x, y, z) = (0, 0, ±1), (0, ±1, 0), (±1, 0, 0), 0, ± √12 , ± √12 ± √12 , 0, ± √12 and ± √12 , ± √12 , 0 .

At all of these points, the value of f (x, y, z) = x2 y 2 z 2 is zero. (Note that this is the absolute minimum, because f can
never be negative.)
On the other hand, if λ 6= 0, then none of x, y and z are zero. Solving for λ in the first three equations gives us
1 1
λ = y 2 z 2 = x2 z 2 = x2 y 2 . In this case we find that x2 = y 2 = z 2 = . Thus the maximum value of f is at these
3 27
eight points  
(x, y, z) = ± √13 , ± √13 , ± √13 .

3. (Stewart 11.8 #18 ) Find the extreme values of the function f (x, y) = 2x2 + 3y 2 − 4x − 5 on the (closed, bounded) region
described by the inequality x2 + y 2 ≤ 16.

Solution: We need to use Lagrange multipliers for the boundary and partial derivatives to determine critical points
from the interior. Let’s consider the interior first. The gradient of f (x, y) = 2x2 +3y 2 −4x−5 is ∇f = h4x−4, 6yi = h0, 0i,
which vanishes only at (x, y) = (1, 0). This critical point of f lies in the region x2 + y 2 < 16, and at this point the value
of f is f (1, 0) = −7.
On the boundary, we find the extreme values of f (x, y) = 2x2 +3y 2 −4x−5 subject to the constraint g(x, y) = x2 +y 2 = 16
using Lagrange multipliers. Then ∇f = λ∇g gives us the system

4x − 4 = 2λx,
6y = 2λy
x + y 2 = 16.
2

From the second equation, we have either y = 0 or y 6= 0. If y = 0, then x = ±4 from the constraint. If y 6= 0, then
the second equation√gives λ = 3. The first equation is then 4x − 4 = 2 · 3x, from which we find x = −2 and (from the
constraint) y√= ±2 3. Thus on the boundary, the extreme points must happen at (some subset of) the points (±4, 0)
and (−2, ±2 3).
Now we compare the value of f at each of the points we’ve found in the previous two paragraphs. It’s easy if we make
small table:
Point f (x, y) =
(x, y) 2x2 + 3y 2 − 4x − 5
(1, 0) 7
(4, 0) 11
(−4,√ 0) 43
(−2, 2 √3) 47
(−2, −2 3) 47
.

Thus the maximum value of f (x, y) on the disk x +y 2 ≤ 16 is f (−2, ±2 3) = 47, and the minimum value is f (1, 0) = −7.
2
4. (Stewart 11.8 #38 ) Use Lagrange multipliers to solve the following problem. The base of an aquarium with given
volume V is made of slate and the sides are made of glass. (There is no top on the aquarium.) If slate costs five times
as much (per unit area) as glass, find the dimensions of the aquarium that minimize the cost of the materials. Your
answers will be given in terms of V .

Solution: We can write the cost function as C(x, y, z) = 5xy + 2xz + 2yz and our constraint as g(x, y, z) = xyz = V .
Since ∇C = h5y + 2z, 5x + 2z, 2x + 2yi and ∇g = hyz, xz, xyi, the equation ∇f = λ∇g becomes

5y + 2z = λyz, (1)
5x + 2z = λxz, (2)
2x + 2y = λxy, (3)
xyz = V (4)

Now subtracting equation (2) from equation (1) gives us λz(y − x) = 5(y − x). So either x = y or x − y 6= 0, in which
case λz = 5. This second case is impossible: if λz = 5, then z 6= 0 so we can solve for λ as λ = z5 . Plugging this into (1)
gives 5y + 2z = 5y, or z = 0. But we’ve already seen that z can’t be zero, since λz = 5. So we must have x = y.
Since x = y, equations 1 and (2) are the same, and we can write the above system as

5y + 2z = λyz, (10 )
4y = λy 2 , (30 )
y2 z = V (40 )

From equation (30 ), we see that either y = 0 (which it can’t, since y 2 z = V ) or λy = 4. Plugging this last equation
into (10 ), we get 5y + 2z = 4z, or 5y = 2z. Hence z = 52 y, from which equation (40 ) becomes 25 y 3 = V . Thus the
r r  2/3
2 5 3 2 5
dimensions which minimize cost are x = y = 3 V units, z = V = V 1/3 units.
5 2 5 2

5. Let R be the (closed and bounded) region described by {x2 + y 2 ≤ 9 and y ≥ 0}.
(a) Use Mathematica as follows to plot the region R and the level sets of f together:

region = RegionPlot[x^2+y^2 <= 9 && y >= 0, {x,-4,4}, {y,-2,4}, AspectRatio->3/4]


levels = ContourPlot[x^2-(y-2)^2, {x,-4,4}, {y,-2,4}, ContourShading->False, Contours->Range[-20,20]]
Show[region,levels]

Solution: Here’s a Mathematica sketch with the additional options Axes -> True, Frame -> False.

(b) Find the absolute minimum and maximum values of the function f (x, y) = x2 − (y − 2)2 on the region R, and the
points at which those extrema occur. Please explain carefully what you are doing in your solution.

Solution: We need to use Lagrange multipliers for the boundary and partial derivatives to determine critical
points from the interior. Let’s consider the interior first. The gradient of f (x, y) = x2 − (y − 2)2 is ∇f =
h2x, −2(y − 2)i, which is the zero vector 0 only when x = 0 and y = 2. Thus (x, y) = (0, 2) is the only critical
point of f .
Now let’s evaluate the function at the boundary. We wish to extremize the function f (x, y) = x2 − (y − 2)2 subject
to one of two constraints: g(x, y) = x2 + y 2 = 9 (for the semicircle) and h(x, y) = y = 0 (for the base of the
half-disc). Thus we really have two Lagrange multipliers problems: ∇f = λ∇g and ∇f = λ∇h.
We’ll start with the first Lagrange multipliers problem. We get the system
2x = 2λx, (5)
−2(y − 2) = 2λy, (6)
x2 + y 2 = 9, (y ≥ 0) (7)
Let’s consider the individual cases. From (5), either x = 0 (in which case y = 3 from the boundary, not −3) or
x 6= 0. If x 6= 0, then λ = 1. Plugging
√ this into equation (6), we get −2y + 4 = 2y or y = 1. From equation (7), this
gives two points (x, y) √= (±2 2, 1). Thus this Lagrange multipliers problem has given us three candidate points:
(x, y) = (0, 3) and (±2 2, 1).
The other Lagrange multipliers problem involves solving ∇f = λ∇h, which is h2x, −2(y − 2)i = λh0, 1i. This
becomes the system of equations
2x = 0, (8)
−2(y − 2) = λ, (9)
y = 0, (y ≥ 0) (10)
Clearly equations (8) and (10) give us only the point (x, y) = (0, 0).
Now we evaluate all the points:
point (x, y) f (x, y) Classification
(0,
√2) 0
(±2 2, 1) 7 maximum
(0, 3) −1
(0, 0) −4 minimum
(±3, 0) 5
Notice that we’ve also included the points (x, y) = (±3, 0), since these are the endpoints of our boundary. You
could easily come up with examples where the maximum and minimum values of a function occurs only at the
endpoints of our boundaries g(x, y) =constant and h(x, y) =constant. One simple example is f (x, y) = x, which
gives us this picture:

The region R with contours of f (x, y) = x

(c) On your printout from part (a), indicate where the minima and maxima are located – just draw them in.
Solution: Here we’ve drawn (and labeled) the minima and maxima in red. In blue we’ve indicated the other
points we checked as well:
6. (Optional: 4 extra credit points) Let E be the (closed and bounded) solid region described by {x2 + y 2 + z 2 ≤
9 and z ≥ 0}. Find the absolute minimum and maximum of the function f (x, y, z) = x2 − y 2 + (z − 2)2 on the region
E. Please explain your solution very carefully.

Solution: Here we use the same process as Problem 5 to solve this. That is, we find the critical points on the
interior and use Lagrange multipliers on the boundary to find additional points. In the previous problem we included
two additional points because they were the edges of our boundaries. This time, we’ll have to worry about the “edge”
circle x2 + y 2 = 9 when z = 0.
Let’s find the critical points in the interior first. The gradient of f (x, y, z) = x2 −y 2 +(z −2)2 is ∇f = h2x, −2y, (2z −2)i,
which equals 0 = h0, 0, 0i only when x = 0, y = 0 and z = 2. So (x, y, z) = (0, 0, 2) is the only critical point of f .

Again the boundary is two Lagrange multipliers problems, one with constraint g(x, y, z) = x2 + y 2 + z 2 = 9 (with z ≥ 0)
and the other with constraint h(x, y, z) = z = 0 (with x2 + y 2 ≤ 9). (In addition, we must also deal with the common
edge of these boundaries: x2 + y 2 = 9 and z = 0.)

Let’s start with the first Lagrange multiplier problem: extremize f (x, y, z) = x2 − y 2 + (z − 2)2 subject to the constraint
g(x, y, z) = x2 + y 2 + z 2 = 9 (with z ≥ 0). The system ∇f = λ∇g becomes

2x = 2λx, (11)
−2y = 2λy, (12)
2z − 4 = 2λz, (13)
x2 + y 2 + z 2 = 9, (z ≥ 0) (14)

Let’s consider two cases: x = 0 and x 6= 0. If x 6= 0, then (11) implies λ = 1. Then from (13) we get −4 = 0, a
contradiction. So x must equal zero.
Now we turn to two cases in (12): y = 0 and y 6= 0. If y 6= 0, then λ = −1 and (13) becomes
√ 2z − 4 = −2z, from which
we get z = 1. Thus the last equation becomes 02 + y 2 + 12 = 9 and we find y = ±2 2. On the √ other hand, if y = 0,
then our constraint tells us z = 3 (not −3, as z ≥ 0). Thus we get the points (x, y, z) = (0, ±2 2, 1) and (0, 0, 3) from
this Lagrange multiplier problem.

The second Lagrange multiplier problem involves extremizing f (x, y, z) = x2 − y 2 + (z − 2)2 subject to the constraint
h(x, y, z) = z = 0 (with x2 + y 2 ≤ 9). The system ∇f = λ∇h becomes

2x = λ · 0, (15)
−2x = λ · 0, (16)
2z − 4 = 2λ, (17)
z = 0, (18)

and we get only the point (x, y, z) = (0, 0, 0).

Finally, we look at the value of the function f (x, y, z) = x2 − y 2 + (z − 2)2 on the boundary curve x2 + y 2 + z 2 = 9,
z = 0. This is a circle that we can parametrize with r(t) = h3 cos(t), 3 sin(t), 0i (where 0 ≤ t < 2π), in which case
f (r(t)) = 9 cos2 (t) − 9 sin2 (t) + 4. Single variable calculus tells us that this has critical points at every multiple of π/2,
from which we get the points (x, y, z) = (0, ±3, 0) and (±3, 0, 0).

At long last we evaluate f at all the points we’ve found:

point (x, y, z) f (x, y, z) Classification


(0, 0,
√2) 0
(0, ±2 2, 1) −7 minimum
(0, 0, 3) 1
(0, 0, 0) −4
(0, ±3, 0) −5
(±3, 0, 0) 13 maximum

Thus f√ has a maximum of 13, which occurs at (x, y, z) = (±3, 0, 0), and a minimum of −7, which occurs at (x, y, z) =
(0, ±2 2, 1).

You might also like