Lagrange Multiplier s New 2

Post on 02-Jun-2018

218 views 0 download

Transcript of Lagrange Multiplier s New 2

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 1/20

Lagrange MultipliersByDr. Julia Arnold

Professor of MathematicsTidewater Community College, Norfolk Campus,

Norfolk, VAWith Assistance from a CPDP Grant

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 2/20

In this lesson you will

•Understand the method of Lagrange Multipliers

•Use Lagrange Multipliers to solve constrainedoptimization problems

•Use the method of Lagrange multipliers with twoconstraints

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 3/20

Objective 1

Understand the method of

Lagrange Multipliers

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 4/20

Fig.13.77

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 5/20

2 2

2 2: ( , ) 1

3 4

 x yConstraint g x y   : ( , ) 4Objective function f x y xy

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 6/20

Recall

Fig. 13.48

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 7/20

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 8/20

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 9/20

Objective 2

Use Lagrange Multipliers to solve

constrained optimization problems

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 10/20

Basically, Lagrange Multipliers are another way to think aboutsolving optimization problems with constraints. Lets look at aproblem we can solve either way.

Problem: Suppose I have 50 feet of fencing for arectangular shaped garden and want to enclosethe maximum area.

The usual way we would solve this problem is to look at apicture and put in variables.

x

 y

Next we write the constraintequation 2x + 2y = 50

Last we determine we want tomaximize the Area of theGarden whose formula is

A = xy

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 11/20

Problem: Suppose I have 50 feet of fencing for arectangular shaped garden and want to enclosethe maximum area.

x

 y

2x + 2y = 50 Constraint

A = xy Objective

We want to get the Area in terms of just x or y so we use the constraint to eliminate one orthe other.

2y=50-2x

Y = 25-x

A = x (25-x)=25x – x2 

A’ = 25 – 2x

0= 25 – 2x

X = 12.5 and y = 12.5

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 12/20

Now we will use the method of Lagrange Multipliers toSolve the same problem.

2x + 2y = 50 Constraint

A = xy Objective

f(x,y)=xy is the objective equation and g(x,y)=2x +2y is the constraintequation. ( , ) ; ( , )

( , ) 2; ( , ) 2

2

2

2 2 50

4 4 50

8 50

6.25

12.5

12.5

 x y

 x y

 x x

 y y

 f x y y f x y x

 g x y g x y

Set f g y

Set f g x

 x y

Solve

 x

 y

 

 

 

 

 

simultaneously 

Find

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 13/20

Now let’s look at a problem that might be difficult tosolve the old way.

Problem 2: Find the maximum and minimum values for2 2

4 4 4 4

3 3

3

3 3 22

4 4

3 22

2 22 2

( , )

( , ) 1

2 ; 2

4 ; 4

2 4

12 4 2 4 2 (1 2 ) 02

1

12 4 2 (1 2 ) 02

1 1:2 2

 x y

 x y

 f x y x y objective equation

 g x y x y with the x y

 Find f x f y

 g x g y

 x x

 y y x x x x x or  x

 x y

 y y y y y or  y

Solve x y x y

 

 

 

 

constraint 

4

4 4 4 4 4 4

4 4

4 4

0 1 1

1 1 2 1 0 1 11 1

2 2

1 1, max 2

2 2

(0, 1), ( 1, 0) min 1

 If x then y y

 x y x x x IIf y then x x

 x and y

We could have the following which yield a value of    

and which yields a value of    

points

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 14/20

The constraint is

the red graph.The blue graphand green graphare level curves ofthe paraboloid.

The blue graph isat 1 and the greengraph is at

which is the exactvalue for the max.

As the paraboloidextends in the zdirection it getswider than theconstraint.

Z=1

x

y

Z= 2

2

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 15/20

Objective 3Use the method of Lagrange

multipliers with two constraints

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 16/20

Suppose we want to find the max and min values of f(x,y,z)subject to two constraints of the form g(x,y,z)=p and

h(x,y,z)= q. Geometrically, this means that we are looking forthe extreme values of f when (x,y,z) is restricted to lie onthe curve of intersection of the level surfaces g and h. It canbe shown that if an extreme value occurs at ,then the gradient vector is in the planedetermined by and .

We assume these gradient vectors are not 0 or parallel andthus there are numbers (Lagrange multipliers)such that

, ,o o o x y z ( , , )o o o f x y z 

( , , )o o o g x y z    ( , , )o o oh x y z  

and   

( , , ) ( , , ) ( , , )o o o o o o o o o f x y z g x y z h x y z   

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 17/20

Problem: Maximize f(x,y,z) = xyz subject to the twoconstraints 2 2 5 2 0 x z and x y

2 2

2 2

2 2

( , , )

( , , ) 2 0 2

( , , ) 2 1 2 0

5 2 0

2

0 2

2 0

5 2 0

 x y z 

 x y z 

 x y z 

 f x y z xyz f yz f xz f xy

 g x y z x z g x g g z 

h x y z x y h h h

 x z and x y

Solve

 yz x

 xz 

 xy z 

 x z and x y

 

 

 

 

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 18/20

 

Solved eq 2 for mu

Solved eq 3 for lambda

Substituted into eq 1 for mu

and lambda.

2 2

2

0 2

2 0

5 2 0

22

22

22 2

Solve

 yz x

 xz 

 xy z 

 x z and x y

 xz  xz 

 xy xy z 

 z 

 xy xz  yz x

 z 

 

 

 

 

 

 

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 19/20

Continued

2 2 2

2 2 2 2

2 2 2

2 2 2

2 3

3 3

3

2

2

22

22

22 2

2 2

2 02

5 5

2 5 2 52 2

5 5

2 5

10 2 010 3 0

(10 3 ) 0

10 100,

3 3

 xz  xz 

 xy xy z 

 z 

 xy xz  yz x

 z 

 yz x y xz 

 xSub y from x y

Sub z x from x z   x x

 x x x x

 x x x x x x

 x x x

 x x x x x

 x x

 x or x x

 

 

2 2

2

2

2

5

10 10

0, 3 3

0, 0, 5

10 1 10, ,

3 2 3

10 5 55 ,

3 3 3

10 1 10 5, ,

3 2 3 3

10 1 10 5, ,

3 2 3 3

10 1 10 5 5 15, ,

3 2 3 3 9

10 1 10 5 5 15, ,

3 2 3 3 9

 x y

 z x

 x or x x

 for x y z 

 for x y

 z z 

 f  

 f  

 f  

 points (0,0, 5),

(0,0, 5) = 0

8/10/2019 Lagrange Multiplier s New 2

http://slidepdf.com/reader/full/lagrange-multiplier-s-new-2 20/20

I found this very interesting website written bya student who is sharing his talents witheveryone. The topic is Lagrange Multipliers.

Check it out.http://www.youtube.com/watch?v=ry9cgNx1QV8 

His method is slightly different from the way yourtext presented it. Are they equivalent?

For comments on this presentation you may email the author Dr.

Julia Arnold at jarnold@tcc.edu.