\(f\left(x\right)=\left(x-3\right)\left(x^2+2\right)=\left(x-3\right)\left(x^2+2\right)+x+2\)
Để \(f\left(x\right)⋮x^2+2\Leftrightarrow x+2⋮x^2+2\)
Đặt \(\frac{x+2}{x^2+2}=k\in Z\)
\(k+1=\frac{x^2+x+4}{x^2+2}=\frac{\left(x+\frac{1}{2}\right)^2+\frac{7}{2}}{x^2+2}>0\Rightarrow k>-1\)
\(k-1=\frac{-x^2}{x^2+2}\le0\Rightarrow k\le1\)
Mà \(k\in Z\Rightarrow\left[{}\begin{matrix}k=0\\k=1\end{matrix}\right.\)
- Với \(k=0\Rightarrow\frac{x+2}{x^2+2}=0\Rightarrow x=-2\)
- Với \(k=1\Rightarrow\frac{x+2}{x^2+2}=1\Leftrightarrow x^2=x\Rightarrow\left[{}\begin{matrix}x=0\\x=1\end{matrix}\right.\)