TITLE: If $x^2+4y^2=4.$ Then find range of $ x^2+y^2-xy$
QUESTION [7 upvotes]: If $x^2+4y^2=4.$ Then find range of $ x^2+y^2-xy$

$\bf{My\; Try::}$ Given $$x^2+4y^2 = 4\Rightarrow \frac{x^2}{4}+\frac{y^2}{1} = 1$$, So parametric Coordinate for Ellipse are
$x = 2\cos \phi$ and $y = \sin \phi$.
Now Let $$f\left(x,y\right) = x^2+y^2-xy = 4-4y^2+y^2-xy = 4-3y^2-xy = 4 - 3\sin^2 \phi - 2\sin \phi \cdot \cos \phi$$
So $$f\left(\phi \right) = 4-\frac{3}{2}\left(1-\cos 2\phi \right) - \sin 2\phi = \frac{5}{2} + \frac{1}{2}\left(3\cos 2 \phi -2 \sin 2\phi \right)$$
Now Range of $$-\sqrt{13}\leq \left(3\cos 2 \phi - 2\sin 2\phi \right)\leq \sqrt{13}$$
So  $$\frac{1}{2}\cdot \left(5-\sqrt{13} \right) \leq f\left(\phi \right)\leq \frac{1}{2}\cdot \left(5+\sqrt{13} \right)$$
My question is can we solve it using Inequality or any other method, If yes Then plz explain here
Thanks

REPLY [2 votes]: Let's solve $\max_{(x,y)}x^2+y^2-xy$ s.t. $x^2+4y^2=4$. 

Let first $x=-\sqrt{4-4y^2}$ to have $$f(y)=-3 y^2+\sqrt{4-4 y^2} y+4$$ here we have $\frac{\sqrt{1-y^2}}{2}f'(y)=-2 y^2-3 \sqrt{1-y^2} y+1$. Solving this equation we get that $y_1=-\sqrt{\frac{1}{2}+\frac{3}{2 \sqrt{13}}}$ and $y_2=\sqrt{\frac12-\frac{3}{2 \sqrt{13}}}$. Now note that $$f''(y)=\frac{4 y^3+6 \sqrt{1-y^2} y^2-6 \sqrt{1-y^2}-6 y}{\left(1-y^2\right)^{3/2}}$$ With some "fun" we get $$f''(y_1)=\sqrt{26-6 \sqrt{13}}$$ $$f''(y_2)=-\sqrt{26+6 \sqrt{13}}$$
with some more fun we obtain $f(y_1)=\frac{1}{2} \left(5-\sqrt{13}\right)$ and $f(y_2)=\frac{1}{2} \left(5+\sqrt{13}\right)$. 
Letting $x=\sqrt{4-4y^2}$ we obtain the same max and min.