Very Frustrating (or Easy) Lagrange Multipliers Problem

Click For Summary

Homework Help Overview

The discussion revolves around finding the extrema of the function f(x,y)=x²-2xy+2y², subject to the constraint x²+y²=1, using the method of Lagrange multipliers. Participants express varying levels of frustration with the algebra involved in the process.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss setting up the system of equations derived from the Lagrange multipliers method, questioning their algebraic manipulations and the implications of the constraint. Some express confusion about how to equate the two lambda expressions and solve for the variables.

Discussion Status

There is an ongoing exploration of different algebraic approaches to solve the equations. Some participants have offered insights into simplifying the equations, while others are still grappling with the algebraic steps needed to progress. No consensus has been reached, but several productive lines of reasoning have been proposed.

Contextual Notes

Participants are restricted from using polar coordinates and must rely solely on the Lagrange multipliers method. This constraint adds to the complexity of the problem-solving process.

number0
Messages
102
Reaction score
0

Homework Statement



Find the extrema of the given function subject to the given constraint:

f(x,y)=x2-2xy+2y2, subject to x2+y2=1

Homework Equations



Lagrange Multipliers

The Attempt at a Solution



First, I defined the constraint to be g(x,y)=0, that is,

g(x,y)=x2+y2-1

I then set up the usual basic system of equations (I did not show my work for this part because I find it unnecessary):

x-y=[tex]\lambda[/tex]x

-x+2y=[tex]\lambda[/tex]y

x2+y2-1=0

(*Note: I reduced the first two equations by a factor of 2 for the sake of easier computing).

So now, I have three sets of equation and the MOST algebraic manipulation I could

do is the following:

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

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

x^2+y^2=1

_________________________________________

Another path I took was combining the first two equations, which got me:

[tex]\lambda[/tex](x+y)=y

Which got me no where.
_________________________________________

And now, I am stuck! Oh yes, I forgot to mention that I am not allowed to use polar

coordinates at all (since the constraint is a unit circle...) - I am only allowed to use Lagrange Multipliers. On another note, the answer is

very, very ugly (it is in decimals). Can anyone please show me how to figure this problem

out? Thanks!
 
Last edited:
Physics news on Phys.org
Global max is at (-0.525731,0.850651) and (0.525731,-0.850651)
f(x,y)=x^2-2xy+2y^2, subject to x^2+y^2=1


Fx = 2*x - 2*y = lambda*2*x
Fy = -2*x + 4*y = lambda*2*y
x^2 + y^2 = 1

lambda=(2*x-2*y)/(2*x)
lambda=(-2*x+4*y)/(2*y)
x^2+y^2 = 1

(2*x-2*y)/(2*x) - (-2*x+4*y)/(2*y) = 0
x^2 + y^2 = 1

2 equations, 2 unknowns. algebra.
 
Last edited:
cronxeh said:
Global max is at (-0.525731,0.850651) and (0.525731,-0.850651)
f(x,y)=x^2-2xy+2y^2, subject to x^2+y^2=1Fx = 2*x - 2*y = lambda*2*x
Fy = -2*x + 4*y = lambda*2*y
x^2 + y^2 = 1

lambda=(2*x-2*y)/(2*x)
lambda=(-2*x+4*y)/(2*y)
x^2+y^2 = 1

(2*x-2*y)/(2*x) - (-2*x+4*y)/(2*y) = 0
x^2 + y^2 = 1

2 equations, 2 unknowns. algebra.

Wow, so my algebra is that bad... Is this what you did? - You set the lambadas equal to

each other for both equations and attempt to solve it for x or y? I cannot believe I overlooked that possibility.
 
number0 said:
Wow, so my algebra is that bad... Is this what you did? - You set the lambadas equal to

each other for both equations and attempt to solve it for x or y? I cannot believe I overlooked that possibility.

Its the same lagrange multiplier. Just a variable. You can generalize the whole optimization by looking at the Lagrangian L defined as:

L(x,y,lambda) = f(x,y) + lambda*g(x,y), and solving grad L = 0.

L(x,y,lambda) = x^2-2*x*y+2*y^2 + lambda*(x^2+y^2-1)

In the algebra below you will find 4 points in that plot, you have to plug in your (x,y) point into the f(x,y) and determine which pair gives you the maximum. The global maximum is reached at (-0.525731,0.850651) and (0.525731,-0.850651) and is equal to 2.61803

Oh and to address your question, there is only 1 lagrange multiplier per 1 constraint. If you had multiple constraints like g1(x,y) and g2(x,y) you would have 2 lagrange multipliers lambda1 and lambda2
 
Okay, the silly part that I am struggling with is the algebra. I mean that I do not know how to use the two lambdas equation to find the constraint values. Like, how am I suppose to solve for:

"lambda=(2*x-2*y)/(2*x)
lambda=(-2*x+4*y)/(2*y)
x^2+y^2 = 1

(2*x-2*y)/(2*x) - (-2*x+4*y)/(2*y) = 0
x^2 + y^2 = 1

2 equations, 2 unknowns. algebra."

Any tips?
 
number0 said:
Okay, the silly part that I am struggling with is the algebra. I mean that I do not know how to use the two lambdas equation to find the constraint values. Like, how am I suppose to solve for:

"lambda=(2*x-2*y)/(2*x)
lambda=(-2*x+4*y)/(2*y)
x^2+y^2 = 1

(2*x-2*y)/(2*x) - (-2*x+4*y)/(2*y) = 0
x^2 + y^2 = 1

2 equations, 2 unknowns. algebra."

Any tips?

Your set of equations is

(2*x-2*y)/(2*x) - (-2*x+4*y)/(2*y) = 0
x^2 + y^2 = 1


Expand (2*x-2*y)/(2*x) - (-2*x+4*y)/(2*y).

(2*x-2*y)/(2*x) - (-2*x+4*y)/(2*y) = x/y - y/x - 1

Now your set of equations is:

x/y - y/x = 1 ->> x1=1/2*(y-sqrt(5)*y) and x2=1/2*(1+sqrt(5))*y ; y1=-1/2*(1+sqrt(5)*x and y2=1/2*(sqrt(5)-1)*x ->> plug x into bottom and solve for y, then plug y back in and solve for x.
x^2 + y^2 = 1

Do you need more help?
 
Last edited:
I'm sure you having a difficulty with x/y - y/x = 1 its a tough bear. Multiply it out by xy

xy*(x/y) - xy*(y/x) = xy

x^2 - y^2 = xy
x^2 = xy + y^2
x=sqrt(xy+y^2) this yields 2 roots, x1 and x2..

do same for y.

Now you can see the solution easier

x^2 - y^2 = xy
x^2 + y^2 = 1
 
cronxeh said:
I'm sure you having a difficulty with x/y - y/x = 1 its a tough bear. Multiply it out by xy

xy*(x/y) - xy*(y/x) = xy

x^2 - y^2 = xy
x^2 = xy + y^2
x=sqrt(xy+y^2) this yields 2 roots, x1 and x2..

do same for y.

Now you can see the solution easier

x^2 - y^2 = xy
x^2 + y^2 = 1

Yes! This is exactly what I got and got stuck on. Thanks I am seeing the picture much clearer. However, how did you get:

"x/y - y/x = 1 ->> x1=1/2*(y-sqrt(5)*y) and x2=1/2*(1+sqrt(5))*y ; y1=-1/2*(1+sqrt(5)*x and y2=1/2*(sqrt(5)-1)*x"

Or in other words, how do you find the root for:

"x=sqrt(xy+y^2)"

Sorry if I am asking away cronxeh, but, I am starting to understand much clearer :)
 
Last edited:
number0 said:
Did you use the quadratic formula?

x^2 - y^2 = xy
x^2 + y^2 = 1

x*(x-y^2/x = y)
x*(x+y^2/x = 1/x)

x-y^2/x = y
x+y^2/x = 1/x

Do you see it?
 
  • #10
There's a more straightforward way to get through the algebra. Your three original equations are:

(1): y = x(1-λ)
(2): x = y(2-λ)
(3): x2+y2 = 1

Note that x=0 or y=0 won't yield a solution, so you can assume these variables are not equal to 0. Substitute equation (2) into (1) and divide out y to get

1 = (1-λ)(2-λ)

Use the quadratic equation to solve for λ.

Substitute equation (1) into the constraint equation (3) to get

x2 + (1-λ)2x2 = 1

You can easily solve this for x in terms of λ. Now plug in the values of λ you found before to find x of the extrema, and then use equation (1) to get the corresponding value of y.
 
Last edited:
  • #11
Alright! Thank you guys. I finally understand how to approach this problem!
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K