next up previous
Next: 2. Numerical experiments on Up: proj2 Previous: 0. Polynomials in MATLAB

1. The method of Weierstrass (a.k.a the Durand-Kerner method)

The method of Weierstrass simultaneously approximates all roots of a polynomial $p$ of degree $d$, assumed to be monic, i.e.: the coefficient with the highest degree term $x^d$ of $p$ equals one. Starting at some initial approximation for all the roots in $x^{(0)} = ( x_1^{(0)}, x_2^{(0)}, \ldots, x_d^{(0)} )$, the method uses the following formula:

\begin{displaymath}
x_i^{(k+1)} = x_i^{(k)}
- \frac{p(x_i^{(k)})}{\displaystyl...
...\rm for} ~ i = 1,2,\ldots,d,
\quad {\rm and} ~ k = 0,1,\ldots
\end{displaymath}

This formula is implemented in the function weierstrass, which is called as follows:
  >> p = randn(1,6);                        % degree 5 polynomial
  >> p = p/p(1);                            % make monic
  >> x = randn(1,5) + i*randn(1,5);         % 5 random complex numbers
  >> [x,res] = weierstrass(p,x,1.0e-10,30)
The last command returns in x the new vector of approximations for the roots of p after no more than 30 iterations. The method stops earlier if the desired accuracy of 1.0e-10 is reached. The res is the magnitude of p evaluated at x. If res is smaller than the desired accuracy, the method succeeded, otherwise it failed.



Jan Verschelde 2003-09-16