Unsolvable max/min of surface with constraint

Addez123
Messages
199
Reaction score
21
Homework Statement
##f(x,y) = x^2 + xy + y^2##
where ##x^4 + y^4 \le 8## and ##y \geq 0##
Relevant Equations
Lagrange but I think they want us to use
det(d(f,g)/d(x,y)) = 0
Trying first with lagrange multiplier
##grad(f) = (2x + y, 2y + x)##
##g = x^4 + y^4 -8 = 0##
##grad(g) = (4x^3, 4y^3)##
$$grad(f) = \lambda grad(g)$$
gives us 2 equations
(1) ##2x + y = \lambda4x^3##
(2) ##2y + x = \lambda4y^3##

From (1) we get
##y = \lambda4x^3 - 2x##
insert that into (2) and you get
##2(\lambda4x^3 - 2x) + x +\lambda4(\lambda4x^3 - 2x)^3 = 0##

Which in expanded form gives:
$$-3 x - 24 \lambda x^3 + 192 \lambda^2 x^5 - 384 \lambda^3 x^7 + 256 \lambda^4 x^9 = 0$$

But good luck figuring that out. Better yet solving it.

Instead I try the determinant version:
$$\frac {d(f,g)}{d(x,y)} = 0$$
$$\begin{vmatrix}
2x +y & 2y + x \\
4x^3 & 4y^3
\end{vmatrix} = 0$$
$$(2x +y)4y^3 - (2y + x)4x^3 = 0$$
$$8xy^3 + 4y^4 - 8x^3y -4x^4 = 0$$

You could try get ##y^4 = 8 - x^4## from g but you'd end up with 3rd root of it in other places.
Maybe get y from grad(f) equation, but each cordinate give different values. For example you have
##2x + y = 0## and ##2y + x = 0## which gives ##y = -2x## and ##y = x/2##. So which one should I use? Shouldn't they give same results?

There's no way of doing this that doesn't end up in a mess.
 
Last edited:
  • Like
Likes benorin
Physics news on Phys.org
Addez123 said:
Homework Statement:: ##f(x,y) = x^2 + xy + y^3##
where ##x^4 + y^4 \le 8## and ##y \geq 0##
Relevant Equations:: Lagrange but I think they want us to use
det(d(f,g)/d(x,y)) = 0
Addez123 said:
Trying first with lagrange multiplier
##grad(f) = (2x + y, 2y + x)##
No, you have a mistake in the 2nd coordinate.
##f_y = x + 3y^2##, so ##\nabla f = <2x + y, x + 3y^2>##

BTW, I noticed a mistake you made in your other thread. You solved for y in the equation ##x^4 + y^4 = 8## and had ##y = \sqrt{8 - x^4}##. That should have been ##y = \sqrt[4]{8 - x^4}## or ##y = (8 - x^4)^{1/4}##.
Addez123 said:
##g = x^4 + y^4 -8 = 0##
##grad(g) = (4x^3, 4y^3)##
$$grad(f) = \lambda grad(g)$$
gives us 2 equations
(1) ##2x + y = \lambda4x^3##
(2) ##2y + x = \lambda4y^3##

From (1) we get
##y = \lambda4x^3 - 2x##
insert that into (2) and you get
##2(\lambda4x^3 - 2x) + x +\lambda4(\lambda4x^3 - 2x)^3 = 0##

Which in expanded form gives:
$$-3 x - 24 \lambda x^3 + 192 \lambda^2 x^5 - 384 \lambda^3 x^7 + 256 \lambda^4 x^9 = 0$$

But good luck figuring that out. Better yet solving it.

Instead I try the determinant version:
$$\frac {d(f,g)}{d(x,y)} = 0$$
$$\begin{vmatrix}
2x +y & 2y + x \\
4x^3 & 4y^3
\end{vmatrix} = 0$$
$$(2x +y)4y^3 - (2y + x)4x^3 = 0$$
$$8xy^3 + 4y^4 - 8x^3y -4x^4 = 0$$

You could try get ##y^4 = 8 - x^4## from g but you'd end up with 3rd root of it in other places.
There's no way of doing this that doesn't end up in a mess.
 
Sorry that was a typo. The real equation is ##x^2 + xy + y^2##
Oh and thanks, but it doesn't make it any more solveable thought :/
 
This is the same problem as in your other thread. What I was asking for was a different problem that we might try to tackle.
 
Been here, done this ! Aint not going to retype for sure ?:)
 
Mark44 said:
This is the same problem as in your other thread. What I was asking for was a different problem that we might try to tackle.
They are all like this :(

The 3rd exercise is find the closest point on the curve ##x^2 + 4xy+y^2 = 4## to (0,0).
It could probably be solved by simply minimizing the distance function ##d = \sqrt{x^2+y^2}## as a single variable function, but obviously I am suppose to solve it using lagrange multiplier or that determinant version.

I looked it up on youtube where he solves exactly that issue using lagrange, he also ends up with an unsolveable mess and recommends you plug the numbers into a computer to get your results.

Starting to wonder what kind of hidden witchcraft this book is trying to teach me lol
 
Addez123 said:
They are all like this :(
Great !

The 3rd exercise is find the closest point on the curve ##x^2 + 4xy+y^2 = 4## to (0,0).

That's a piece of cake now ! Rotate 45 degrees :oldlaugh: and see a hyperbola equation. Therefore
1640171880553.png
It could probably be solved by simply minimizing the distance function ##d = \sqrt{x^2+y^2}## as a single variable function, but obviously I am suppose to solve it using lagrange multiplier or that determinant version.
Almost absolutely right ! ##d = \sqrt{x^2+y^2}## is a two variable function to be minimized under the constraint ##x^2 + 4xy+y^2 = 4##. But why make things difficult if you can also minimize ##f = {x^2+y^2}## ? In which case the unsolveable mess isn't all that messy. You want to give it a try, now that you know the answer ?

I looked it up on youtube where he solves exactly that issue using lagrange, he also ends up with an unsolveable mess and recommends you plug the numbers into a computer to get your results.
goes to show you can't trust the internet

Starting to wonder what kind of hidden witchcraft this book is trying to teach me lol
My two cents: good use of a proper set of brain cells. Not magic, no witchcraft, but definitely something beyond reach for a tremendous amount of folks :smile:

##\ ##
 
I suggest you make the substitutions,
$$
v=x+y
$$
$$
w=x-y
$$
thus
$$
x=\frac{v+w}{2}
$$
$$
y=\frac{v-w}{2}
$$
Solve the ##{v,w}## system using Lagrange multipliers then convert back to the ##{x,y}## coordinates. You will be delighted how easy the solution becomes.
 
Addez123 said:
Homework Statement:: ##f(x,y) = x^2 + xy + y^2##
where ##x^4 + y^4 \le 8## and ##y \geq 0##
Relevant Equations:: Lagrange but I think they want us to use
det(d(f,g)/d(x,y)) = 0

gives us 2 equations
(1) 2x+y=λ4x3
(2) 2y+x=λ4y3
Stop right there, there's a trick that works quite a lot of student problems for the Lagrange Multipliers method: the right hand side of both those equations is very similar, so multiply the first equation by ##y^3## and multiply the second equation by ##x^3## and then the right hand sides of both resulting equations are ##\lambda 4 x^4 y^3## hence the left hand sides are equal eliminating the parameter ##\lambda## leaving

##(2y+x)x^3=(2x+y)y^3##
##\Rightarrow x^4 +2x^3y-2xy^3-y^4=0##
##\Rightarrow (x-y)(x+y)^3=0##
##\Rightarrow x=y \text{ or } x=-y##
think you can solve it from there?
 
  • #10
Damn was hoping someone would tell me if my clever trick indeed produced the solution. Indeed I was late to the party… oh, well.
 
Back
Top