<s>[INST] Finding the minimum of a function of two variables 
Find the smallest value of $\displaystyle \sqrt{49+a^2-7{\sqrt{2}}\ a}+\sqrt{a^2+b^2-{\sqrt{2}}\ ab}+\sqrt{50+b^2-10b}\quad \quad$ for $a,b$ real and positive.


What I've done so far:
Let $F(a,b)=\displaystyle \sqrt{49+a^2-7{\sqrt{2}}\ a}+\sqrt{a^2+b^2-{\sqrt{2}}\ ab}+\sqrt{50+b^2-10b}$
Then
$$\begin{align}
\displaystyle F_a=\frac{2a-7{\sqrt{2}}\ a}{2\sqrt{49+a^2-7{\sqrt{2}}\ a}}+\frac{2a-\sqrt{2}\ b}{2\sqrt{a^2+b^2-{\sqrt{2}}\ ab}}=0\\
\displaystyle F_b=\frac{2b-{\sqrt{2}}\ a}{2\sqrt{a^2+b^2-{\sqrt{2}}\ ab}}+\frac{2b-10}{2\sqrt{50+b^2-10b}}=0
\end{align}$$ 
I then tried to simplify the two equations as follows:
$$\begin{align}
\left({2a-7{\sqrt{2}}\ a}\right)\left(\sqrt{a^2+b^2-{\sqrt{2}}\ ab}\right)+\left({2a-\sqrt{2}\ b}\right)\left(\sqrt{49+a^2-7{\sqrt{2}}\ a}\right)=0\\
\left({2b-{\sqrt{2}}\ a}\right)\left(\sqrt{50+b^2-10b}\right)+\left(2b-10\right)\left(\sqrt{a^2+b^2-{\sqrt{2}}\ ab}\right)=0\\
\end{align}$$
But then I'm stuck.
Do I need to include a constraint?(i.e $a$ and $b$ are positive and real); if so what will the constraint equation be?
Is there an altogether different way to do this other than using Lagrange??
 [/INST] Hint: Consider vectors $X, A, B, Y$ where $|X| = 7$, $|A| = a$, $|B| = b$, $|Y| = \sqrt{50}$ and $\angle XOA = 45^\circ$, $\angle AOB = 45^\circ$, $\angle BOY = 45^\circ $.
How does your expression relate to these vectors? Think of distances. Apply Cosine rule.
Hence, the minimum is $ \sqrt{7^2 + (\sqrt{50})^2 - 2 \times 7 \times \sqrt{50} \times \cos 135^\circ} = \sqrt{49 + 50 + 70} = 13 $.
</s>