a) Ta có: \(x^2+3⋮x+1\)
\(\Rightarrow x.\left(x+3\right)⋮x+1\)
\(\Rightarrow\left[x.\left(x+1\right)+2\right]⋮x+1\)
\(\Rightarrow2⋮x+1\Rightarrow x+1\inƯ\left(2\right)=\left\{\pm1;\pm2\right\}\)
+) \(x+1=-1\Rightarrow x=-2.\)
+) \(x+1=1\Rightarrow x=0.\)
+) \(x+1=-2\Rightarrow x=-3.\)
+) \(x+1=2\Rightarrow x=1.\)
Vậy \(x\in\left\{-3;-2;0;1\right\}\).