Vous êtes sur la page 1sur 13

Part 1 PARTIAL DERIVATIVES

MAT 295

Chapter 9

Lagrange
Multipliers
At the end of this chapter, students should be able to:

Define the Lagrange multipliers

Identify the procedure for solving extremum problems with a constraint

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.

9.2 Lagrange Multipliers


Lagrange Multipliers is the name given to a method of finding the extreme of
a function subject to a constraint.
How the Method Works
To see how Lagrange multipliers work, take a look at Figure 9.1. Draw the
function f ( x, y ) from above, along with a constraint g( x, y ) c . In the

121

Part 1 PARTIAL DERIVATIVES

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 curve g=0

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

known as the constrained minimum is reached once the slope of the


constraint line just equals the slope of the level curve. In other words, the two
122

Part 1 PARTIAL DERIVATIVES

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

Solving for zero, we get


f g 0

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 )

The scalar is called a Lagrange multiplier.

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

that f ( x, y ) has a local maximum or minimum at ( x0 , y 0 ) on the constraint


curve g ( x, y ) c and g( x0 , y 0 ) 0 , then there exists such that
f ( x0 , y 0 ) g( x0 , y 0 ).

123

Part 1 PARTIAL DERIVATIVES

MAT 295

To find the extremum points, in practice, consider the following equations


f ( x, y ) g( x, y ) and g( x, y ) c

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 . To find the maximum or minimum

value(s) of f requires finding the solution(s) to the simultaneous equations


f ( x, y ) g( x, y ) and

g ( x, y ) c .

The largest and smallest point(s) are the maximum and minimum of f
respectively.

Steps : Lagrange multipliers

Identify the objective function : f ( x, y )


Identify the constraint : g( x, y ) c
Find f x , fy , g x and g y

Set up equations
f x g x

fy g y

g( x, y ) c

Solve the simultaneous equations for the unknowns


x, y and
Determine the critical point(s)
Determine the extreme of f

Example 1
Find the maximum and minimum values of f ( x, y ) x 2y subject to the
constraint x 2 y 2 1.

Solution

Identify the objective function : f ( x, y )


f ( x, y ) x 2y

Identify the constraint : g( x, y ) c


x2 y 2 1

Compute f x , fy , g x and g y

124

Part 1 PARTIAL DERIVATIVES

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)

Solve the simultaneous equations


(2) (1) : 2

y
x

y 2x

(4)

Substitute (4) into (3) yields


x 2 ( 2 x )2 1
x 2 4x 2 1
5x 2 1
x2

1
5

(5 )
1
5

Then substitute (5) into (4) yields


y 2x

When

When

1
5

1
5

125

2
5

2
5

MAT 295

Part 1 PARTIAL DERIVATIVES

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

Comparing the values, it can be concluded that f ( x, y ) x 2y subject to


the constraint x 2 y 2 1 has
1 2

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

Identify the objective function : f ( x, y )


f ( x, y ) 1 x 2 2y 2

Identify the constraint : g( x, y ) c


x y 1

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)

Solve the simultaneous equations for x and y


(2) (1) :

2y
1
x

126

x
2

(4)

Part 1 PARTIAL DERIVATIVES

MAT 295

Substitute (4) into (3)


x

x
1
2

3x
1
2
x

2
3

then

1
3

Determine the critical point(s)


2 1
,
3 3

Determine the extreme (maximum) of f


2 1 1
f ,
3 3 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

Identify the objective function : f ( x, y )


f ( x, y ) y 2 x 2

Identify the constraint : g( x, y ) c


x 2 4y 2 4

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

Solve the simultaneous equations for x and y


(1) (2) :

x
x

y
4y
127

Part 1 PARTIAL DERIVATIVES

4 xy xy
5 xy 0
x 0 @

y 0

MAT 295

( 4)

Substitute (4) into (3)


When x 0 :
4y 2 4
y2 1
y 1

When y 0 :
x2 4
x 2

Determine the critical point(s)

0,1 , 0,1 , 2,0 and 2,0

Determine the extreme of f


f 0,1 1

f 0,1 1

f 2,0, 4

f 2,0 4

Hence, the maximum value of f is 1 and the minimum value is -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

Part 1 PARTIAL DERIVATIVES

x2 y 2 1

MAT 295

(3)

Solving the equations yield


x x

y
y
xy xy
2xy 0
x 0 @

y 0

( 4)

Substitute (4) into (3):


When x 0 :
y2 1
y 1

When y 0 :
x2 1
x 1

Thus, x = -1 and x = 1. Finally


f 0,1 1

f 0,1 1

f 1,0 1

f 1,0 1

Hence, the maximum value of f is 1 and the minimum value of f is -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

Part 1 PARTIAL DERIVATIVES

MAT 295

Identify the objective and constraint functions:


V ( x, y , z ) xyz
g ( x, y , z ) xy 2xz 3yz 288

Determine the partial derivatives


Vx yz

Vy xz

Vz xy

g x y 2z

g y x 3z

g z 2x 3y

The Lagrange condition means


yz ( y 2z )
xz ( x 3z )
xy (2 x 3 y )
xy 2 xz 3 yz 288

(1)
( 2)
(3 )
( 4)

Solve the simultaneous equations:


(1) = (2):

( 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

Replacing x, y, and z with 6,4 and 2 , respectively, in the constraint


yields
xy 2 xz 3 yz 288
242 242 242 288
722 288 0
2 @ 2

Since the dimension should be a positive then 2 then

130

Part 1 PARTIAL DERIVATIVES

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

Part 1 PARTIAL DERIVATIVES

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.

Maximize the product of two positive numbers whose sum is 36.

4.

Minimize the sum of two positive numbers whose product is 36.

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

Part 1 PARTIAL DERIVATIVES

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

What dimensions x and y minimize the volume of the reactor?

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

Vous aimerez peut-être aussi