Ta có: \(x^2+x=x^2y-xy+y\)
\(\Leftrightarrow x^2+x-x^2y+xy-y=0\)
\(\Leftrightarrow x^2\left(1-y\right)+x\left(1+y\right)-y=0\)
\(\Delta=\left(1+y\right)^2+4y\left(1-y\right)\)
\(=y^2+2y+1+4y-4y^2=-3y^2+6y+1\)
Để PT có nghiệm thì \(\Delta\ge0\Leftrightarrow-3y^2+6y+1\ge0\)
\(\Rightarrow\frac{3+2\sqrt{3}}{3}\ge y\ge\frac{3-2\sqrt{3}}{3}\Leftrightarrow2\ge x\ge0\)
Vì y nguyên nên ta xét các TH sau:
TH1: \(y=0\Rightarrow x^2+x=0\Leftrightarrow x\left(x+1\right)=0\Leftrightarrow\orbr{\begin{cases}x=0\\x=-1\end{cases}\left(tm\right)}\)
TH2: \(y=1\Rightarrow x^2+x=x^2-x+1\Leftrightarrow2x=1\Rightarrow x=\frac{1}{2}\left(ktm\right)\)
TH3: \(y=2\Rightarrow x^2+x=2x^2-2x+2\Leftrightarrow x^2-3x+2=0\)
\(\Leftrightarrow\left(x-1\right)\left(x-2\right)=0\Leftrightarrow\orbr{\begin{cases}x=1\\x=2\end{cases}}\)
Vậy ta có 4 cặp số (x;y) thỏa mãn ...