Để A nguyên thì \(2x-1⋮x+2\)
=>\(2x+4-5⋮x+2\)
=>\(-5⋮x+2\)
=>\(x+2\in\left\{1;-1;5;-5\right\}\)
=>\(x\in\left\{-1;-3;3;-7\right\}\)
Để B là số nguyên thì \(x^2-2x+1⋮x+1\)
=>\(x^2+x-3x-3+4⋮x+1\)
=>\(4⋮x+1\)
=>\(x+1\in\left\{1;-1;2;-2;4;-4\right\}\)
=>\(x\in\left\{0;-2;1;-3;3;-5\right\}\)
\(A=\dfrac{2x-1}{x+2}=\dfrac{2\left(x+2\right)-5}{x+2}=2-\dfrac{5}{x+2}\)
Để `A` nguyên \(\Leftrightarrow2-\dfrac{5}{x+2}\in Z\)
Vì `2∈Z`
`=>`\(\dfrac{5}{x+2}\in Z\)
`=> 5`\(⋮x+2\)
\(=>x+2\inƯ\left(5\right)\)
\(=>x+2\in\left\{-1;-5;1;5\right\}\)
\(=>x\in\left\{1;-3;3;7\right\}\)