Ta có:\(\frac{x+5}{x+2}=\frac{x+2+3}{x+2}=1+\frac{3}{x+2}\)
Để\(\frac{x+5}{x+2}\) là số nguyên thì \(1+\frac{3}{x+2}\) là số nguyên
=> x+2 thuộc Ư(3)={1;-1;3;-3}
=> x thuộc {-1;-3;1;-5}
Đặt A=\(\frac{x+5}{x+2}\)
Ta có A=\(\frac{x+5}{x+2}=\frac{x+2+3}{x+2}=1+\frac{3}{x+2}\)
Để \(A\in Z\Leftrightarrow1+\frac{3}{x+2}\in Z\)
\(\Rightarrow x+2\inƯ\left(3\right)\)
\(\Rightarrow x+2\in\left\{-3;-1;1;3\right\}\)
\(\Rightarrow x+2\in\left\{-5;-3;-1;1\right\}\)
Vậy để \(A\in Z\) thì \(x\in\left\{-5;-3;-1;1\right\}\)
Ta có: \(\frac{x+5}{x+2}=\frac{x+2+3}{x+2}=1+\frac{3}{x+2}\)
\(\Rightarrow\left(x+2\right)\inƯ\left(3\right)=\left\{\pm1;\pm3\right\}\)
Ta có bảng sau
x+2 | 1 | -1 | 3 | -3 |
x | -1 (t/m) | -3 (t/m) | 1 (t/m) | -5 (t/m) |