Giải:
Ta có: \(2x+7⋮x+1\)
\(\Rightarrow\left(2x+2\right)+5⋮x+1\)
\(\Rightarrow2\left(x+1\right)+5⋮x+1\)
\(\Rightarrow5⋮x+1\)
\(\Rightarrow x+1\in\left\{1;-1;5;-5\right\}\)
+) \(x+1=1\Rightarrow x=0\)
+) \(x+1=-1\Rightarrow x=-2\)
+) \(x+1=5\Rightarrow x=4\)
+) \(x+1=-5\Rightarrow x=-6\)
Vậy \(x\in\left\{0;-2;4;-6\right\}\)
Ta có : \(2x+7⋮x+1\)
Mà : \(x+1⋮x+1\Rightarrow2\left(x+1\right)⋮x+1\Rightarrow2x+2⋮x+1\)
\(\Rightarrow\left(2x+7\right)-\left(2x+2\right)⋮x+1\Rightarrow2x+7-2x-2⋮x+1\)
\(\Rightarrow5⋮x+1\Rightarrow x+1\inƯ\left(5\right)\)
Mà : \(Ư\left(5\right)=\left\{1;5\right\};x+1\ge1\Rightarrow x+1=5\)
\(\Rightarrow x=5-1=4\)
Vậy x = 4