x4+2015x2+2014x+2015
=x4-x+2015x2+2015x+2015
=x.(x3-1)+2015.(x2+x+1)
=x.(x-1)(x2+x+1)+2015.(x2+x+1)
=(x2+x+1)(x2-x+2015)
\(x^4+2015x^2+2014x+2015=\left(x^4+x^3+x^2\right)-\left(x^3+x^2+x\right)+\left(2015x^2+2015x+2015\right)\)
\(=x^2\left(x^2+x+1\right)-x\left(x^2+x+1\right)+2015\left(x^2+x+1\right)=\left(x^2+x+1\right)\left(x^2-x+2015\right)\)