Very Frustrating (or Easy) Lagrange Multipliers Problem

Sorry, I made a mistake. It should bex2 + (1-λ)2x2 = 1and you can solve this for x in terms of λ using the quadratic equation.
  • #1
number0
104
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
  • #2
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:
  • #3
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.
 
  • #4
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
 
  • #5
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?
 
  • #6
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:
  • #7
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
 
  • #8
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:
  • #9
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!
 

Related to Very Frustrating (or Easy) Lagrange Multipliers Problem

What is a Lagrange Multipliers problem?

A Lagrange Multipliers problem is a type of optimization problem in which the objective function and constraints are expressed in terms of multiple variables. The goal is to find the maximum or minimum value of the objective function while satisfying all of the constraints.

Why are Lagrange Multipliers problems considered frustrating?

Lagrange Multipliers problems can be frustrating because they involve complex mathematical calculations and can be difficult to solve analytically. Additionally, the solution may not always be obvious and may require multiple iterations to find the optimal solution.

What is the purpose of using Lagrange Multipliers?

The purpose of using Lagrange Multipliers is to find the optimal solution for an optimization problem with multiple constraints. It allows for the incorporation of all constraints into the objective function, making it possible to find a solution that satisfies all constraints simultaneously.

Are there any tips for solving Lagrange Multipliers problems more easily?

One helpful tip for solving Lagrange Multipliers problems is to carefully choose the Lagrange Multiplier value. In some cases, choosing the correct value can simplify the calculations and make the problem easier to solve. Additionally, breaking the problem into smaller parts and solving them separately can also make the process easier.

What are some real-world applications of Lagrange Multipliers?

Lagrange Multipliers have many real-world applications, including economics, engineering, physics, and statistics. They are often used to optimize production processes, maximize profits, or minimize costs while considering various constraints such as resource availability or budget limitations.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
725
  • Calculus and Beyond Homework Help
Replies
16
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
956
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
Replies
1
Views
911
  • Calculus and Beyond Homework Help
Replies
2
Views
732
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
18
Views
2K
Back
Top