Lagrange Multipliers.

Slides:



Advertisements
Similar presentations
Chapter 11-Functions of Several Variables
Advertisements

When you see… Find the zeros You think…. To find the zeros...
Analyzing Multivariable Change: Optimization
Semester 1 Review Unit vector =. A line that contains the point P(x 0,y 0,z 0 ) and direction vector : parametric symmetric.
15 PARTIAL DERIVATIVES.
Constrained Maximization
15 PARTIAL DERIVATIVES.
Partial Differentiation & Application
Nonlinear Optimization Review of Derivatives Models with One Decision Variable Unconstrained Models with More Than One Decision Variable Models with Equality.
Applied Economics for Business Management
Absolute Extrema Lesson 6.1. Fencing the Maximum You have 500 feet of fencing to build a rectangular pen. What are the dimensions which give you the most.
Section 4.4: Modeling and Optimization
Chapter 13 Curve Sketching.
Consider minimizing and/or maximizing a function z = f(x,y) subject to a constraint g(x,y) = c. y z x z = f(x,y) Parametrize the curve defined by g(x,y)
LAGRANGE mULTIPLIERS By Rohit Venkat.
4.7 Optimization Problems In this section, we will learn: How to solve problems involving maximization and minimization of factors. APPLICATIONS OF DIFFERENTIATION.
Chapter 9.1 Notes. Quadratic Function – An equation of the form ax 2 + bx + c, where a is not equal to 0. Parabola – The graph of a quadratic function.
Tangents and Normals We’re going to talk about tangents and normals to 3-D surfaces such as x 2 + y 2 + z 2 = 4 It’s useful to think of these surfaces.
Chapter 6-1 Graphing Quadratic Functions. Which of the following are quadratic functions?
Optimization Problems Example 1: A rancher has 300 yards of fencing material and wants to use it to enclose a rectangular region. Suppose the above region.
Functions of Several Variables Copyright © Cengage Learning. All rights reserved.
LaGrange Multipliers Consider an example from Calculus I:
Solve Simplify Write the equation of the line that goes through (4,5) and is perpendicular to.
Copyright © Cengage Learning. All rights reserved. 14 Partial Derivatives.
Functions of Several Variables 13 Copyright © Cengage Learning. All rights reserved.
Section Lagrange Multipliers.
Optimization Ex. A rectangular box lies on the xy-axis with one vertex on the origin. If the opposite vertex lies on the plane 3x + 2y + z = 12, find.
Calculus III Hughes-Hallett Chapter 15 Optimization.
Section 15.3 Constrained Optimization: Lagrange Multipliers.
1 Unconstrained and Constrained Optimization. 2 Agenda General Ideas of Optimization Interpreting the First Derivative Interpreting the Second Derivative.
D Nagesh Kumar, IISc Water Resources Systems Planning and Management: M2L2 Introduction to Optimization (ii) Constrained and Unconstrained Optimization.
Chapter 12 Graphs and the Derivative Abbas Masum.
OBJECTIVE Find relative extrema of a function of two variables.
Multivariate Optimization Problems
Chapter 14 Partial Derivatives
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Calculus-Based Solutions Procedures MT 235.
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Functions of Several Variables
Lagrange Multipliers By Dr. Julia Arnold Professor of Mathematics
Absolute Extrema Lesson 6.1.
Chapter 2 Applications of the Derivative
Unconstrained and Constrained Optimization
Chapter 8 The Trigonometric Functions
4.6 Optimization The goal is to maximize or minimize a given quantity subject to a constraint. Must identify the quantity to be optimized – along with.
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Constrained Optimization – Part 1
9.3 Graph and Write Equations of Circles
13 Functions of Several Variables
PRELIMINARY MATHEMATICS
Systems Engineering and Analysis
13 Functions of Several Variables
Outline Unconstrained Optimization Functions of One Variable
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Copyright © Cengage Learning. All rights reserved.
Optimization Problems
Chapter 7 Functions of Several Variables
Derivatives and Graphing
Chapter 8 The Trigonometric Functions
Tutorial 6 The Trigonometric Functions
Differential Calculus
Calculus I (MAT 145) Dr. Day Wednesday March 27, 2019
Calculus I (MAT 145) Dr. Day Monday April 8, 2019
Tutorial 3 Applications of the Derivative
Unit 4: Applications of Derivatives
Multivariable optimization with no constraints
Maximum and Minimum Values
Analyzing Multivariable Change: Optimization
Presentation transcript:

Lagrange Multipliers

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 3.25 -22.5 28.25)  (5.275358 1.647719) y (5.413037 -0.02842) x rd 5/13/2019

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 ‘((-2 0 -1 -4)(0 -4 -4 -4) (1 4 0 3)))  (5/3 1/3 2/3) rd 5/13/2019

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 '((0 1 2 0)(1 0 2 0)(2 2 0 100)))  (25 25 -25/2) x y rd 5/13/2019

Lagrange Multiplier Max Z = -2x2 – y2 + xy + 8x + 3y s.t. 3x + y = 10 Observe y = 10 - 3x 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 + 8 + 3 = 0 => y = -3 - 8 + 4x (1) Ly = -2y + x + 3 +  = 0 => 2y =  + 3 + 1x (2) L = 3x + y – 10 = 0 => y = 10 – 3x (3) (solve '((-4 1 3 -8)(1 -2 1 -3)(3 1 0 10)))  (69/28 73/28 -1/4) Z = 15.0179 Without constraint, the max occurs at x = 19/7, y = 20/7, max = 15.142857 rd 5/13/2019

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

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 '((6 0 0 2 0)(0 4 0 4 0)(0 0 8 -6 0)(2 4 -6 0 -5)))  ( x y z ) = (-2/11 -6/11 9/22 6/11) f(-2/11, -6/11, 9/22) = 1.289256 and |D| = 192 > 0 => minimum

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. 1000 - x x d C(x) = 50(1000 – x) + 80(x2 + 2002)1/2 C'(x) = -50 + 80/ (x2 + 2002)1/2 = 0 when x = 160.1 => d = 256.2 => 1000 - x = 840 Cost = 840 * 50 + 256 * 80 = $62,488. 200 Power Plant x rd 5/13/2019

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

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 '((2 0 0 1 0)(0 2 0 1 0)(0 0 2 1 0)(1 1 1 0 1))) (1/3 1/3 1/3 -2/3) => W = 1/3. 2 0 0 0 2 0 = 8 > 0 => minimum 0 0 2 rd 5/13/2019

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

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 '((4 -2 -5)(-2 2 3)))  (-1, ½ ) D = 12 => (-1, ½ ) is relative minimum F(-1, ½) = 2 + ¼ + 1 - 5 - 3/2 + 1 = -9/4. rd 5/13/2019

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 = 1 4 1 0 1 4 1 0 1 0 -3/5 4/5 2 3 0 1 0 -5 -2 1 0 1 2/5 -1/5  rd 5/13/2019

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  0. 5/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 – 100x2 + 3125x => f(0) = 0 f'(x) = 3x2 -200x + 3125 = 0 and f"(x) = 6x – 200 (quadratic 3 -200 3125)  (41.667 25) f(25) = 31,250 is relative maximum and f(41.67) = 28,935.18 is relative minimum (poly-eval '(3 -200 3125) '(41 42)  (-32 17 ) => crossing rd 5/13/2019

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 1 2 3 4 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

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 1 -6 9 1)  -0.1038 (quadratic 3 -12 9)  1, 3 rd 5/13/2019

Example Find the inverse of matrix 1 2 3 4 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 1 2 1 0 1 2 1 0 1 0 -2 1 3 4 0 1 0 -2 -3 1 0 1 3/2 -1/2 (solve '((1 3 0 0 1)(2 4 0 0 0)(0 0 1 3 0)(0 0 2 4 1)))  (-2 1 3/2 -1/2) rd 5/13/2019

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

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 0 0 2 0 0)(0 0 0 -1 1 -2)(0 0 -2 0 1 0) (2 -1 0 0 0 0)(0 1 1 0 0 0)))  (2/3 4/3 -4/3 -2/3 -8/3) rd 5/13/2019

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

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 '((2 0 0 1 0)(0 2 0 1 0)(0 0 2 1 0)(1 1 1 0 1))) (1/3 1/3 1/3 -2/3) => W = 1/3. 2 0 0 0 2 0 = 8 > 0 => minimum 0 0 2 rd 5/13/2019

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 '((4 -2 -5)(-2 2 3)))  (-1, ½ ) D = 12 => (-1, ½ ) is relative minimum F(-1, ½) = 2 + ¼ + 1 - 5 - 3/2 + 1 = -9/4. rd 5/13/2019

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  0. 5/2 f'(x) = 4x -10 = 0 when x = 5/2, f(5/2) = 37.5 f"(x) = 4 => minimum, f(0) = 50; f() =  25 41.6 f(x) = x3 – 100x2 + 3125x => f(0) = 0 f'(x) = 3x2 -200x + 3125 = 0 and f"(x) = 6x – 200 (quadratic 3 -200 3125)  (41.667 25) f(25) = 31,250 is relative maximum and f(41.67) = 28,935.18 is relative minimum (poly-eval '(3 -200 3125) 41)  -32, but at 42  17 rd 5/13/2019

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 '((10 -3 53)(-6 25 -55)))  (5, -1) => z = -3 rd 5/13/2019

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

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

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 '((10 8 24)(8 10 24)))  (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

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

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