\(M=\frac{\left(x^2-1\right)\left(x+1\right)+\left(y^2-1\right)\left(y+1\right)}{\left(x+1\right)\left(y+1\right)}=\frac{x^3+x^2-x-1+y^3+y^2-y-1}{xy+x+y+1}\)
\(=\frac{\left(x^3+y^3\right)+\left(x^2+y^2\right)-\left(x+y\right)-2}{xy+x+y+1}=\frac{\left(x+y\right)\left(x^2-xy+y^2\right)+\left(x+y\right)^2-2xy-\left(x+y\right)-2}{xy+x+y+1}\)
\(=\frac{\left(x+y\right)\left(x+y+xy+1\right)+x^2\left(x+y\right)+y^2\left(x+y\right)-2xy\left(x+y\right)-2\left(x+y\right)-2xy-2}{xy+x+y+1}\)
\(=\frac{\left(x+y\right)\left(x+y+xy+1\right)+\left(x^2+y^2-2xy\right)\left(x+y\right)-2\left(x+y+xy+1\right)}{xy+x+y+1}\)
\(=\frac{\left(x+y-2\right)\left(x+y+xy+1\right)+\left(x-y\right)^2\left(x+y\right)}{xy+x+y+1}=x+y-2+\frac{\left(x-y\right)^2\left(x+y\right)}{xy+x+y+1}\)
x,y nguyên do đó để \(M\)nguyên thì \(\left(x-y\right)^2\left(x+y\right)\)chia hết cho \(xy+x+y+1\)
Dễ thấy \(\left(x-y\right)^2\left(x+y\right)\)không thể phân tích thành nhân tử \(xy+x+y+1\)nữa nên \(\left(x-y\right)^2\left(x+y\right)=0\)
Suy ra:
\(\hept{\begin{cases}x-y=0\\x+y=0\end{cases}}\Rightarrow\hept{\begin{cases}x=y\\x=-y\end{cases}}\)
Vậy:
\(x^2y^2-1=x^2.x^2-1=x^4-1\)
\(\Leftrightarrow\left(x^2-1\right)\left(x^2+1\right)\Leftrightarrow\left(x-1\right)\left(x+1\right)\left(x^2+1\right)\)chia hết cho \(\left(x+1\right)\)
Vậy ta có đpcm