a) Đặt \(A=\frac{x}{x+3}=\frac{x+3-3}{x+3}=\frac{x+3}{x+3}-\frac{3}{x+3}=1-\frac{3}{x+3}\)
Để A nguyên thì \(\frac{3}{x+3}\) nguyên => \(3⋮x+3\)
=> \(x+3\in\left\{1;-1;3;-3\right\}\)
=> \(x\in\left\{-2;-4;0;-6\right\}\)
Vậy \(x\in\left\{-2;-4;0;-6\right\}\)
b) Đặt \(B=\frac{x-1}{2x+1}\)
Để B nguyên thì 2B nguyên
Ta có:
\(2B=\frac{2.\left(x-1\right)}{2x+1}=\frac{2x-2}{2x+1}=\frac{2x+1-3}{2x+1}=\frac{2x+1}{2x+1}-\frac{3}{2x+1}=1-\frac{3}{2x+1}\)
Để 2B nguyên thì \(\frac{3}{2x+1}\) nguyên => \(3⋮2x+1\)
=> \(2x+1\in\left\{1;-1;3;-3\right\}\)
=> \(2x\in\left\{0;-2;2;-4\right\}\)
=> \(x\in\left\{0;-1;1;-2\right\}\)
Vậy \(x\in\left\{0;-1;1;-2\right\}\)