how to solve polynomials