x3-4x2+x+6=0
⇔x3+x2-5x2-5x+6x+6=0
⇔(x3+x2)-(5x2-5x)+(6x+6)=0
⇔x2(x+1)-5x(x+1)+6(x+1)=0
⇔(x+1)(x2-5x+6)=0
⇔(x+1)(x2-2x-3x+6)=0
⇔(x+1)[(x2-2x)-(3x-6)]=0
⇔(x+1)[x(x-2)-3(x-2)]=0
⇔(x+1)(x-2)(x-3)=0
⇔\(\left[{}\begin{matrix}x+1=0\\x-2=0\\x-3=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=-1\\x=2\\x=3\end{matrix}\right.\)
vậy S={-1;2;3}