Đặt \(A=\frac{x+2}{x^2+2x+2}\)
\(A+1=\frac{x+2}{x^2+2x+2}=\frac{x^2+3x+4}{x^2+2x+2}=\frac{\left(x+\frac{3}{2}\right)^2+\frac{7}{4}}{\left(x+1\right)^2+1}>0\)
\(\Rightarrow A>-1\)
\(A-2=\frac{x+2}{x^2+2x+2}-2=\frac{-2x^2-3x-2}{x^2+2x+2}=\frac{-2\left(x+\frac{3}{4}\right)^2-\frac{7}{8}}{\left(x+1\right)^2+1}< 0\)
\(\Rightarrow A< 2\)
\(\Rightarrow-1< A< 2\)
Mà A nguyên \(\Rightarrow\left[{}\begin{matrix}A=0\\A=1\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}\frac{x+2}{x^2+2x+2}=0\\\frac{x+2}{x^2+2x+2}=1\end{matrix}\right.\) \(\Leftrightarrow x=\left\{-2;-1;0\right\}\)
Vậy \(x=\left\{-2;-1;0\right\}\) thì A nguyên \(=\left\{0;1\right\}\)