a) Đặt \(f\left(x\right)=x^3+ax+b\)
Vì \(f\left(x\right)⋮x^2+x-2\)
\(\Rightarrow f\left(x\right)=\left(x^2+x-2\right)q\left(x\right)\)
\(=\left(x^2-x+2x-2\right)q\left(x\right)\)
\(=\left[x\left(x-1\right)+2\left(x-1\right)\right]q\left(x\right)\)
\(=\left(x-1\right)\left(x+2\right)q\left(x\right)\)
\(\Rightarrow f\left(1\right)=\left(1-1\right)\left(1+2\right)q\left(1\right)\)
\(\Rightarrow f\left(1\right)=0\left(1\right)\)
\(f\left(-2\right)=\left(-2-1\right)\left(-2+2\right)q\left(-2\right)\)
\(\Rightarrow f\left(-2\right)=0\left(2\right)\)
Từ (1) và (2) \(\Rightarrow\left\{{}\begin{matrix}f\left(1\right)=0\\f\left(-2\right)=0\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}1+a+b=0\\-8-2a+b=0\end{matrix}\right.\)\(\Leftrightarrow\left\{{}\begin{matrix}a+b=-1\\-2a+b=8\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}a=-3\\b=2\end{matrix}\right.\)
Vậy a=-3 và b=2 thì \(\left(x^3+ax+b\right)⋮\left(x^2+x-2\right)\)