1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Lagrange Multipliers/System of Equations?

  1. Jul 4, 2011 #1
    1. The problem statement, all variables and given/known data
    I seem to be struggling a bit to understand how my prof solved this problem....I think it might be my diminishing system of equation skills, so forgive me if this doesn't belong in the calc section.

    Use Lagrange multipliers to find all extrema of the function subject to the given constraint:

    [tex]f(x,y)=y-x^2[/tex]

    subject to:

    [tex]g(x,y)=x^2+y^2=1[/tex]

    2. Relevant equations

    The local extrema should exist where the gradient of the function is equal to the gradient of the constraint, multiplied by a value (the Lagrange multiplier):

    [tex]\nabla f = \lambda\nabla g[/tex]

    3. The attempt at a solution

    Solving for gradient f and g was no prob:

    [tex]\nabla f = <-2x,1>[/tex]
    [tex]\nabla g = <2x,2y>[/tex]

    And this helps me setup a system of equations:

    [tex]1) -2x = 2\lambda x[/tex]
    [tex]2) 1 = 2\lambda y[/tex]
    [tex]3) x^2+y^2 = 1[/tex]

    Now at this point my professor "intuited" that with equation 1, to satisfy the equation, either x=0 or lambda = -1. I agree with it but I don't remember having to "intuit" things in a system of equations, I always remember it being a procedural solution. He takes these two conditions and runs with it and ends up finding the answers...

    Now I'm sitting here trying to do it old-school procedurally, so I think equation 2 looks good:

    [tex]2) y=\frac{1}{2\lambda}[/tex]

    plug into 3

    [tex]3) x^2 + (\frac{1}{2\lambda})^2 = 1[/tex]

    solve for x:

    [tex]x = +/-\sqrt{1-\frac{1}{4(\lambda)^2}}[/tex]

    putting the positive version in equation 1:

    [tex]1) -2(x) = 2 \lambda x[/tex]
    [tex]1) -2 = 2 \lambda[/tex]
    [tex]1) \lambda = -1[/tex]

    I get the same answer with the positive version of x

    [tex]1) \lambda = -1[/tex]

    I go back to equation 2 to solve for Y:

    [tex] 2) 1 = -2 y[/tex]
    [tex] 2) -\frac{1}{2}=y[/tex]

    Plugging lambda into my x = sqrt equation for x:

    [tex]x = +/- \sqrt{\frac{3}{4}}[/tex]

    So now I feel all warm and fuzzy, because I have my extrema locations:

    [tex](-\sqrt{\frac{3}{4}}, -\frac{1}{2}); (\sqrt{\frac{3}{4}}, -\frac{1}{2})[/tex]

    But looking back at my notes...the x=0 intuition that my professor deduced ended up being another extrema, which ended up leading to the ACTUAL maximum.

    Did I screw something up? Is that "intuition" thing actually what I need to do to solve these things? Are there certain conditions that always require this kind of thinking? Is there an even better way to truly find all the solutions?
     
  2. jcsd
  3. Jul 4, 2011 #2

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Hi scoobiedoober! :smile:

    Things look good, but there are a few subtleties:

    This only holds if [itex]\lambda\neq 0[/itex] (indeed, if it is 0, then you divide by 0!!!). So you must solve the case [itex]\lambda=0[/itex] separately.

    So you end up with two systems, one where lambda is 0 and one where it is not.

    In the first step you divided both sides by x. This is only allowed if x is nonzero (otherwise you divide by 0!!)! So you'll have to treat the case x=0 separately.

     
  4. Jul 5, 2011 #3
    Alrighty, thanks! I guess my system-of-equation solving skills were always limited to linear systems. I'll just have to keep my eyes peeled for these "what if" scenarios in the future. Or maybe if I just restart the whole process multiple times with me starting by solving a different variable in every equation I will be safe.

    for example: if I started solving equation (1) for x, I would see that x = 0, then I could run with that and get all the solutions I can. Then solve equation (1) for lambda, getting lambda = 1...and so on until I've expired every "starting" situation...It probably wouldn't be THAT much more work than doing these "what if" scenarios, because I imagine I would ultimately run into a bunch of repeated solutions in which I could stop at that point.
     
  5. Jul 5, 2011 #4

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    It's not that hard really. Just solve the system first like you want to solve it. Then check your solution again to see if you didn't do anything illegal (like dividing by zero) and take these illegal values as special values for which you solve the system again...
     
  6. Jul 5, 2011 #5

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    One generally good method of solving systems of equations that result from the Lagrange multiplier method is to first eliminate [itex]\lambda[/itex] by dividing one equation by another.

    Here, your equations are [itex]−2x=2\lambda x[/itex] and [itex]1=2\lambda y[/itex]. If you divide the second by the first, [itex]-2x/1= -2x= (2\lambda x)/(2\lambda y)[/tex] or [itex]-2x= x/y[/tex] which gives either x= 0 or y= -1/2. Since you also have the condition that [itex]x^2+ y^2= 1[/itex], we have x= 0 and [itex]y= \pm 1[/itex] or y= -1/2 and [itex]x= \pm\sqrt{3}/2[/itex].
     
  7. Jul 6, 2011 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Let me use the symbol u instead of [itex]\lambda[/itex]. Either x = 0 or [itex] x \neq 0[/itex]. If x = 0, what does eq.(3) say about y? What does eq.(2) say about u? If x is not zero, what does eq.(1) say about u? Then, what does eq.(2) say about y? Then, what does eq.(3) give you?

    RGV
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Lagrange Multipliers/System of Equations?
  1. Lagrange Multipliers (Replies: 8)

  2. Lagrange Multipliers (Replies: 8)

Loading...