Đặt x2+x+1=t \(\Rightarrow x^2+x+2=t+1\)
Khi đó: (x2+x+1)(x2+x+2)-12=t(t+1)-12
\(=t^2+t-12=t^2-3t+4t-12\)
\(=t\left(t-3\right)+4\left(t-3\right)\)
\(=\left(t-3\right)\left(t+4\right)\)=(x2+x+1-3)(x2+x+1+4)
\(=\left(x^2+x-2\right)\left(x^2+x+5\right)\)
\(=\left(x^2-x+2x-2\right)\left(x^2+x+5\right)\)
=[x(x-1)+2(x-1)](x2+x+5)
=(x-1)(x+2)(x2+x+5)