a)\(\left(x^2+x\right)^2+4\left(x^2+x\right)-12\)
\(=\left(x^2+x+4\right)\left(x^2+x\right)-12\)
Đặt \(t=x^2+x\) ta có:
\(\left(t+4\right)t-12=t^2+4t-12\)
\(=\left(t-2\right)\left(t+6\right)=\left(x^2+x-2\right)\left(x^2+x+6\right)\)
\(=\left(x-1\right)\left(x+2\right)\left(x^2+x+6\right)\)
b)\(x^8+x+1\)
\(=x^8-x^2+\left(x^2+x+1\right)\)
\(=x^2\left(x^6-1\right)+\left(x^2+x+1\right)\)
\(=x^2\left(x^3+1\right)\left(x^3-1\right)+\left(x^2+x+1\right)\)
\(=x^2\left(x^3+1\right)\left(x-1\right)\left(x^2+x+1\right)+\left(x^2+x+1\right)\)
\(=\left(x^2+x+1\right)\left[x^2\left(x^3+1\right)\left(x-1\right)+1\right]\)