<s>[INST] solving system of 2 equations Are there any nice/elegant ways to solve this system of equations? 
$\left\{\begin{matrix} 2x^2+xy+y^2=28 & \\ x^2-xy+2y^2=32 & \end{matrix}\right.$
I can solve it by isolating one of the variables but it's too messy.
Thanks!
 [/INST] There is a general way to solve such homogeneous equations.
First note that $x=0$ doesn't provide a solution. Now choose $m=\dfrac{y}x$, so that $y=mx$. Your two equations then become,
$x^2(2+m+m^2)=28
\\ x^2(1-m+2m^2)=32$
Dividing the two, we obtain:
\begin{align}
&\dfrac{2+m+m^2}{1 -m+2m^2}=\dfrac78\\
&\iff 2m^2-5m-3=0\\
&\iff (2m+1)(m-3)=0.
\end{align}
For $m=-\dfrac12$, $x^2=16$ while for $m=3$, we get $x^2=2$.
Thus, $(x,y) \in\{\,(4,-2),\,(-4,2),\,(\sqrt2,3\sqrt2),\,(-\sqrt2,-3\sqrt2)\,\}$.
</s>