# 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?

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?
You tried to solve for both $x$ in terms of $y$ and $y$ in terms of $x$. Try expressing everything as either a function of $x$ or of $y$.
We'll prove that $|x-y|\leq\sqrt2$. Indeed, we need to prove that $$(x-y)^2\leq2\cdot\frac{5x^2+5y^2-6xy}{8}$$ or $$(x+y)^2\geq0.$$ The equality occurs for $x+y=0$ and $x-y=\sqrt2$ for example.
Id est, the answer is $\sqrt2$.
• Although recent your answers or all answers are guaranteed by exact answer, I think the step of proof must start from $|x-y|\leq k$. It is stupid conclusion that the answer is $\sqrt2$. – Takahiro Waki Feb 8 '17 at 19:08
• @Takahiro Waki I thought that the following step was obvious: If $x=\frac{1}{\sqrt2}$ and $y=-\frac{1}{\sqrt2}$ we have $k\geq\sqrt2$ and the rest you saw. – Michael Rozenberg Feb 8 '17 at 19:12