Understanding Lagrange Multipliers and Constraint Equations

In summary, Lagrange Multipliers can provide a method for finding maxima and minima of a function subject to a constraint, but in certain degenerate cases, the method may not give a unique solution. These degenerate cases can arise when the objective function is constant in certain directions or when there is an entire curve of points that are maxima or minima.
  • #1
Skrew
131
0
I have been reading about Lagrange Multipliers, my book along with wiki and other resources I have read use an intuitive argument on why the max/min contour lines end up tangent to the constraint equation.
I don't really understand it, especially considering the obvious flaw as shown by the below,

F(x,y) = sin(x*y),

subject to, x^2 + y^2 = 6

The picture is the graph of the contour lines of F(x,y) along with the constraint.

The max and min values of F(x,y) are obviously not at the places the contour lines are tangent to the constraint.

So I was wondering if anyone could explain what's going?
 

Attachments

  • contourlines.JPG
    contourlines.JPG
    40.2 KB · Views: 355
Physics news on Phys.org
  • #2
? The maxima and minima of F(x,y), subject to the contstraint [itex]x^2+ y^2= 6[/itex] are [itex](\sqrt{3}, \sqrt{3})[/itex], [itex](-\sqrt{3}, -\sqrt{3})[/itex] (the maxima), [itex](\sqrt{3}, -\sqrt{3})[/itex], and [itex](-\sqrt{3}, \sqrt{3})[/itex] (the minima) obviously are where the level curves of F(x, y), specifically, sin(xy)= sin(3) and sin(xy)= -sin(3), are tangent to the graph of [itex]x^2+ y^2= 6[/itex].

I suspect that your graph just doesn't show the specific level curve sin(xy)= sin(3) or sin(xy)=-sin(3) which are the same as the graphs of xy= 3 and xy= -3. What sort of iteration did you use to graph the level curves?
 
  • #3
Uh point (2, sqrt(2)) produces a bigger maxima.
 
  • #4
Both of you seem to have forgotten that the system:
[tex]\cos(xy)=0(1)[/tex]
[tex]x^{2}+y^{2}=6(2)[/tex] can have real solutions.

The first is equivalent of saying:
[tex]xy=(2n+1)\frac{\pi}{2}[/tex] for some integer n

We may convert that system of equation into, for example:
[tex]x^{2}+y^{2}=6[/tex]
[tex](y-x)^{2}=\pm\sqrt{6-(2n+1)\pi}[/tex]

Or,
[tex]y=x+\pm\sqrt{6-(2n+1)\pi}[/tex]

Inserting in (2), we get:
[tex]2x^{2}\pm{2x}\sqrt{6-(2n+1)\pi}+6-(2n+1)\pi=6[/tex]
which can be simplified as:
[tex](x\pm\frac{\sqrt{6-(2n+1)\pi}}{2})^{2}=\frac{(2n+1)\pi}{2}+\frac{6-(2n+1)\pi}{4}[/tex]
which simplifies to:
[tex](x\pm\frac{\sqrt{6-(2n+1)\pi}}{2})^{2}=\frac{6+(2n+1)\pi}{4}[/tex]
Taking the squar root, remembering that the "plus-minuses" may vary independently of each other, we get:
[tex]x=\pm\frac{\sqrt{6-(2n+1)\pi}}{2}\pm\frac{\sqrt{6+(2n+1)\pi}}{2}[/tex]

Thus, we see that only n=0 and n=-1 are acceptable values.

Thus, we have:
[tex]x=\pm\frac{\sqrt{6+\pi}}{2}\pm\frac{\sqrt{6-\pi}}{2}[/tex]

This can be simplified as:
[tex]x=\pm(\frac{\sqrt{6+\pi}}{2}+\frac{\sqrt{6-\pi}}{2}[/tex]
OR
[tex]x=\pm(\frac{\sqrt{6+\pi}}{2}-\frac{\sqrt{6-\pi}}{2}[/tex]
For each of these 4 solutions, y can be either of the 2 from the OTHER set, so that we have 8 solutions all in all.
 
Last edited:
  • #5
arildno, you can also easily see by the contour plot that there are 4 mins and 4 maxes, my example of (2, sqrt(2)) wasn't to indicate it was even a max or min, only to show that HallsofIvy was incorrect.

A more simple example showing the intuitive argument for the use of Lagrange multipliers is wrong can be seen through.

F(x,y) = sin(x) + 0y,

x^2+y^2 = 6

The highest level curve cuts through the constraints graph, it isn't tangent to it.

The intuitive argument works if the function is increaseing or decreasing throughout the "region" of the constraint but not otherwise, not if there is a max or min level curve on the constraints graph(which cuts through it).
 

Attachments

  • ContourLines2.JPG
    ContourLines2.JPG
    14.4 KB · Views: 357
Last edited:
  • #6
Skrew said:
Uh point (2, sqrt(2)) produces a bigger maxima.

No, it doesn't. [itex]\sin(2\sqrt{2}) \approx 0.049[/itex],while [itex]\sin(\sqrt{3}\sqrt{3}) \approx 0.05233[/itex].

arildno said:
Both of you seem to have forgotten that the system:
[tex]\cos(xy)=0(1)[/tex]
[tex]x^{2}+y^{2}=6(2)[/tex] can have real solutions.

...

Uh, the problem isn't about that system of equations, it's a Lagrange multiplier problem, i.e., minimize the function F(x,y) = sin(xy) subject to the constraint c(x,y) = x^2 +y^2 - 6, which amounts to minimizing

[tex]G(x,y) = F(x,y) - \lambda c(x,y)[/tex]

I'm not sure where your system of equations comes from, because the minimization procedure yields

[tex]\frac{\partial G}{\partial x} = y\cos(xy) - 2\lambda x = 0 [/tex]
[tex]\frac{\partial G}{\partial y} = x\cos(xy) - 2\lambda y = 0 [/tex]
which gives x^2 = y^2 when lambda isn't zero, which gives the [itex]\pm \sqrt{3}[/itex] solutions.
 
Last edited:
  • #7
Mute said:
which gives x^2 = y^2 when lambda isn't zero, which gives the [itex]\pm \sqrt{3}[/itex] solutions.
What about the solutions corresponding to when lambda is zero?


Skrew said:
So I was wondering if anyone could explain what's going?
You're running into an issue of degeneracy. Roughly speaking, at the maximum, every unit vector points in a direction in which the objective function remains constant.
 
Last edited:
  • #8
Mute said:
No, it doesn't. [itex]\sin(2\sqrt{2}) \approx 0.049[/itex],while [itex]\sin(\sqrt{3}\sqrt{3}) \approx 0.05233[/itex].



Uh, the problem isn't about that system of equations, it's a Lagrange multiplier problem, i.e., minimize the function F(x,y) = sin(xy) subject to the constraint c(x,y) = x^2 +y^2 - 6, which amounts to minimizing

[tex]G(x,y) = F(x,y) - \lambda c(x,y)[/tex]

I'm not sure where your system of equations comes from, because the minimization procedure yields

[tex]\frac{\partial G}{\partial x} = y\cos(xy) - 2\lambda x = 0 [/tex]
[tex]\frac{\partial G}{\partial y} = x\cos(xy) - 2\lambda y = 0 [/tex]
which gives x^2 = y^2 when lambda isn't zero, which gives the [itex]\pm \sqrt{3}[/itex] solutions.

And why cannot lambda be zero?

The case of lambda=0 just means that the max/min under the constraint happens to be max/min WITHOUT the constraint as well.

Which is, in fact, the case here.
 
  • #9
Mute said:
No, it doesn't. [itex]\sin(2\sqrt{2}) \approx 0.049[/itex],while [itex]\sin(\sqrt{3}\sqrt{3}) \approx 0.05233[/itex].

I am using radians, sin(2*sqrt(2)) > sin(3).

Hurkyl said:
You're running into an issue of degeneracy. Roughly speaking, at the maximum, every unit vector points in a direction in which the objective function remains constant.

I don't understand your explanation.
 
  • #10
Skrew said:
I don't understand your explanation.
If you're at the maximum, then no matter what direction you point, the graph of the objective function is level in that direction.

In particular, this implies that the tangent line to the constraint function points in a direction in which the objective function is neither increasing nor decreasing. It just so happens that, in the degenerate case, there are lots of other directions with that property as well.

(Why is it degenerate? Well, for most points, all but 2 unit tangent vectors will be pointing in a direction where the function is either increasing or decreasing)


That the maximum is not isolated -- there is an entire curve of points that are maxima -- is another source of degeneracy. You probably wouldn't have noticed the first kind of degeneracy if it weren't also for the second kind of degeneracy to make it graphically obvious.

(Why is it degenerate? The maxima occurs inside the solution set to two equations in two variables -- usually such sets are a discrete set of points)
 
  • #11
Skrew said:
I am using radians, sin(2*sqrt(2)) > sin(3).

I thought I was using radians too! Turns out the calculator in Linux was in degree mode! My bad.

arildno said:
And why cannot lambda be zero?

The case of lambda=0 just means that the max/min under the constraint happens to be max/min WITHOUT the constraint as well.

Which is, in fact, the case here.

It was an oversight on my part to not check what system of equations lambda = 0 gave.
 

Related to Understanding Lagrange Multipliers and Constraint Equations

What are Lagrange multipliers and constraint equations?

Lagrange multipliers and constraint equations are mathematical tools used in optimization problems. They help find the maximum or minimum value of a function while satisfying certain constraints. The Lagrange multipliers are coefficients that are multiplied with the constraints to incorporate them into the optimization problem.

Why do we need to use Lagrange multipliers and constraint equations?

Many real-world problems involve optimizing a function while satisfying certain constraints. For example, minimizing the cost of production while meeting a certain production quota. In such cases, Lagrange multipliers and constraint equations provide a systematic approach to finding the optimal solution.

How do Lagrange multipliers and constraint equations work?

In Lagrange multipliers, the constraints are added to the objective function as additional terms. The Lagrange multiplier acts as a weight for each constraint, indicating how important it is to satisfy that constraint. The resulting function is then solved using calculus to find the optimal solution.

What are some applications of Lagrange multipliers and constraint equations?

Lagrange multipliers and constraint equations are used in many fields, including economics, engineering, and physics. They can be applied to problems involving optimization, such as minimizing costs or maximizing profits. They are also used in physics to find the most efficient path between two points given certain constraints.

What are some limitations of using Lagrange multipliers and constraint equations?

Lagrange multipliers and constraint equations can only be used for problems with continuous functions and constraints. They also assume that the objective function and constraints are differentiable. Additionally, they may not always provide a global optimum and may require multiple iterations to find the solution.

Similar threads

Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
555
Replies
9
Views
2K
  • Calculus
Replies
9
Views
2K
Replies
1
Views
1K
Replies
4
Views
3K
  • Classical Physics
Replies
7
Views
960
  • Calculus and Beyond Homework Help
Replies
16
Views
2K
  • Advanced Physics Homework Help
Replies
6
Views
1K
Replies
1
Views
633
Back
Top