<s>[INST] Solve $x^2 + (y-1)^2 + (x-y)^2 - \frac{1}{3} = 0.$ I came across an interesting equation with two variables $x,y\in\mathbb{R}$, $x^2 + (y-1)^2 + (x-y)^2 - \frac{1}{3} = 0.$
This, once expanded, can be simplified to $3x^2 - 3xy + 3y^2 - 3y + 1=0.$
How can one proceed to solve it algebraically? The solution according to Wolfram is $(x,y)=(\frac{1}{3},\frac{2}{3}).$
 [/INST] Consider the curve
$3x^2-3xy+3y^2-3y+k=0$, which can be written as 
$$x^2-xy+y^2-y+\frac k3=0\tag{1}$$
which is an ellipse according to the discriminant criterion.  
As the coefficients of $x^2, y^2$ are equal, this implies a rotation of $\frac \pi 4$. 
After some manipulation we find that equation $(1)$ can be written as 
$$\frac{ \left( \frac {x+y}{\sqrt2}-\frac 1{\sqrt2} \right) ^2 }{\frac 23(1-k)}
+\frac{ \left( \frac {x-y}{\sqrt2}+\frac 1{3\sqrt2} \right) ^2 }{\frac 29(1-k)}=1$$
or, putting $u,v=\frac {x\pm y}{\sqrt2}$,
$$\frac{ \left( u-\frac 1{\sqrt2} \right) ^2 }{\frac 23(1-k)}
+\frac{ \left( v+\frac 1{3\sqrt2} \right) ^2 }{\frac 29(1-k)}=1$$
which is an ellipse rotated by $\frac{\pi}4$ with centre offset $\big(\frac 1{\sqrt2}, \frac 1{3\sqrt2}\big)$ in the $u,v$ directions respectively (which is equivalent to $\big(\frac 13, \frac 23\big)$ in the $(x,y)$ directions respectively - see workings below), and semi-major and semi-minor axis of $\frac 1{\sqrt3}\sqrt{2(1-k)}$ and $\frac 13\sqrt{2(1-k)}$ respectively, where $k<1$. 
As $k$ approaches $1$, the ellipse shrinks to a dot at $\left(
\frac 13, \frac 23\right)$, which is the solution for equation $(1)$ with $k=1$. 
See desmos implementation here.
$\hspace{3cm}$


From analysis above, $\tan\alpha=1$.
From diagram below, $\tan\beta=\frac 13$. 
Hence $\tan(\alpha+\beta)=2$.
This gives 
$$\small h=\frac{\sqrt5}3\cos(\alpha+\beta)=\frac {\sqrt5}3\cdot \frac 1{\sqrt5}=\frac 13\\
\small k=\frac{\sqrt5}3\sin(\alpha+\beta)=\frac {\sqrt5}3\cdot \frac 2{\sqrt5}=\frac 23$$

</s>