a) \(x^8+x^4-2\)
\(=x^8+x^7+x^6+x^5+2x^4+2x^3+2x^2+2x-x^7-x^6-x^5-x^4-2x^3-2x^2-2x-2\)
\(=x\left(x^7+x^6+x^5+x^4+2x^3+2x^2+2x+2\right)-\left(x^7+x^6+x^5+x^4+2x^3+2x^2+2x+2\right)\)
\(=\left(x-1\right)\left(x^7+x^6+x^5+x^4+2x^3+2x^2+2x+2\right)\)
\(=\left(x-1\right)\left[x^4\left(x^3+x^2+x+1\right)+2\left(x^3+x^2+x+1\right)\right]\)
\(=\left(x-1\right)\left(x^4+2\right)\left(x^3+x^2+x+1\right)\)
\(=\left(x-1\right)\left(x^2+2\right)\left[x^2\left(x+1\right)+\left(x+1\right)\right]\)
\(=\left(x-1\right)\left(x^2+1\right)\left(x^2+1\right)\left(x+1\right)\)
c) \(\left(x^2+x\right)^2-2\left(x^2+x\right)-15\)
\(=x^4+2x^3+x^2-2x^2-2x-15\)
\(=x^4+2x^3-x^2-2x-15\)
\(=x^4+x^3+3x^2+x^3+x^2+3x-5x^2-5x-15\)
\(=x^2\left(x^2+x+3\right)+x\left(x^2+x+3\right)-5\left(x^2+x+3\right)\)
\(=\left(x^2+x+3\right)\left(x^2+x-5\right)\)
d) \(\left(x^2+x+1\right)\left(x^2+x+2\right)-12\)
\(=x^4+2x^3+2x^2+x^2+2x+x^2+x+2-12\)
\(=x^4+2x^3+4x^2+3x-10\)
\(=x^4+3x^3+7x^2+10x-x^3-3x^2-7x-10\)
\(=x\left(x^3+3x^2+7x+10\right)-\left(x^3+3x^2+7x+10\right)\)
\(=\left(x-1\right)\left(x^3+3x^2+7x+10\right)\)
\(=\left(x-1\right)\left(x^3+2x^2+x^2+2x+5x+10\right)\)
\(=\left(x-1\right)\left[x^2\left(x+2\right)+x\left(x+2\right)+5\left(x+2\right)\right]\)
\(=\left(x-1\right)\left(x+2\right)\left(x^2+x+5\right)\)