PolynomialExtendedGCD[x-1,x3+x+1,x]