6.6. ROOTS OF POLYNOMIALS 97
method (regula falsi from Latin) where the interval [a,b] is chosen so that , else
there is no solution. This is rather similar to the bisection method. Another possibility is to
determine the starting point for the iterative search using three points
, and
. One can use Lagrange’s interpolation formula for a polynomial, see the discussion in
next chapter. This procedure leads to Brent’s method. You will find a function in the program
library which computes the zeros according to the latter method as well.
6.5.1 Calling the various functions
In the program library you will find the following functions
r t b i s ( double ( func ) ( double ) , double x1 , double x2 , double xacc )
r tse c ( double ( func ) ( double ) , double x1 , double x2 , double xacc )
rtnewt ( void ( funcd ) ( double , double , double ) , double x1 ,
double x2 , double xacc )
zbrent ( double ( func ) ( double ) , double x1 , double x2 , double xacc )
In all of these functions we transfer the lower and upper limit of the interval where we seek
the solution, . The variable is the precision we opt for. Note that in these function,
not in any case is the test
implemented. Rather, the test is done through ,
which not necessarily is a good option.
Note also that these functions transfer a pointer to the name of the given function through e.g.,
double (*func)(double). For Newton-Raphson’s method we need a function which returns both
the function and its derivativeat a point
. This is then doneby transferring
6.6 Roots of polynomials
in preparation
6.6.1 Polynomials division
in preparation
6.6.2 Root finding by Newton-Raphson’s method
in preparation
6.6.3 Root finding by deflation
in preparation
6.6.4 Bairstow’s method