Bài 2:
Ta có: \(2n^2+n-7⋮n-2\)
\(\Leftrightarrow2n^2-4n+5n-10+3⋮n-2\)
\(\Leftrightarrow2n\left(n-2\right)+5\left(n-2\right)+3⋮n-2\)
\(\Leftrightarrow\left(n-2\right)\left(2n+5\right)+3⋮n-2\)
mà \(\left(n-2\right)\left(2n+5\right)⋮n-2\)
nên \(3⋮n-2\)
\(\Leftrightarrow n-2\inƯ\left(3\right)\)
\(\Leftrightarrow n-2\in\left\{1;-1;3;-3\right\}\)
hay \(n\in\left\{3;1;5;-1\right\}\)
Vậy: Để \(2n^2+n-7⋮n-2\) thì \(n\in\left\{3;1;5;-1\right\}\)