x^3+ax^2+(a-1)x=x(x^2+ax+(a-1))=x(x+1)(x+a-1)