\(xy+x-y=4\\ \Rightarrow xy+x-y-1+1=4\\ \Rightarrow\left(xy+x\right)-\left(y+1\right)=4-1\\ \Rightarrow x\left(y+1\right)-\left(y+1\right)=3\\ \Rightarrow\left(x-1\right)\left(y+1\right)=3\\ \Rightarrow\left(x-1\right);\left(y+1\right)\inƯ\left(3\right)\\ \Rightarrow\left(x-1\right);\left(y+1\right)\in\left\{-3;-1;1;3\right\}\)
\(x-1\) | \(-3\) | \(-1\) | \(1\) | \(3\) |
\(y+1\) | \(-1\) | \(-3\) | \(3\) | \(1\) |
\(x\) | \(-2\) | \(0\) | \(2\) | \(4\) |
\(y\) | \(-2\) | \(-4\) | \(2\) | \(0\) |
Vậy \(\left(x;y\right)=\left(-2;-2\right),\left(0;-4\right),\left(2;2\right),\left(4,0\right)\)