Find the value of $a$ if $x^2+y^2=axy$ has positive integer solution.
My try:
Let g.c.d of $x$ and $y$ is $d$ i.e.$(x,y)=d$ and let $x=dx',y=dy'.$
Then $x'^2+y'^2=ax'y'$
I am stuck here.The answer given is $a=2$.I do not understand how.Please help.
Suppose that $x^2+y^2-axy=0$. Then $x\mid y^2$ and $y\mid x^2$ in positive integers. From this we see that $x$ and $y$ have the same prime divisors, possibly with different multiplicity. But then the equation implies $x=y$, hence $x^2(a-2)=0$. Since $x>0$ we obtain $a=2$.