(x^2-6x+1)(x^2+x+1)+12x^2=(x^2+1)^2-5x(x^2+1)-6x^2+12x^2
=(x^2+1)^2-5x(x^2+1)+6x^2=(x^2+1-2x)(x^2+1-3x)=(x-1)^2(x^2-3x+1)