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

  1. Dec 23, 2013 #1
    1. The problem statement, all variables and given/known data
    Lagrange multipliers to find the maximum and minimum values of f(x,y) = 4x^3 + y^2 subject to the constraint 2x^2 + y^2 = 1. Find points of these extremum.


    2. Relevant equations



    3. The attempt at a solution
    g(x,y)= 2x^2 + y^2 - 1
    f(x,y)= 4x^3 + y^2
    Gradient F= 12x^2i + 24yj
    Gradient G= 4xi + 2yj

    Gradient = 4x^3 + y^2 - λ(2x^2 + y^2 - 1)
    = [12x^2- λ4x, 2y - 2λy, -2x^2 - y^2 - 1]
    12x^2 - λ4x = 0
    3x = λ

    2y - 2λy = 0
    λ= 1

    x = 1/3 (Is this correct?)

    fx (x,y) = 12x^2 x=0
    fy (x,y) = 2y y=0

    No minima or maxima is my conclusion but I'm very sure it's wrong. Also is the 3-D representation somewhat like a paraboloid with a ellipsoid constraint?

    Thanks!
     
  2. jcsd
  3. Dec 23, 2013 #2

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    That's not right. The gradient doesn't equal 4x^3 + y^2 - λ(2x^2 + y^2 - 1), and 4x^3 + y^2 - λ(2x^2 + y^2 - 1) doesn't equal [12x^2- λ4x, 2y - 2λy, -2x^2 - y^2 - 1].

    You lost a solution by dividing by 0. It's better to divide out the 4 and factor the remaining expression.
    $$3x^2 - \lambda x = x(3x-\lambda) = 0$$ This way you can see there are two possible solutions — the one you found, ##3x=\lambda##, and the one you didn't, x=0.

    Again, you missed a solution.

    This is one possibility. To get here, you assumed x≠0, so that you can say that x=λ/3, and y≠0, from which you deduced λ=1. You still need to solve for y and then plug it back into f(x,y).

    Then you need to go back and find the other solutions and test those as well.

     
  4. Dec 23, 2013 #3
    Thank you for telling me about the factoring method with which I was able to recover a solution.

    However, I am a bit confused about the purpose of lambda here - I now have x= lambda/3 , x=0 , y=0, and lambda = 1 as my solutions. How can I plug these in to f (x,y) to check for maxima and minima? Won't it just give me the value of the function in terms of lambda (for two of them)?
     
  5. Dec 24, 2013 #4

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    You have three conditions that need to hold:
    \begin{align*}
    x(3x-\lambda) &= 0 \\
    y(\lambda-1) &= 0 \\
    2x^2 + y^2 -1 &= 0
    \end{align*} and you'll need to consider several different cases. You're looking for combinations of values for x, y, and ##\lambda## that will satisfy all three conditions simultaneously. Primarily, though, you're interested in finding x and y. Their relationship to ##\lambda## may help you find x and y, but you may not need to consider ##\lambda## at all.

    To satisfy the first condition, you can have ##x=0##, ##x=\lambda/3##, or both. To satisfy the second condition, you need ##y=0##, ##\lambda=1##, or both. Finally, x and y have to satisfy the constraint.

    So far, you looked at the case where ##x=\lambda/3## and ##\lambda=1##. You want to consider what happens if you assume x=0. Can y=0? Why not? What can y be? Similarly, you want to consider cases where y=0 and you solve for x.
     
  6. Dec 24, 2013 #5
    Thank you for explaining that - I was thoroughly confused and I think I understand it a bit better.

    So for x= 0, y=+/-1
    And for y=0, x= +/- 1/sqrt(2)

    When you plug the first solution in to f(x,y) for x=0, you get f(x,y)= 1.
    The second solution gives you either f(x,y) = 2/sqrt(2) or -2/sqrt(2)

    And then from these values, how do you presume a minima and a maxima? Or am I doing it all wrong?
    Thank you.
     
  7. Dec 24, 2013 #6
    Never mind I think I got it.

    Is the minima at (-1/sqrt(2), 0) and the maxima at (1/sqrt(2), 0)?

    Thanks!
     
  8. Dec 24, 2013 #7

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Yes, that's right.

    By the way, minima and maxima are, respectively, plurals of minimum and maximum.
     
  9. Dec 24, 2013 #8

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    This was supposed to be "2yj", not "24yj", right?

    Don't use "f" and "g" in one place and "F" and "G" in another!

    What? This is f= λg, not a gradient at all.

    Rather than "grad f+ λgrad g= 0", I prefer "grad f= λ grad g", which, of course, is the same thing. From grad f= 12x^2i+ 2yj and grad g= 4xi+2yj, we have 12x^2i+ 2yj= λ(4xi+ 2yj).
    Separating the components, 12x^2= 4λx and 2y= 2λy.

    I find that often the best way to eliminate λ, which is not part of the solution, is to divide one equation by the other: 12x^2/2y= 4x/2y or 6x^2/y= 2x/y. Multiplying both side by y, 6x^2= x, 6x^2- x= 0, x(6x- 1)= 0 so x= 0 or x= 1/6.

    We also have the constraint 2x^2+ y^2= 1. If x= 0 then y= 1 or -1. If x= 1/6 then 1/18+ y^2= 1 so y^2= 17/18.
     
  10. Dec 24, 2013 #9

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    There are three local maxima and three local minima; of the maxima, one is global and the two others are local; ditto for the minima.

    So, you have found two of the six possible solutions to the Lagrange conditions. You can get them all by being very careful when solving the Lagrange optimality equations; in particular, be careful not to discard some values like x = 0 or y = 0, etc.

    Another way go gain insight into the problem is to look at the equivalent problem of optimizing
    [tex] F(\theta) = f\left(\frac{\cos(\theta)}{\sqrt{2}},\sin(\theta) \right), \: 0 \leq \theta \leq 2 \pi. [/tex]
    This just amounts to switching to polar coordinates for ##X = x \sqrt{2}## and ##Y = y##. Also, it may help to note that ##F(\theta)## is a cubic polynomial in ##z = \cos(\theta)## that you need to maximize or minimize for ##z \in [-1,1]##. Of course, your instructor may not accept a solution based on this representation (because it does not use the requested Lagrange multiplier approach), but the insights you can get from the new view may help you deal with what is happening in the Lagrangian approach.
     
    Last edited: Dec 24, 2013
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Lagrange Multipliers
  1. Lagrange Multiplier (Replies: 2)

  2. Lagrange Multipliers (Replies: 7)

  3. Lagrange Multipliers (Replies: 8)

Loading...