How to determine polynomials