If $a,b \in \mathbb R$ satisfy $a^2+2ab+2b^2=7,$ then find the largest possible value of $|a-b|$ I came across the following problem that says:  

If $a,b \in \mathbb R$ satisfy $a^2+2ab+2b^2=7,$ then the largest possible value of $|a-b|$ is which of the following?
  $(1)\sqrt 7$,  $(2)\sqrt{7/2}$ , $(3)\sqrt {35}$  $(4)7$  

My Attempt:  We notice, $(a-b)^2=7-(4ab+b^2)$ and hence $|a-b|=\sqrt {7-(4ab+b^2)}$ and so $|a-b|$ will be maximum whenever $(4ab+b^2)$ will be minimum. But now I am not sure how to progress further hereon.Can someone point me in the right direction? Thanks in advance for your time.
 A: You can solve the given equation as a quadratic to get $a=-b \pm \sqrt {b^2-2b^2+7}=-b \pm \sqrt {7-b^2}$.  To minimize $4ab+b^2$ you want $a$ as negative as possible, so take the minus sign.  Now you have $|a-b|=\sqrt{7-4b(-b-\sqrt{7-b^2})-b^2}=\sqrt{7+3b^2+4b\sqrt{7-b^2}}$.  Now you can take the derivative, set to zero, etc.
Added:  Wolfram Alpha shows the maximum at $b=2\sqrt{\frac 75}, a=-3\sqrt {\frac 75}$ with $|a-b|=\sqrt {35}$
A: The previous solution was wrong, because I used $\frac {da}{db} = -1$ instead. I've added an explanation of why we should have used $\frac {da}{db} = 1$.

The simplest approach I can think of, is to realize that you have a conic section, which is an ellipse.
Because you are interested in extreme values of $a-b = K$, this would be lines of the form $a = b + K$. From calculus, it follows that the extremum occurs at the points of your ellipse where $1 = \frac {da}{db}$. By implicit differentiation, 
$$ 2a \frac {da}{db} + 2a + 2b \frac {da}{db} + 4b = 0,$$ 
hence $a = -\frac {3b}{2}$. Plugging this back into the equation, we obtain $\frac {9b^2}{4} - 3b^2 + 2b^2 = 7$, or that $b = \pm 2 \sqrt{\frac {7}{5}}$. Check the corresponding values of $a$ are given by $ ( a, b) = ( -3 \sqrt{ \frac {7}{5} }, 2 \sqrt{ \frac {7}{5} }), (  3\sqrt{\frac {7}{5}}  , -2 \sqrt{ \frac {7}{5}})$. Hence, the maximum of $|a-b|$ is $\sqrt{ 35}$.
A: Instead of maximizing $|\,\cdot\,|$ you can equivalently maximize $|\,\cdot\,|^2$, which has the advantage of being smooth. Then you can set
\begin{align*}
f(a,b) &= a^2 - 2ab + b^2\\
g(a,b) &= a^2 + 2ab + 2b^2\\
c &= 7
\end{align*}
and solve the corresponding Lagrange problem
\begin{align*}
(d/da):&& a - b + L*(a + b) &= 0\\
(d/db):&& b - a + L*(2b + a) &= 0\\
(d/dL):&& a^2 + 2ab + 2b^2 - c &= 0
\end{align*}
If you add (d/da) and (d/db) and assume $L \ne 0$ (otherwise you obviously get the minimum), then this implies $2a+3b = 0$ and thus $b = -2/3a$. From (d/dL) it now follows that $a^2 = 63/5$ and also $b^2 = 28/5$. With $a=\sqrt{63/5}$ and $b=-\sqrt{28/5}$, we get $|a-b| = \sqrt{35} \approx 5.9$ (you can also change the sign on both $a$ and $b$ as long as you do it at the same time).
A: Here's a trick that doesn't involve calculus:
You have seen that
$$(a - b)^2 + 4ab + b^2 = 7$$
Now, adding this equation to S times the original equation, you get:
$$(a - b)^2 + Sa^2 + (4 + 2S)ab + (1 + 2S)b^2 = 7 + 7S$$
You would like to turn the last three terms into a perfect square, ie:
$$Sa^2  + (4 + 2S)ab + (1 + 2S)b^2 = (\sqrt{S}a + \sqrt{1 + 2S}b)^2$$
So, matching the middle terms, we get:
$$4 + 2S = 2\sqrt{S}\sqrt{1 + 2S}$$
$$(2 + S)^2 = S(1 + 2S)$$
$$4 + 3S- S^2 = 0$$
Now, $S = 4$ and $S = -1$ are solutions, but we want the positive one. Plugging in $S = 4$, we go back to the second line:
$$(a - b)^2 + 4a^2 + 12ab + 9b^2 = 7 + 7 \cdot 4$$
$$(a - b)^2 + (2a + 3b)^2 = 35$$
Since squares are positive, the largest possible value of $(a - b)^2$ is clearly $35$, and it is achieved exactly when $2a + 3b = 0$. 
You might think this is a convoluted and needlessly tricky way of solving this problem. That's probably true, but I think the technique of creating terms which are perfect squares is handy in proving inequalities, because of the fact that perfect squares are nonnegative.
A: As the distance between points is invariant 1,2 under Rotation,
using Rotation of axes by putting $a=x\cos\theta-y\sin\theta$ and $b=x\sin\theta+y\cos\theta$ in $a^2+2ab+2b^2=7$
$(x\cos\theta-y\sin\theta)^2+2(x\cos\theta-y\sin\theta)(x\sin\theta+y\cos\theta)+2(x\sin\theta+y\cos\theta)^2=7$
or, $x^2(\cos^2\theta+2\cos\theta\sin\theta+2\sin^2\theta)$
$+xy(-2\cos\theta\sin\theta+2\cos^2\theta-2\sin^2\theta+4\cos\theta\sin\theta)+y^2(\sin^2\theta-2\cos\theta\sin\theta+2\cos^2\theta)=7$
Applying $\cos2\theta=2\cos^2\theta-1=1-2\sin^2\theta$ and $\sin2\theta=2\cos\theta\sin\theta,$
$x^2(3-\cos2\theta+2\sin2\theta)+2xy(2\cos2\theta+\sin2\theta)+y^2(3+\cos2\theta-2\sin2\theta)=14$
To remove $xy$ term we put $2\cos2\theta+\sin2\theta=0\implies \frac{-\sin2\theta}2=\frac{\cos2\theta}1=\pm\frac1{\sqrt{2^2+1^2}}$
Taking the '$+$' sign and on simplification  we get $\frac{x^2}{\frac{7(3+\sqrt5)}2}+\frac{y^2}{\frac{7(3-\sqrt5)}2}=1$
Comparing with $\frac{x^2}{c^2}+\frac{y^2}{d^2}=1,$
the extreme values of $x$ are $\pm\sqrt{\frac{7(3+\sqrt5)}2}=\pm\frac{\sqrt7}2\sqrt{6+2\sqrt5}=\pm\frac{\sqrt7}2\sqrt{(\sqrt5+1)^2}=\pm\frac{\sqrt{35}+\sqrt7}2$
Similarly, the respective extreme values of $y$ are $\pm\frac{\sqrt{35}-\sqrt7}2$
So, maximum value of $|a-b|=\left|\frac{\sqrt{35}+\sqrt7}2-(\frac{\sqrt7-\sqrt{35}}2)\right|=\sqrt{35}$
