Đặt \(f\left(x\right)=2x^3-3x^2+x+a\)
Ta có: phép chia \(f\left(x\right)\) cho \(x+2\) có dư là \(R=f\left(-2\right)\)
\(\Rightarrow f\left(-2\right)=2.\left(-2\right)^3-3.\left(-2\right)^2+\left(-2\right)+a\)
\(f\left(-2\right)=2.\left(-8\right)-3.4-2+a\)
\(f\left(-2\right)=-16-12-2+a\)
\(f\left(-2\right)=-20+a\)
Để \(f\left(x\right)\) chia hết cho \(x+2\) thì \(R=0\) hay \(f\left(-2\right)=0\)
\(\Rightarrow-20+a=0\Leftrightarrow a=20\)