Finding the zeros of a polynomial function