Uses Newton and Secant methods to find roots of polynomials