\(x^4+2019x^2+2018x+2019\)
\(=x^4-x^3+x^3+2019x^2-x^2+x^2+2019x-x+2019\)
\(=\left(x^4-x^3+2019x^2\right)+\left(x^3-x^2+2019x\right)+\left(x^2-x+2019\right)\)
\(=x^2\left(x^2-x+2019\right)+x\left(x^2-x+2019\right)+\left(x^2-x+2019\right)\)
\(=\left(x^2+x+1\right)\left(x^2-x+2019\right)\)