Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Derivation of Lagrange Multipliers Method

  1. Jun 5, 2010 #1
    Hey folks. :smile: I have some more or less qualitative questions regarding optimization problems via Lagrange multipliers. I am following the http://en.wikipedia.org/wiki/Lagrange_multipliers" [Broken] on this one and I am just a little confused by their wording.

    In the first section titled "Introduction," they have the following:

    1) My first question (which might seem silly) is: What is g(x,y) ? Is it a line? Or a surface? It looks like a line in their picture but I am used to functions of the forms g(x,y) being representative of surfaces; though I feel like it could be ambiguous.

    2) Second, when they say: "Suppose we walk along the contour line with g = c." They don't mean that g = c IS the contour line right? They are saying that AT g(x,y) one can follow a contour line. It just seems like if g(x,y) = c is not a surface, then the whole idea of a contour is a little weird to me. So perhaps if someone can answer my first question this would make more sense to me.


    Sorry if these seem stupid, but it has been awhile.
     
    Last edited by a moderator: May 4, 2017
  2. jcsd
  3. Jun 5, 2010 #2

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

  4. Jun 5, 2010 #3


    Hey LCKurtz :smile:

    I am sketching this right now. Sketching level sets was never really my strong suit. :frown:
    Is it as simple as letting c take on a certain value and then plotting that line? For example, let c = 1/2 and then plot the line y = 1/2 - 2x ? I am going to assume that the answer is yes and proceed.

    And for this example, I assume that we are maximizing 'T' subject to the constraint that the point falls on the wire.

    EDIT: Okay. I have plotted the circle and the line y = c - 2x for various values of c. I can see that 'T' would be maximized (and minimized) when the line y = c - 2x is tangent to the circle. I am having a couple of issues with this now.

    1) Not sure how to generalize this idea beyond the simple circle constraint. That is if both my maximizing function f and my constraining function g are arbitrarily shaped surfaces, will the condition that g is 'tangent to' f be sufficient to say that f is at a maximum there?

    2) I am not sure how to word this without sounding like an idiot :redface: but here goes anyway: The function T = y + 2x = c that you gave, is that a surface? That is, isn't it T(x,y) = y + 2x - c ? Or is it just T(x,y) = y + 2x ? I don't know why this is so confusing right now :smile:
     
    Last edited: Jun 5, 2010
  5. Jun 5, 2010 #4

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    It could be a minimum as well.
    T(x,y)=y+2x describes a surface. Think of T as the z coordinate. For each point in the xy plane, there's an associated temperature which you can think of as the height of the surface above the point (x,y). When you choose a specific value of T, you're looking at the intersection of that surface with the plane T=c.
     
  6. Jun 6, 2010 #5

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Yes

    This is a 2D example.

    T = y+2x is the temperature at a point (x,y) in the plane. I don't find it helpful to interpret it as a surface although it can be thought of that way. The level curves in this example are straight lines in the plane on which the temperature is constant.: y+2x = c. It wouldn't matter if the level curves had other shapes. Try drawing a family of hyperbolas. As long as everything is smooth the level curves will be tangent at the extremes.
     
  7. Jun 8, 2010 #6
    For anyone who is curious, I plotted T(x,y) = y + 2x and g(x,y) = x^2 + y^2 along with the plane z(x,y) = 1. The intersection of z(x,y,) = 1 with g(x,y) = x^2 + y^2 gives the level set g(x,y) = x^2 + y^2 = 1. Here are a couple of views:


    Picture9.png


    and another view


    Picture8-3.png


    And and one more


    Picture7-5.png
     
  8. Jun 9, 2010 #7

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Pretty pictures, but I don't think they add to the understanding of what is going on. The example problem is given temperature T(x,y) = x+2y in the plane, find the hottest point on the wire represented by the unit circle x2+y2 = 1. The following plot shows the level curves for T varying from -3 to 3 including, in red, T =sqrt(5) which obviously gives the max.

    levelcurves.jpg

    Maple doesn't label the contours, but in this example the y intercepts of the contour lines give T for the lines.
     
  9. Jun 9, 2010 #8
    Different people learn in different ways I guess :smile: The picture that you drew is indeed the exact same picture that I drew originally, but I found that it did not add to my understanding of the problem.

    For me the problem was that T(x,y) is in fact a surface, whether "it helps to interpret it that way" or not. And the constraint, though in this case is a simple circle, is actually a level set on a surface. So for me, being able to see that for the constraint
    g(x,y) = x^2 + y^2 = anything,
    T(x,y) is maximal when the level set of g(x,y) is tangent to T(x,y).

    Thanks for the help again!
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook