Académique Documents
Professionnel Documents
Culture Documents
MAT 295
Chapter 9
Lagrange
Multipliers
At the end of this chapter, students should be able to:
9.1 Introduction
In chapter 8, one of the most common problems in calculus which is finding
the extrema of a function has been explored. What if the given function is
subject to fix an outside conditions or constraints? For example, How to
minimize the wood needed to make a rectangular box which can hold 2
kilograms of detergent? In this chapter a powerful tool for solving this
particular problem will be introduced. The method is known as Lagrange
multiplier which is used to optimize functions of two or three variables with a
constraint.
121
MAT 295
drawing, the constraint is a plane that cuts through a lake. Lets draw some
level curves of f ( x, y ) .
x3
f(x1, x2)
f g
g(x1, x2)=c
f=a1
x2
f=a2
x1
Figure 9.1
Level curves of f
Figure 9.2: At the constrained critical point the tangents to the level curves of f
and g are in the same direction
The aim is to move down to the bottom of the lake as low as possible but do
not move any lower than where the constraint g c cuts the valley. The
boundary where the constraint intersects the function is marked with a dotted
line. Along that line are the lowest points possible without crossing over the
constraint g c . Hence, this is where to start looking for a constrained
minimum.
While moving along the level curves, compare the slope of a tangent line of
f ( x, y ) with the slope on the constraint g ( x, y ) . The lowest point which is
MAT 295
curves are parallel and point in the same direction. So the gradients of f ( x, y )
and g ( x, y ) must also be parallel and differ at most by a scalar. Lets call that
scalar, .
f g
This is the condition that must hold when the minimum of f subject to the
constraint g c is reached.
Lets consider minimizing f ( x, y ) subject to the constraint g( x, y ) c . In this
case, f ( x, y ) is the objective function or the function to be minimized.
Geometrically, we want to find the extreme minimum of f ( x, y ) when the
point ( x, y ) is restricted to lie on the level curve g( x, y ) c . This situation
happens when these two curves intersect each other, that is, when the curves
have a common tangent. Based on the fact that the two curves are tangent at
a point if and only if their gradient vectors are parallel (or in the same
direction), hence for some scalar
f ( x, y ) g( x, y )
Definition
The Lagrangian associated with the constrained problem, defined as
F ( x, y, ) f ( x, y ) g( x, y )
The following theorem provides the necessary conditions for the existence of
the Lagrange multiplier.
Theorem
Lagrange Multiplier
Suppose f ( x, y ) and g ( x, y ) have
continuous
partial
derivatives
such
123
MAT 295
These equations are solved for the unknowns x, y and . Then the local
extremum points are found among the solutions of these equations.
Method of Lagrange Multiplier
Let f ( x, y ) be the objective function such that f has a maximum or minimum
subject to the constraint
g ( x, y ) c .
The largest and smallest point(s) are the maximum and minimum of f
respectively.
Set up equations
f x g x
fy g y
g( x, y ) c
Example 1
Find the maximum and minimum values of f ( x, y ) x 2y subject to the
constraint x 2 y 2 1.
Solution
Compute f x , fy , g x and g y
124
fx 1
g x 2x
fy 2
g y 2y
Figure 9.3
Set up equations
f x g x
1 2x
(1)
fy g y
2 2y
(2)
g( x, y ) 1
x2 y 2 1
(3)
y
x
y 2x
(4)
1
5
(5 )
1
5
When
When
1
5
1
5
125
2
5
2
5
MAT 295
MAT 295
Thus there are two possible points on the constraint set where f ( x, y ) can
take an extremum.
1 2
,
5 5
1 2
,
5 5
1 2
5
f
,
5 5
1 2
5
f
,
5 5
Note that
5 at
,
5 5
(i)
an absolute maximum of
(ii)
1 2
,
an absolute minimum of 5 at
5 5
Example 2
Find the maximum of 1 x 2 2y 2 subject to the constraint that x y 1 .
Solution
Find f x , fy , g x and g y
f x 2x
gx 1
fy 4y
gy 1
Set up equations
f x g x
2x
(1)
fy g y
4y
(2)
g( x, y ) 1
x y 1
(3)
2y
1
x
126
x
2
(4)
MAT 295
x
1
2
3x
1
2
x
2
3
then
1
3
Example 3
Find the maximum and minimum values of f ( x, y ) y 2 x 2 on the ellipse
x 2 4y 2 4 .
Solution
Find f x , fy , g x and g y
f x 2x
g x 2x
f y 2y
g y 8y
Set up equations
f x g x
2x 2x
(1)
fy g y
2y 8y
(2)
x 2 4y 2 4
(3)
g( x, y ) 4
x
x
y
4y
127
4 xy xy
5 xy 0
x 0 @
y 0
MAT 295
( 4)
When y 0 :
x2 4
x 2
f 0,1 1
f 2,0, 4
f 2,0 4
Example 4
Find the maximum and minimum values of f ( x, y ) y 2 x 2 on the
circle x 2 y 2 1.
Solution
f ( x, y ) y 2 x 2
g ( x, y ) x 2 y 2 1
fy ( x, y ) 2y
f x ( x, y ) 2x
g x ( x, y ) 2x
g y ( x, y ) 2y
Then
2 x 2y
2 x 2y
(1)
(2)
128
x2 y 2 1
MAT 295
(3)
y
y
xy xy
2xy 0
x 0 @
y 0
( 4)
When y 0 :
x2 1
x 1
f 0,1 1
f 1,0 1
f 1,0 1
Example 5
Find the volume of the largest rectangular box with a divider but no top that
can be constructed from 288 square cm of material.
Solution
z
y
x
Figure 9.4: Rectangular box with divider with no top
129
MAT 295
Vy xz
Vz xy
g x y 2z
g y x 3z
g z 2x 3y
(1)
( 2)
(3 )
( 4)
( y 2z ) ( x 3z )
y
x
xy 2 xz xy 3 yz
Replacing y
2x 3y
2x
y
3
2x
in (3):
3
xy (2 x 3 y )
x 2 6 x 0
x x 6 0
x 0 @ x 6
2x
2 x 2 x
3
2 x 2 12x
Then
y
2x
4
3
Substitute x 6 in (2):
6z (6 3z )
3( z 2 ) 0
0 @ z 2
130
MAT 295
x 12
y 8
z4
and
V(12, 8, 4) = 384 cubic cm
Warm up exercise
Consider
f ( x, y ) xy subject to g ( x, y ) 9x 2 y 2 4
(i)
Find f x , fy , g x and g y .
(ii)
Set f g
(iii) Solve the simultaneous equations obtained in (ii)
(iv) Determine the critical points and extrema.
Exercises 9
1.
Use the method of Lagrange Multipliers to find the extrema of the following
functions subject to the given constraints.
Function
Constraint
a)
f ( x, y ) 3x 2y
x2 y 2 1
b)
f ( x, y ) 2x y
x2 y 2 1
c)
f ( x, y ) x 2y
x 2 y 2 25
d)
f ( x, y ) x y
x 2 2y 2 1
e)
f ( x, y ) x 2 2y 2
x2 y 2 1
f)
f ( x, y ) x 2 y
x2 y 2 1
g)
f ( x, y ) x 2 2y 2
x2 y 2 1
h)
f ( x, y ) x 2 y 4
x2 y 2 1
i)
f ( x, y ) sin ( xy )
x2 y 2 1
j)
f ( x, y ) e xy
x2 y 2 1
131
2.
MAT 295
A farmer has 400 meters of fence with which to enclose a rectangular field
bordering a river. What dimensions of the field maximize the area if the field is to
be fenced on only three sides (see picture below)?
3.
4.
5.
A farmer has 400 meters of fence with which to fence in a rectangular field
adjoining two existing fences which meet at a right angle. What dimensions
maximize the area of the field?
6.
A rectangular box with a square bottom and an open top is to have a volume of
1000 m3. What dimensions for the box yield the smallest surface area?
132
7.
MAT 295
A certain cylindrical can is to have a volume of 0.25 cubic meters. Find the
height h and radius r of the can that will minimize surface area of the can. What
is the relationship between the resulting r and h?
8.
A nuclear reactor is to have the shape of a right circular cylinder with radius x
and height y. Neutron diffusion theory says that the reactor must have the
following constraint.
2
p
2.4048
1
x
y
9.
2
2
Find the maximum of f ( x, y ) e x y subject to the constraint
a) x y 1
b) x 2 y 2 1
133