Lời giải:
Vì $g(x)=x^2-1=(x-1)(x+1)$ nên để $f(x)\vdots g(x)$ thì $f(x)\vdots x-1$ và $f(x)\vdots x+1$
Điều này xảy ra khi mà $f(1)=f(-1)=0$ (theo định lý Bê-du về phép chia đa thức)
$\Leftrightarrow 2.1^3-1^2+a+b=2(-1)^3-(-1)^2+a(-1)+b=0$
$\Leftrightarrow 1+a+b=-3-a+b=0$
$\Leftrightarrow a=-2; b=1$


