Lagrange MultipliersDate: 01/08/98 at 08:14:16 From: aleja Subject: Lagrange Multipliers Dear Dr. Math, I have a problem with Lagrange Multipliers. I'd like to know if you could answer me about this. If yes, I'll send you the problem (it's long). Thank you! Alejandro Pelorosso Buenos Aires, Argentina Date: 01/08/98 at 17:10:48 From: Doctor Anthony Subject: Re: Lagrange Multipliers These are notes I sent to another enquirer about Lagrange Multipliers; they may answer the questions you have about the topic. This method is best illustrated by an example. I shall look for the stationary values of f(x,y) = 2x^2 + 3y^2 subject to the constraint 2x + y = 1. The general problem is to find stationary points of f(x,y) subject to constraint g(x,y) = 0 [Note that the constraint must be written in this form]. So for our problem g(x.y) = 2x + y - 1. At stationary points of f(x,y) we have df = part(df/dx)*dx + part(df/dy)*dy = 0 This implies that the vector [part(df/dx), part(df/dy)] is perpendicular to the vector [dx, dy] Since g(x,y) = 0 we can write dg = part(dg/dx)*dx + part(dg/dy)*dy = 0 Thus the vector [part(dg/dx), part(dg/dy)] is also perpendicular to the vector [dx, dy]. This implies that the vector [part(df/dx), part(df/dy)] is parallel to the vector [part(dg/dx), part(dg/dy)] and that we can find a number 'k' such that [part(df/dx), part(df/dy)] - k[part(dg/dx), part(dg/dy)] = [0, 0] This can be summarized by writing phi(x,y) = f(x,y) - kg(x,y) Then f(x,y) will have a stationary point subject to constraint g(x,y) = 0 when part(d(phi)/dx) = 0, part(d(phi)/dy) = 0 and g(x,y) = 0 This gives three equations to find x, y and k. k is called the Lagrange multiplier and phi is called the auxiliary function. Applying these ideas to our problem, we have f(x,y) = 2x^2 + 3y^2 and g(x,y) = 2x + y - 1 The auxiliary function is phi(x,y) = f(x,y) - kg(x,y) = 2x^2 + 3y^2 - k(2x + y -1) Then: part(d(phi)/dx) = 4x - 2k = 0 (1) part(d(phi)/dy) = 6y - k = 0 (2) g(x,y) = 2x + y -1 = 0 (3) Solving (1), (2) and (3) for k, x and y we get k = 6/7 x = 3/7 y = 1/7 So at the stationary point x = 3/7 y = 1/7 we have f(x,y) = 2*(3/7)^2 + 3*(1/7)^2 = 18/49 + 3/49 = 21/49 = 3/7 To determine the nature of the stationary point you look at neighbouring points to see if f(x,y) has increased or decreased or not changed (saddle point). -Doctor Anthony, The Math Forum Check out our web site! http://mathforum.org/dr.math/ Date: 01/08/98 at 21:52:00 From: aleja Subject: Re: Lagrange Multipliers Hello again, Dr. Math! I asked today about Lagrange Multipliers, and was surprised at your quick answer giving me theory. Thanks! However, I can't solve this problem. It was given on an exam :( Here it is: Find the points of the function g(x,y) = 1/xy nearest to the (0,0,0) point. Using Lagrange Multipliers, and the distance formula is x^2+y^2+z^2 Thank you very much! Alejandro Pelorosso Buenos Aires, Argentina. Date: 01/09/98 at 08:36:34 From: Doctor Anthony Subject: Re: Lagrange Multipliers Geometrically I will consider a surface z = g(x,y), and we require the coordinates of points on this surface that are closest to (0,0,0). We can write the equation of the surface in the form 1/(xy) - z = 0 (this is the constraint). and we require to minimize f(x,y,z) = x^2 + y^2 + z^2 The auxiliary equation is: phi(x,y,z) = f(x,y,z) - L(1/(xy) - z) where L = Lagrange multiplier. = x^2 + y^2 + z^2 - L(1/(xy) - z) We then find the coordinates (x,y,z) of the minimum point and L, the Lagrange multiplier from the equations: part(d(phi)/dx) = 0 part(d(phi)/dy) = 0 part(d(phi)/dz) = 0 and the equation 1/(xy) - z = 0 (1) 2x + L/(y.x^2) = 0 (2) 2y + L/(x.y^2) = 0 (3) 2z + L = 0 (4) 1/(xy) - z = 0 Fairly trivially, these equations are satisfied by x=y=z = 1 and L = -2 So a point of nearest approach to (0,0,0) of the surface z = 1/(xy) has coordinates (1,1,1) -Doctor Anthony, The Math Forum Check out our web site! http://mathforum.org/dr.math/ Date: 01/10/98 at 09:55:26 From: aleja Subject: Re: Lagrange Multipliers Please forgive my bothering you again, but my real problem on this point is to solve the nonlinear system. I can't understand your answer about the (1,1,1) point. Could you please explain how you did it? I have solved several systems on other problems but sometimes I can't get the x,y,z, and L values, so I would appreciate it if you could explain all of that to me. Thanks again, and greetings! Alejandro Date: 01/10/98 at 11:47:28 From: Doctor Anthony Subject: Re: Lagrange Multipliers I will go through the method for finding x, y, z and L from the four equations shown below. (1) 2x + L/(y.x^2) = 0 (2) 2y + L/(x.y^2) = 0 (3) 2z + L = 0 (4) 1/(xy) - z = 0 From (3) z = -L/2 and then from (4) 1/(xy) + L/2 = 0 L/2 = - 1/(xy) L = -2/(xy) Now using this value of L, equations (1) and (2) can be written 2x - 2/(y^2.x^3) = 0 -> x = 1/(y^2.x^3) x^4 = 1/y^2 ... (5) 2y - 2/(x^2.y^3) = 0 -> y = 1/(x^2.y^3) y^4 = 1/x^2 ... (6) Taking square roots of (5) and (6) x^2 = 1/y from this y = 1/x^2 .... (7) and from (6) y^2 = 1/x ..... (8) but from (5) y^2 = 1/x^4 ..... (9) and from (8) and (9) x^4 = x x^3 = 1 so x = 1, then from(8) y=1, and from (4), z=1 and from (3) L = -2. -Doctor Anthony, The Math Forum Check out our web site! http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
Ask Dr. MathTM
© 1994-2003 The Math Forum
http://mathforum.org/dr.math/