Order your terms by the powers of exponents in decreasing order (as is the case with pure number division hundreds, tens, ones, tenths, etc, etc) as x^n, x^n-1 etc...
(-x^4+1)/(x-1)
-x^3 rem -x^3-1
-x^2 rem -x^2-1
-x rem -x-1
-1 rem 0
(x-1)(-x^3-x^2-x-1)
(x-1)(-x^3-x-x^2-1)
(x-1)(-x(x^2+1)-1(x^2+1))
(x-1)(-x-1)(x^2+1)