Find all ordered pairs of integers$(x,y)$ which satisfy the equation $2(x^2+y^2)+x+y=5xy$ 
Find all ordered pairs of integers$(x,y)$ which satisfy the equation $2(x^2+y^2)+x+y=5xy$

We can transform this equation as
$$\begin{equation}
2(x^2+y^2-2xy)+x+y-xy=0\\
\implies2(x-y)^2+x+y-xy=0\\
\implies(xy-x-y)\ge0\end{equation}$$
How to proceed now?

First, let's expand $$2(x^2+y^2)+x+y=5xy$$ We get : $$2x^2+2y^2+x+y=5xy$$ Then, subtract $5xy$ from both sides and we get $$2x^2+2y^2+x+y-5xy=0$$ On factoring it we get : $$2x^2+(1-5y)x+2y^2+y=0$$ Now this is a quadratic equation with $a=2, b=1-5y, c=2y^2+y$ So we get :$$x=\frac{-(1-5y)\pm \sqrt{(1-5y)^2-4 \times 2(2y^2+y)}}{2 \times 2}$$ On simplifying "the inside of the radical" we get :
$$\sqrt{9y^2-18y+1}$$ Replacing it we get : $$x=\frac{-(1-5y)\pm \sqrt{9y^2-18y+1}}{4}$$Now just separate the solutions that is separate the positive and the negative solutions :
$$x=\frac{-(1-5y)+ \sqrt{9y^2-18y+1}}{4}$$ and $$x=\frac{-(1-5y)- \sqrt{9y^2-18y+1}}{4}$$ With all this we get our solutions. Hope it helps
