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

Lagrangian Multipliers to find maximum and minimum values

  1. Apr 9, 2014 #1
    I'm just learning this theory and the maths is really trivial but the theory is slightly confusing me.

    I understand that if we have some function z=f(x,y) and we graph this on a three dimensional set of axis we will have some surface, we can then extend this by creating level curves in the x, y plane for differing values of z.

    We then set up a function g(x,y)=k such that k is a constant, we call this our constraint curve and it looks something as shown in the link I have provided.


    I understand how the theory that the maximum/minimum value will occur when the grad of function f and the grad of function g are scalar multiples of each other. But imagine for a second that the constraint curve was a straight line and it went straight through the centre of the circle created by the level curve of the function f. In that case the maximum value would be at the centre of this level curve, but to my knowledge at no time were the gradients parallel.

    Or imagine a sloping flat surface sloping up. If the constraint curve started off running up the slope then for a second ran tangent to one of the level curves and then ran at some angle up this surface and stopped, then the point at which the gradients were scalar multiples only in the middle of the curves, so the supposed maximum/minimum occured at a random place. If you could clarify this it would be extremely helpful thanks!
  2. jcsd
  3. Apr 9, 2014 #2


    User Avatar
    Science Advisor

    So like: "Minimize [itex]f(x,y)= x^2+ y^2[/itex] subject to the constraint y= x"? The constraint can be written g(x,y)= y- x so [itex]\nabla f= 2x\vec{i}+ 2y\vec{j}[/itex] and [itex]\nabla g= -vec{i}+ vec{j}[/itex]. The Lagrange multiplier method says that the max or min will be where [itex]2x= -\lambda[/itex] and [itex]2y= \lambda[/itex].

    Eliminate [itex]\lambda[/itex] by dividing one equation by the other: [itex]x/y= -1[/itex] or y= -x. That, together with y= x, the constraint, give y= x= 0. The two gradients are never parallel but if one is 0 that will also satisfy [itex]\nabla g= \lambda\nabla f[/itex].

    Another way of putting this is that if the two gradients are never parallel, then the "constraint" doesn't really constrain anything. The max or min will be where the gradient of the given function is 0.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for Lagrangian Multipliers find
A Can I find a smooth vector field on the patches of a torus?