synthetic division of polynomials with remainder