how to solve polynomial equations