Ta có: f(-1)=5
f(2)=-2
Do đó: \(\left\{{}\begin{matrix}-a+b=5\\2a+b=-2\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}-3a=7\\-a+b=5\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}a=\dfrac{-7}{3}\\b=5+\dfrac{-7}{3}=\dfrac{15}{3}-\dfrac{7}{3}=\dfrac{8}{3}\end{matrix}\right.\)
Vậy: \(a=-\dfrac{7}{3};b=\dfrac{8}{3}\)