next up previous
Next: 3. Deadline is Wednesday Up: proj2 Previous: 1. The method of

2. Numerical experiments on random and special polynomials

In the following assignments we study the finding of the roots for three classes of polynomials: random polynomials, polynomials with multiple roots, and ill-conditioned polynomials.

2.1 Global and local convergence of the method. We generate random polynomials to investigate experimentally the global and local convergence of the method. For the global convergence, we just generate random coefficient vectors as in the example above. To examine the local convergence, we generate random roots to define the test polynomials. We then start the method at points close to the generated roots.

Assignment One. Generate random coefficient vectors for polynomials of degree $d = 2,3,\ldots,8$ and call the method, starting at randomly chosen initial approximations for the roots. Take as desired accuracy each time 1.0e-12 and the maximum number of steps equal to 100. Do three random experiments for every $d$. Record in a table (rows indexed by $d$ and columns by the trial: one, two, three) the number of steps it takes to reach the desired accuracy. What can you say about the global convergence of the method?

Assignment Two. Generate random complex vectors for the roots of polynomials of degree $d = 2,3,\ldots,8$ and call the method, starting at initial approximations at a distance from the generated roots equal to 1.0e-2, 1.0e-4, and 1.0e-8. An initial approximation x at distance eps from the generated roots r can be generated as x = r + (randn(1,d)+i*randn(1,d))*eps. So for each polynomial we do three experiments, taking as desired accuracy each time 1.0e-12 and the maximum number of steps equal to 100. Record in a table (rows indexed by $d$ and columns by 1.0e-2, 1.0e-4, and 1.0e-8) the number of steps it takes to reach the desired accuracy. What can you say about the local convergence of the method?

2.2 Multiple roots. The command $poly(ones(1:d))$ returns the coefficient vector of a polynomial which has only one root with multiplicity $d$ at $x = 1$, i.e.: $p(x) = (x-1)^d$.

Assignment Three. Take $p(x) = (x-1)^d$, for $d = 2,3,\ldots,8$ and run the method with a desired accuracy equal to zero and maximum allowed steps equal to 1000, each time starting a random complex initial approximations of the roots. Make a triangular table, with rows indexed by $d$, the distance of each computed approximation to the multiple root one. What is the relationship between the multiplicity $d$ of the root one and the distance of the computed approximations to one?

2.3 A perfidious polynomial. An easy looking test polynomial is $p(x) = (x-1)(x-2)(x-3) \cdots$. We can generate its coefficient vector as $poly(1:d)$, for any degree $d$.

Assignment Four. Run the method of Weierstrass on this polynomial for increasing values of $d$, starting at $d = 2$. Each time record the value for the residual res, for a desired accuracy of 1.0e-12, and allowing no more than 100 iterations, starting at random initial approximations for the roots. Stop at that degree $d$ for which res is larger than 1. Explain why this polynomial is so ill conditioned.


next up previous
Next: 3. Deadline is Wednesday Up: proj2 Previous: 1. The method of
Jan Verschelde 2003-09-16