<s>[INST] Maximize $x^2 + y^2$ subject to $x^2 + y^2 = 1 - xy$ The equation $x^2 + y^2 = 1 - xy$ represents an ellipse. I am trying to show that its major axis is along $y=-x$ and find the vertex. To find the vertex I tried to find the vector in the ellipse with the greatest norm, which is equivalent to maximizing $x^2 + y^2$ subject to $x^2 + y^2 = 1 - xy$. How can I approach this?
(The maximum value of the objective function $x^2 + y^2$ seems to be 2. If I start out by assuming this I am able to show that the function cannot exceed this value. But this is kind of doing it in reverse as I start by evaluating the function at $y=-x=1.$ This also doesn't prove that $y=-x$ is the only optimal solution. How would I do it without "guessing" the solution first?)
 [/INST] $\Delta \thinspace \thinspace \rm {method \thinspace\thinspace works\thinspace .}$
You have :
$$
\begin{cases}x^2+y^2=a,\thinspace a\in\mathbb R\\
x^2+y^2+xy=1\end{cases}
$$
This implies that,
$$
\begin{cases}y=\frac {1-a}{x}\\
x^2+\frac{(a-1)^2}{x^2}-a=0\end{cases}
$$
Then, letting $x^2=u$, we have :
$$
\begin{align}&u+\frac {(a-1)^2}{u}-a=0\\
\implies &u^2-ua+(a-1)^2=0\end{align}
$$
This leads to:
$$
\begin{align}&\Delta_u=a^2-4(a-1)^2\geq 0\\
\implies &\frac 23\leq a\leq 2\thinspace .\end{align}
$$
The equality $a=2$ holds, iff when :
$$\begin{align}&u=\frac a2=1\\
\implies &(x,y)=\left(\pm 1,\mp 1\right)\end{align}$$
Thus, we obtain a global maximum :
$$
\begin{align}\max\left\{x^2+y^2\mid x^2+y^2=1-xy\right\}&=2\\
\rm {at} \thinspace\thinspace\thinspace (x,y)=\left(\pm 1\thinspace,\mp 1\right)\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace\thinspace\end{align}
$$
Similarly, since $a\geq \frac 23$, then we obtain a global minimum :
$$
\begin{align}\min\left\{x^2+y^2\mid x^2+y^2=1-xy\right\}&=\frac 23\\
\rm {at} \thinspace\thinspace\thinspace (x,y)=\left(\pm \frac {\sqrt 3}{3},\thinspace \pm \frac {\sqrt 3}{3}\right)\end{align}
$$
This completes the answer .
</s>