\(x^2+2x+4⋮x+1\)
\(\Leftrightarrow\left(x^2+x\right)+\left(x+1\right)+3⋮x+1\)
\(\Leftrightarrow x\left(x+1\right)+\left(x+1\right)+3⋮x+1\)
\(\Leftrightarrow3⋮x+1\)
\(\Leftrightarrow x+1\inƯ\left(3\right)=\left\{\pm1;\pm3\right\}\)
\(\Leftrightarrow x\in\left\{0;-2;2;-4\right\}\)
Ta có: \(x^2+2x+4\)
\(=\left(x^2+x\right)+\left(x+1\right)+3\)
\(=x\left(x+1\right)+\left(x+1\right)+3\)
\(=\left(x+1\right)\left(x+1\right)+3\)
Để \(x^2+2x+4\) chia hết cho x + 1 thì 3 phải chia hết cho x + 1
\(\Rightarrow\left(x+1\right)\inƯ\left(3\right)=\left\{\pm1;\pm3\right\}\)
\(\Leftrightarrow x\in\left\{-4;-2;0;2\right\}\)