Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lagrange Multipliers.

Similar presentations


Presentation on theme: "Lagrange Multipliers."— Presentation transcript:

1 Lagrange Multipliers

2 Lagrange's Method Of Multipliers
To find extrema of f(x, y) with the constraint g(x, y), form L(x, y, ) = f(x, y) + g(x, y);  is Lagrange multiplier. Example: Find extrema of f(x, y) = 7(1 - x/4 – y/6) with constraint g(x, y) = (x – 2)2 + (y – 3)2 – 1 = 0; L(x, y, ) = 7(1 – x/4 – y/6) + [(x – 2)2 + (y – 3)2 – 1] Lx = -7/4 + 2 (x – 2) = 0 =>  = 7/8(x - 2) Ly = -7/6 + 2 (y – 3) = 0 =>  = 7/12(y - 3) L = (x – 2)2 + (y – 3)2 – 1; and 2x – 3y + 5 = 0 x = (3y – 5)/2; (1.5y – 4.5)2 + (y – 3)2 – 1 = 0 (quadratic )  ( ) y ( ) x rd 5/13/2019

3 Lagrange Multiplier Suppose we have a problem: Maximize f(x, y) = 5 – (x – 2)2 – 2(y - 1)2 subject to g(x, y) = x + 4y = 3 Ignore the constraint to get fy and fx = 0 => x = 2 and y = 1 fxx = -2; fyy = -4; D = 8 and fxx < 0 => relative maximum With constraint: L(x, y, ) = 5 – (x – 2)2 – 2(y - 1)2 + (3 - x - 4y) Lx = -2(x – 2) -  = 0; Ly = -4(y – 1) - 4 = 0  = - 2x + 4 = - y + 1 or 2x – 1y = 3 (solve '((2 -1 3)(1 4 3))) 1x + 4y = 3 x = 5/3; y = 1/3; f(5/3, 1/3) = 4, maximum;  = 2/3. x = 3 - 4y => 2(3 – 4y - 2) =  = 2 – 4y and  = 1 - y (SOLVE ‘(( )( ) ( )))  (5/3 1/3 2/3) rd 5/13/2019

4 Lagrange Multiplier Use a Lagrange multiplier to find the maximum rectangular area fenced in by 100 feet of fencing. L(x, y, ) = xy + (2x + 2y -100) Lx = y + 2; Ly = x + 2; and L = 2x + 2y – 100 = 0 y + 2 = x + 2 => x = y => 4x = 100 or x = y = 25. (solve '(( )( )( )))  ( /2) x y rd 5/13/2019

5 Lagrange Multiplier Max Z = -2x2 – y2 + xy + 8x + 3y s.t. 3x + y = 10
Observe y = x can be substituted into Z to get Z(x) = -14x2 + 69x – 70; Z' = -28x + 69 = 0 => x = 28/69 L(x, y, ) = -2x2 – y2 + xy + 8x + 3y + (3x + y – 10) Lx = -4x + y  = 0 => y = -3 x (1) Ly = -2y + x  = 0 => 2y =  x (2) L = 3x + y – 10 = 0 => y = 10 – 3x (3) (solve '(( )( )( )))  (69/28 73/28 -1/4) Z = Without constraint, the max occurs at x = 19/7, y = 20/7, max = rd 5/13/2019

6 Lagrange Multiplier Find critical points for f(x, y) = 25 - x2 - y2 with constraint x2 + y2 - 4y = 0 L(x, y, ) = 25 – x2 - y2 + (x2 + y2 – 4y) Lx = -2x + 2x = 0 => x = x =>  = 0 or 1;  = 1 Ly = -2y + 2y - 4 = 0 =>  = 2y/(2y – 4);   1 L = x2 + y2 - 4y = 0 Conclude x = 0, y = 0,  = 0 is only consistent condition. with critical points (0, 0) f(0, 0) = 25 which is absolute maximum rd 5/13/2019

7 Lagrange Multipliers Find minimum of f(x, y, z) = 3x2 + 2y2 + 4z2 subject to 2x + 4y - 6z + 5 = 0 L(x, y, z, ) = 3x2 + 2y2 + 4z2 + (2x + 4y - 6z + 5) Lx = 6x + 2 Ly = 4y + 4 Lz = 8z - 6 L = 2x + 4y – 6z + 5 (solve '(( )( )( )( )))  ( x y z ) = (-2/11 -6/11 9/22 6/11) f(-2/11, -6/11, 9/22) = and |D| = 192 > 0 => minimum

8 Power Plant A power plant (PP) is 1000 feet down stream on opposite bank of a 200 feet wide river. Cable costs $50/ft on land and $80/ft under water. Find best cost of installation. x x d C(x) = 50(1000 – x) + 80(x )1/2 C'(x) = / (x )1/2 = 0 when x = => d = => x = 840 Cost = 840 * * 80 = $62,488. 200 Power Plant x rd 5/13/2019

9 Unconstrained Extrema
Given f(x, y) = 2x4 + y2 - x2 -2y, determine the relative extremea of f, if any. fx = 8x3 - 2x = 0; fy = 2y – 2 = 0 x = 0; ½, -½ ; y = 1 3 candidates (0, 1), (½ , 1) (-½, 1) fxx = 24x2 - 2 > 0 for x = ½ & -½ and negative for x = 0. D = = -4 for (0, 1) saddle, 8 for (½, 1) f( ½ , 1) = -9/8; f(0, 1) = -1 relative minimum at ( ½, 1) and saddle point at (0, 1) rd 5/13/2019

10 Constrained Minimum Find minimum value of W(x, y, z) = x2 + y2 + z2 subject to x + y + z =1. Let L(x, y, z, ) = x2 + y2 + z2 + (x + y + z – 1) Then Lx = 2x +  = 0, Ly = 2y +  = 0, Lz = 2z +  = 0, L = x + y + z – 1 = 0 (solve '(( )( )( )( ))) (1/3 1/3 1/3 -2/3) => W = 1/ = 8 > 0 => minimum 0 0 2 rd 5/13/2019

11 Constrained Maxima Find the maximum value of w = xy + z subject to x2 + y2 + z2 = 1. L(x, y, z, ) = xy + z = (x2 + y2 + z2 - 1) Lx = y + 2x = 0 y2z + 2  xyz = 0 Ly = x + 2y = 0 x2z + 2  xyz = 0 Lz = 1 + 2z = 0 xy + 2  xyz = 0 L = x2 + y2 + z2 -1 = 0 y2z = x2z = xy => z = 0 or y2 = x2 z = 0 can't be; thus y2 = x2; if x = y then x2z = xy = x2 => x = 0 or z = 1. Max at (0, 0, 1); w(0, 0, 1) = z = 1. rd 5/13/2019

12 Critical Points Find and label the critical points of F(x, y) = 2x2 + y2 – 2xy + 5x - 3y + 1 Fx = 4x - 2y + 5 = 0 Fxx = 4 Fxy = -2 Fy = 2y - 2x - 3 = 0 Fyx = -2 Fyy = 2 \ (solve '(( )(-2 2 3)))  (-1, ½ ) D = 12 => (-1, ½ ) is relative minimum F(-1, ½) = 2 + ¼ /2 + 1 = -9/4. rd 5/13/2019

13 Find the inverse of the following matrices by forming the adjacency matrix with the identity matrix attached and converting the initial matrix to the identity matrix. A = B = A-1 = B-1 = /5 4/5 /5 -1/5  rd 5/13/2019

14 Problems 1. Maximize the rectangular area with perimeter p.
Symmetry => p/4 per side with p2/16 area. 2. f(x) = 2x2 –10x + 50 for x  /2 f'(x) = 4x -10 = 0 when x = 5/2, f(5/2) = 37.5 f"(x) = 4 => minimum, f(0) = 50; f() =  3. f(x) = x3 – 100x x => f(0) = 0 f'(x) = 3x2 -200x = 0 and f"(x) = 6x – 200 (quadratic )  ( ) f(25) = 31,250 is relative maximum and f(41.67) = 28, is relative minimum (poly-eval '( ) '(41 42)  ( ) => crossing rd 5/13/2019

15 Practice S-1 Write the equation of the tangent to the curve y = x3 - 6x2 + 9x + 1 where its slope is a minimum. S-2 Find the inverse of matrix S-3 The cost for a machine is $1000 the first 5 years and $2000 the next 5 years. At i = 10% per year, the annual worth is closest to a) $1225 b) $1302 c) $1383 d) $1426 S-4 Max 3x1 + 4x2 subject to 2x1 + 3x2 <= 12 and 5x1 + 3x2 <= 15 S-5 Min 12x1+ 15x2 subject to 2x1 + 5x2 >= 3 and 3x1 + 3x2 >= 4 S-6 Write and sole the duals if S-4 and S-5. rd 5/13/2019

16 Solution S-1 Write the equation of the tangent to the curve y = x3 - 6x2 + 9x + 1 where its slope is a minimum. Slope function is S(x) = 3x2 –12x + 9 = 0 S'(x) = 6x – 12 = 0 when x = 2 S(2) = -3 is the minimum slope at x = 2, y = 3 (y – 3) = -3(x – 2) or slope fn y = -3x + 9 (cubic )  (quadratic )  1, 3 rd 5/13/2019

17 Example Find the inverse of matrix Inverse matrix Method I a + 3b = 1; 2a + 4b = 0 => a = -2b, => b = 1 c + 3d = 0 => c = -3d; 2c + 4d = 1 => -2d = 1 or d = -1/2 c = 3/2, b = 1, a = -2 Method II /2 -1/2 (solve '(( )( )( )( )))  (-2 1 3/2 -1/2) rd 5/13/2019

18 Lagrange Multipliers You need 100 units made at 2 plants with the total cost function C = 0.1x2 + 7x + 15y How should you divide the units between plants x and y to minimize the cost? L(x,y,) = 0.1x2 + 7x + 15y (x + y – 100) Lx = 0.2x  = 0 Ly = 15 +  = 0 =>  = -15 and 0.2x + 7 = 15 or x = 40; y = 60. (solve '(( )( )( )))  ( ) C(40, 60) = $2349 min. See that Lxx and Lyy are > 0; D > 0 rd 5/13/2019

19 Lagrange Multipliers Find critical points for f(x, y, z) = x2 + 2y – z2 ; subject to 2x – y = 0; y + z = 0 L(x,y,z,1 2) = x2 + 2y –z2 + 1 (2x – y) + 2(y + z) Lx = 2x + 21 = 0 => 1 = -x Ly = 2 - 1 + 2 = 0 => 1 - 2 = 2 Lz = -2z + 2 = 0 => 2 = 2z L 1 = 2x – y = 0 => y = 2x L 2 = y + z = 0 => y = -z (solve '(( )( )( ) ( )( )))  (2/3 4/3 -4/3 -2/3 -8/3) rd 5/13/2019

20 Unconstrained Extrema
Given f(x, y) = 2x4 + y2 - x2 -2y, determine the relative extreme of f, if any. fx = 8x3 - 2x = 0; fy = 2y – 2 = 0 x = 0; ½, -½ ; y = 1 3 candidates (0, 1), (½ , 1) ( -½, 1) fxx = 24x2 - 2 > 0 for x = ½ & -½ and negative for x = 0. D = = -4 for (0, 1) saddle, 8 for (½, 1) f(½, 1) = -9/8; f(0, 1) = -1 relative minimum at ( ½, 1) and saddle point at (0, 1) rd 5/13/2019

21 Constrained Minimum Find minimum value of W(x, y, z) = x2 + y2 + z2 subject to x + y + z =1. Let L(x, y, z, ) = x2 + y2 + z2 + (x + y + z – 1) Then Lx = 2x +  = 0, Ly = 2y +  = 0, Lz = 2z +  = 0, L = x + y + z – 1 = 0 (solve '(( )( )( )( ))) (1/3 1/3 1/3 -2/3) => W = 1/3. = 8 > 0 => minimum rd 5/13/2019

22 Critical Points Find and label the critical points of F(x, y) = 2x2 + y2 – 2xy + 5x - 3y + 1 Fx = 4x - 2y + 5 = 0 Fxx = 4 Fxy = -2 Fy = 2y - 2x - 3 = 0 Fyx = -2 Fyy = 2 \ (solve '(( )(-2 2 3)))  (-1, ½ ) D = 12 => (-1, ½ ) is relative minimum F(-1, ½) = 2 + ¼ /2 + 1 = -9/4. rd 5/13/2019

23 Optimization 1. Maximize the rectangular area with perimeter p.
Symmetry => p/4 per side with p2/16 area. 2. f(x) = 2x2 –10x + 50 for x  /2 f'(x) = 4x -10 = 0 when x = 5/2, f(5/2) = 37.5 f"(x) = 4 => minimum, f(0) = 50; f() =  f(x) = x3 – 100x x => f(0) = 0 f'(x) = 3x2 -200x = 0 and f"(x) = 6x – 200 (quadratic )  ( ) f(25) = 31,250 is relative maximum and f(41.67) = 28, is relative minimum (poly-eval '( ) 41)  -32, but at 42  17 rd 5/13/2019

24 Point of plane nearest to Given Point
Find the point of the plane 2x – 3y – 4z = 25 which is nearest to the point (3, 2, 1) D2 = (x – 3)2 + (y – 2)2 + (z – 1)2 where z = ¼ (2x – 3y – 25) D2 = (x – 3)2 + (y – 2)2 + [½ x – ¾y – (29/4)]2 D2x = 2(x – 3) + 2[½ x – ¾y – (29/4)]½ = 0 D2y = 2(y – 2) = 2[½ x – ¾y – (29/4)]-¾ Simplify to 10x – 3y = 53 -6x + 25 y = -55 (solve '(( )( )))  (5, -1) => z = -3 rd 5/13/2019

25 Circle in Polar Coordinates
Graph r = 5 rd 5/13/2019

26 Partials Given z = 3x3y2 – 4x2y4, find zxx b) zyx c) zyy d) zxxx
zx = 9x2y2 – 8xy3 => zxx = 18xy2 – 8y3 zy = 6x3y – 16x2y3 => zyx = 18x2y – 32xy3 zyy = 6x3 – 48x2y2 zxxx = 18y2 rd 5/13/2019

27 Minimum Distance Find the minimum distance s between the origin and the plane 2x + 2y + z = 6. S2 = f(x, y) = x2 + y2 + z2 = x2 + y2 + (6 – 2x – 2y)2 fx = 2x + 2(6 – 2x – 2y)(-2) = 0 = 2x - 4(6 – 2x – 2y) 10x + 8y = 24 fy = 2y + 2(6 – 2x – 2y)(-2) = 0 = 2y – 4(6 – 2x – 2y) 8x + 10y = 24 (Solve '(( )( )))  (4/3, 4/3) Z = 18/3 – 16/3 = 2/3 S = (16/9 + 16/9 + 4/9)1/2 = 2 rd 5/13/2019

28 Diophantine Equation Find integral solutions to 12x + 7y = 220. x = (220 – 7y)/12 = 18 – (7y - 4)/12 (7y - 4)/12 <= 17 or 0 < y < 29 x = 2; y = 28 rd 5/13/2019

29 Average Speed 60 You travel from a to b averaging 30mph. How fast must you travel back from b to a to average 60 mph for the round trip? rd 5/13/2019


Download ppt "Lagrange Multipliers."

Similar presentations


Ads by Google