Lời giải:
Ta có:
\(x^2+x+1\vdots x+1\)
\(\Leftrightarrow x(x+1)+1\vdots x+1\)
\(\Leftrightarrow 1\vdots x+1\)
Do đó $x+1$ phải là ước của $1$
\(\Rightarrow x+1\in\left\{-1;1\right\}\)
\(\Rightarrow x\in\left\{-2;0\right\}\)
\(x^2+x+10⋮x+1\)
Mà \(x+1⋮x+1\)
\(\Leftrightarrow\left\{{}\begin{matrix}x^2+x+1⋮x+1\\x^2+x⋮x+1\end{matrix}\right.\)
\(\Leftrightarrow1⋮x+1\)
\(\Leftrightarrow x+1\inƯ\left(1\right)\)
\(\Leftrightarrow\left[{}\begin{matrix}x+1=1\\x+1=-1\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}x=0\\x=-2\end{matrix}\right.\)
Vậy ...