Are you sure you've got the right question there? I don't think it's possible to start off with a cubic and end up with something that will clearly expand into a 4th degree polynomial.
Pretty much what Iruka said. Just check for one factor i.e. f(a) = 0, then do long division of the function, dividing it by (x-a), and take it from there ^^.