<s>[INST] Maximum value of $|x-y|$ Given $x,y\in\mathbb R$ such that
$$5x^2+5y^2-6xy\ =\ 8$$
find the maximum value of $|x-y|$.
My attempt
$5x^2 - 6yx + (5y^2-8)\ =\ 0$
$x\ =\ \dfrac{6y\pm\sqrt{(6y)^2-4(5)(5y^2-8)}}{10} = \dfrac{6y\pm\sqrt{160-64y^2}}{10} = \dfrac{3y\pm2\sqrt{10-4y^2}}{10}$
$5y^2 - 6xy + (5x^2-8)\ =\ 0$
$y\ =\ \dfrac{3x\pm2\sqrt{10-4x^2}}{10}$
$|x-y|\ =\ \dfrac{\left|3(y-x)\pm2\sqrt{10-4y^2}\mp2\sqrt{10-4x^2}\right|}{10}$
What do I do from here?
 [/INST] Hint: We can write $$P= 5x^2 +5y^2-6xy-8 =5 (x-y)^2+4xy-8 =5 (x-y)^2 +(x+y)^2-(x-y)^2-8=4 (x-y)^2 +(x+y)^2-8$$ Can you take it from here?
</s>