Ta có:
\(x^2+xy+x+y\)
\(=x\left(x+y\right)+\left(x+y\right)\)
\(=\left(x+y\right)\left(x+1\right)\)
Nên: \(\left(x+y\right)\left(x+1\right)=1\)
\(\Rightarrow\left(x+y\right);\left(x+1\right)\inƯ\left(1\right)=\left\{1;-1\right\}\)
TH1: \(x+1=1\)
\(\Rightarrow x=0\)
\(x+y=1\)
\(\Rightarrow y=1\)
TH2: \(x+1=-1\)
\(\Rightarrow x=-2\)
\(x+y=-1\)
\(\Rightarrow y=1\)
Vậy: \(\left(x;y\right)=\left\{\left(-2;1\right);\left(0;1\right)\right\}\)