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}).$
 A: 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$.
A: You can use the Cauchy-Schwarz Inequality:
$$(1+1+1)\big(x^2+(1-y)^2+(y-x)^2\big)\geq \big(1\cdot x+1\cdot(1-y)+1\cdot(y-x)\big)^2=1^2=1\,.$$
Thus, 
$$x^2+(1-y)^2+(y-x)^2\geq\frac{1}{3}\,.$$
The inequality becomes an equality if and only if $$\frac{x}{1}=\frac{1-y}{1}=\frac{y-x}{1}\,,$$ or equivalently $$(x,y)=\left(\frac{1}{3},\frac{2}{3}\right)\,.$$
A: $$3x^2+3(y-1)^2+3(x-y)^2-1=(x+y-1)^2+(2x-y)^2+(x-2y+1)^2\geq0.$$
The equality occurs for
$$x+y-1=2x-y=x-2y+1=0,$$ which gives $x=\frac{1}{3}$ and $y=\frac{2}{3}$.
A: 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$$

