I am looking to factor a diophantine equation. However, I am unable to figure out the steps in order to reach the simplification:
Find all integral solutions to the equation:
$(x^2 + 1)(y^2 + 1) + 2(x − y)(1 − xy) = 4(1 + xy)$
However, I am unsure as to how this is equivalent to:
$x^2y^2 − 2xy +1+ x^2 + y^2 − 2xy + 2(x − y)(1 − xy) = 4$.
Please let me know the exact steps to achieve that answer.
$$\color{blue}{(x^2 + 1)(y^2 + 1) + 2(x − y)(1 − xy) = 4(1 + xy)}\\ {\Rightarrow x^2y^2+x^2+y^2+1\color{blue}{+2(x − y)(1 − xy)}=4+\color{red}{4xy}\\ \Rightarrow \underline{(x^2y^2 − \color{red}{2xy} +1)}+ \underline{(x^2 + y^2 − \color{red}{2xy})} + 2(x − y)(1 − xy) = 4\\ \Rightarrow \underline{(1-xy)^2+(x-y)^2+2(1-xy)(x-y)}=4\\ \Rightarrow (1-xy+x-y)^2=4\\ \Rightarrow (1+x)^2(1-y)^2=4}$$
For, $x,y \in \mathbb{Z}$,
$(1+x)=\pm2\Rightarrow x=1,-3$ & $(1-y)=\pm1\Rightarrow y=0,2$
Or,
$(1+x)=\pm1\Rightarrow x=0,-2$ & $(1-y)=\pm2\Rightarrow y=-1,3$