Đặt \(x^2+x+1=a\)
\(2a^3-3a^2x+x^3\)
\(=\left(2a^3-4a^2x+2ax^2\right)+\left(a^2x-2ax^2+x^3\right)\)
\(=2a\left(a^2-2ax+x^2\right)+x\left(a^2-2ax+x^2\right)\)
\(=\left(a^2-2ax+x^2\right)\left(2a+x\right)\)
\(=\left(a-x\right)^2\left(2a+x\right)\)
\(=\left(x^2+1\right)^2\left(2x^2+3x+2\right)\)