Để \(f\left(x\right)=x^3+ax^2+bx+c\) chia hết cho \(x+2;x+1;x-1\) đều dư 8 thì
\(\left\{{}\begin{matrix}f\left(-2\right)=\left(-2\right)^3+a\left(-2\right)^2-2b+c=8\\f\left(-1\right)=\left(-1\right)^3+a-b+c=8\\f\left(1\right)=1+a+b+c=8\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}4a-2b+c=8-\left(-8\right)=16\\a-b+c=9\\a+b+c=7\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}a=2\\b=-1\\c=6\end{matrix}\right.\)