Bài 1:
Ta có: \(x^2+3x+9⋮x+3\)
\(\Rightarrow x\left(x+3\right)+9⋮x+3\)
Vì \(x\left(x+3\right)⋮x+3\)
nên \(9⋮x+3\)
\(\Rightarrow x+3\inƯ\left(9\right)\)
\(\Rightarrow x+3\in\left\{\pm1;\pm3;\pm9\right\}\)
\(\Rightarrow x\in\left\{-2;-4;0;-6;6;-12\right\}\)
Vậy \(x\in\left\{-2;-4;0;\pm6;-12\right\}\).
Bài 2:
a) Để \(\dfrac{n+5}{n-2}\in Z\)
thì \(n+5⋮n-2\)
\(\Rightarrow\left(n-2\right)+7⋮n-2\)
mà \(n-2⋮n-2\Rightarrow7⋮n-2\)
\(\Rightarrow n-2\inƯ\left(7\right)\)
\(\Rightarrow n-2\in\left\{\pm1;\pm7\right\}\)
...
b) Tương tự bài a.