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}).$

Solving the quadratic equation $x^2+(y-1)^2+(x-y)^2=\frac13$ (where the unknown is $x$) gives you$$x=\frac{\left(3 y-\sqrt{3} \sqrt{-9 y^2+12y-4}\right)}6.$$But $-9y^2+12y-4=-(3y-2)^2$. Therefore it is a real number greater than or equal to $0$ if and only if $y=\frac23$ and, when that happens, $x=\frac13$.
