\(x^2+y^2=xy\)
\(\Leftrightarrow x^2-xy+y^2=0\)
\(\Leftrightarrow x^2-xy+\frac{y^2}{4}+\frac{3}{4}y^2=0\)
\(\Leftrightarrow\left(x-\frac{y}{2}\right)^2+\frac{3}{4}y^2=0\)
\(\Leftrightarrow\hept{\begin{cases}x-\frac{y}{2}=0\\\frac{3}{4}y^2=0\end{cases}}\Leftrightarrow x=y=0\)
\(x^2+y^2=xy\Leftrightarrow2x^2+2y^2=2xy\Leftrightarrow2x^2-2xy+2y^2=0\)
\(\Leftrightarrow x^2+\left(x-y\right)^2+y^2=0\Leftrightarrow\hept{\begin{cases}x=0\\y=0\end{cases}}\)