Ta có:
\(\left(x^4+2x^3-x-2\right)+\left(4x^2+4x+4\right)\)
\(=\left[\left(x^4+2x^3\right)-\left(x+2\right)\right]+4\left(x^2+x+1\right)\)
\(=\left[x^3\left(x+2\right)-\left(x-2\right)\right]+4\left(x^2+x+1\right)\)
\(=\left(x-1\right)\left(x+2\right)\left(x^2+x+1\right)+4\left(x^2+x+1\right)\)
\(=\left(x^2+x+1\right)\left[\left(x-1\right)\left(x+2\right)+4\right]\)
\(=\left(x^2+x+1\right)\left(x^2+x+2\right)\)