Ta có:
\(x^4-x+1=x\left(x^3-1\right)+\left(x^3-1\right)-\left[\left(x^3-1\right)-2\right]\)
\(=\left(x^3-1\right)\left(x+1-1+2\right)\)
\(=\left(x^3-1\right)\left(x+2\right)=0\)
\(\Rightarrow\left[{}\begin{matrix}x^3-1=0\\x+2=0\end{matrix}\right.\)
\(\Rightarrow\left[{}\begin{matrix}x=-1\\x=-2\end{matrix}\right.\)