[Math] Maximize $f(x,y)=xy$ subject to $x^2-yx+y^2 = 1$

lagrange multipliermaxima-minimamultivariable-calculusoptimizationproof-verification

Use Lagrange multipliers method to find the maximum and minimum values of the function
$$f(x,y)=xy$$
on the curve
$$x^2-yx+y^2=1$$

Attempt:

First I set let $g(x,y)=x^2-xy+y^2-1$ and set $$\nabla f=\lambda\nabla g$$
so
$$(y,x)=\lambda(2x-y,2y-x)$$
then
$$\begin{cases}
\lambda=\frac{y}{2x-y} & (1) \\
\lambda=\frac{x}{2y-x} & (2)\\
x^2-yx+y^2=1
\end{cases}
$$
Solving $(1)$ and $(2)$ simultaneously, I get that $$y^2=x^2$$
Substitutiting into $(3)$ and following through with the arithmetic, I get four candidates for max and min, namely $$(1,1),(-1,-1),\big(-\frac{1}{\sqrt{3}},-\frac{1}{\sqrt{3}}\big),\big(\frac{1}{\sqrt{3}},-\frac{1}{\sqrt{3}}\big)$$
Evaluating these points on $f$, I get that the maximum value is $$1 \ \text{at} \ (\pm1,\pm1)$$
and the minimum value is $$-\frac{1}{3} \ \text{at} \ \big(\pm\frac{1}{\sqrt{3}},\mp\frac{1}{\sqrt{3}}\big)$$
Am I correct? I am unsure if there are indeed four critical points.

Best Answer

As a check, not using Lagrange multipliers:

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

1) Minimum.

$(x+y)^2 -3xy =1.$

$3xy= (x+y)^2 -1 ;$

Minimum of $f(x,y) =-(1/3).$

2) Maximum.

$(x-y)^2 +xy =1;$

$xy = 1- (x-y)^2;$

Maximum of $f(x,y) = 1.$

Related Question