Ta có: để phép chia x2+16 cho x+3 đạt giá trị nguyên thì:
\(x^2+16⋮\left(x+3\right)\)
Ta có: \(x^2+16⋮\left(x+3\right)\)
\(\Leftrightarrow x^2-9+25⋮\left(x+3\right)\)
\(\Leftrightarrow\left(x-3\right)\left(x+3\right)+25⋮\left(x+3\right)\)
Mà vì \(\left(x+3\right)⋮\left(x+3\right)\) nên\(\left(x-3\right)\left(x+3\right)⋮\left(x+3\right)\)
Suy ra \(25⋮\left(x+3\right)\)
\(\Rightarrow x+3\inƯ\left(25\right)=\left\{\pm1;\pm5;\pm25\right\}\)
TH1: \(x+3=\pm1\Leftrightarrow\left[{}\begin{matrix}x+3=1\\x+3=-1\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=-2\\x=-4\end{matrix}\right.\)
TH2:\(x+3=\pm5\Leftrightarrow\left[{}\begin{matrix}x+3=5\\x+3=-5\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=2\\x=-8\end{matrix}\right.\)
TH3:\(x+3=\pm25\Leftrightarrow\left[{}\begin{matrix}x+3=25\\x+3=-25\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=22\\x=-28\end{matrix}\right.\)
Vậy \(x\in\left\{-2;-4;2;-8;22;-28\right\}\)