Very Frustrating (or Easy) Lagrange Multipliers Problem

Click For Summary
SUMMARY

The discussion centers on solving a Lagrange multipliers problem to find the extrema of the function f(x,y) = x² - 2xy + 2y², subject to the constraint x² + y² = 1. Participants shared their approaches, including setting up the Lagrangian L(x,y,λ) = f(x,y) + λg(x,y) and deriving equations for λ. The global maximum was determined to be at the points (-0.525731, 0.850651) and (0.525731, -0.850651), with a maximum value of approximately 2.61803. Key algebraic manipulations and substitutions were discussed to solve for the variables involved.

PREREQUISITES
  • Understanding of Lagrange multipliers
  • Familiarity with algebraic manipulation and solving equations
  • Knowledge of quadratic equations and their solutions
  • Basic calculus concepts, particularly optimization
NEXT STEPS
  • Study the method of Lagrange multipliers in depth
  • Learn how to derive and solve quadratic equations
  • Explore optimization problems with multiple constraints
  • Practice solving similar Lagrange multipliers problems with different functions and constraints
USEFUL FOR

Students and educators in mathematics, particularly those focusing on calculus and optimization techniques, as well as anyone looking to enhance their problem-solving skills in constrained optimization scenarios.

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=\lambdax

-x+2y=\lambday

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-\lambda)

x=y(2-\lambda)

x^2+y^2=1

_________________________________________

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

\lambda(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
2K