1. Introduction
Given a positive integer n and complex numbers ai,bi,i=1,…,n such that bi≠bj for i≠j and ai≠0 for i=1,…,n, consider the rational function
equation(1)
Turn MathJax on
We associate with S(x) the secular equation S(x)=0. The numbers bi and ai, for i=1,…,n are referred to as the nodes and the coefficients of the secular function S(x), respectively.
Equations of this kind are mainly encountered in the case of real nodes bi and positive coefficients ai when the roots are real. Typical examples are modifying symmetric eigenvalue problems [1], or solving the tridiagonal symmetric eigenvalue problem by means of divide and conquer techniques [2] and [3], updating the singular values of a matrix, solving least squares problems [4], invariant subspace computation [5] and more. Over the complex field, for any set of nodes and coefficients, secular equations are encountered in the solution of the eigenvalue problem for a diagonal plus rank-one matrix [6], [7], [8] and [9] and in representing generalized companion matrix pencils in the Lagrange basis especially in the framework of “polynomial algebra by values” [10].
Secular equations are also a powerful tool for attacking the polynomial root-finding problem. This is the main fact that motivates our interest in such equations. In fact, the monic polynomial of degree n
Turn MathJax on
has roots that coincide with the roots of S(x). Moreover, one can verify that
equation(2)
Turn MathJax on
so that, given the polynomial p(x) and the nodes bi it is not expensive to compute the coefficients ai and to reformulate the polynomial root-finding problem in terms of a secular equation.
In this paper we present a method for the numerical solution of secular equations together with its computational analysis. More precisely we describe, analyze and implement an algorithm which, given in input the coefficients ai and the nodes bi,i=1,…,n of the secular function S(x) together with an integer d, provides in output the roots of S(x) represented with d guaranteed digits. In its cheaper version (isolation), the algorithm can provide approximations to the roots with the minimum number of digits sufficient to separate them from each other. The maximum number d of digits is used only for those roots, if any, which cannot be otherwise separated.
The algorithm can be effectively used as a tool for computing an arbitrarily large number d of digits of the roots of a polynomial p(x) assigned either in terms of its coefficients in some polynomial basis or by means of a black box which, given in input a complex number x, provides in output the complex number p(x). In fact we will show that using the representation of a polynomial in terms of secular equation provides substantial computational advantages.
The method relies on the combination of two different strategies to reduce the required precision of the floating point arithmetic: the strategy adopted in the package of MPSolve of D. Bini and G. Fiorentino [11], and that used in the package Eigensolve of S. Fortune [12]. It exploits some theoretical results, that we present in this paper, concerning root-neighborhoods, numerical conditioning, a posteriori error bounds, and rounding error analysis, related to computations with secular functions. It relies also on the formulation of the problem given in terms of structured matrices and on the Ehrlich–Aberth iteration as main approximation engine [13] and [14].
The algorithm that we have obtained has been implemented in the language C and incorporated in the package MPSolve originating the release MPSolve 3.0. The software is free and can be downloaded from http://riccati.dm.unipi.it/mpsolve. It enables to deal with secular and polynomial equations where the real or complex input data can take either the approximate form of floating point numbers or the exact form of integers and rationals. The implementation exploits the parallel architecture of the computing platform.
From the many numerical experiments that we have performed our code, even though applied without the parallelism, is generally faster than MPSolve and Eigensolve. For certain polynomials it is dramatically faster. The speed up that it reaches when using multicore hardware is close to optimal. Just to make an example, for the partition polynomial of degree 72.000 which has integer coefficients representable with several megabytes, MPSolve 2.0 took about 30 days to compute all the roots [15]. Our code computes the roots in less than 2 h whereas Eigensolve has an estimated CPU time of many years.
The paper is organized as follows. In Section 2 we recall the strategies of MPSolve and Eigensolve, and give an overview of our algorithm. In Section 3 we develop the numerical tools that we need. In particular we provide a backward stable method for computing S(x), and we extend the definition and the properties of root-neighborhoods [16] and [17] from polynomials to secular functions. These properties allow us to devise effective stop conditions to halt the Ehrlich–Aberth iteration. Section 4 deals with the matrix representation of the problem and with the way of constructing different secular functions having the same roots as S(x) and using different sets of nodes. We refer to these functions as equivalent functions. Gerschgorin-like inclusion results are given and used for devising a posteriori error bounds. In Section 5 we perform a perturbation analysis of the roots of secular functions where we show that the condition number of the roots converges to zero as the nodes, used for representing the equivalent secular function, converge to the roots. The Ehrlich–Aberth iteration is recalled in Section 6. Finally, in Section 7 we present the results of the numerical experiments.
2. Overview of the algorithm
Our algorithm performs computations in floating point arithmetic with a variable number of digits. Since high precision arithmetic is expensive, our goal is to keep the number of digits of the floating point computation as low as possible. We will refer to the working precision as to the number w of binary digits used in the current floating point computation and denote u=2−w the corresponding machine precision . Recall that the standard IEEE double precision arithmetic has w=53 bits.
Here we provide an overview of our algorithm. First, we recall two different strategies to manage the working precision for computing roots of polynomials: the strategy of MPSolve and the one of Eigensolve. Then we describe the new approach which combines the two different techniques. To better explain this, we need to anticipate the following tools and concepts which will be better clarified and investigated in the next sections.
Set of inclusion disks is a set of disks in the complex plane, say provided by the Gerschgorin theorem, such that their union contains all the roots, and any connected component formed by k disks contains k roots. This way, isolated disks contain only one root.
Newton-isolated disks. A disk in a set of inclusion disks is said Newton isolated, or simply isolated , if its distance from the closest disk in the set is at least 3n times its radius. This way, if the disks include the roots of a polynomial p(x), Newton’s iteration applied to p(x) starting from the center of a Newton isolated disk converges quadratically right from the start to the root in this disk in view of [18].
Ehrlich–Aberth (EA) iteration. It is defined by the sequence of vectors such that
equation(3)
Turn MathJax on
An analogous sequence can be generated in the Gauss–Seidel style. The Newton correction N(x) can be expressed in terms of S(x) as
equation(4)
Turn MathJax on
If convergent, the sequence x(k) converges to the n-tuple of the roots of p(x); convergence to simple roots is locally cubic, it is linear for multiple roots. There is no proof of the global convergence of the EA iteration, however, from the practical point of view, no results where the sequence fails to converge have been encountered. In the practical use of this iteration, some control can be set for non-convergence. A nice feature of the iteration (3) is that it can be applied selectively only for the subscripts i of interest. The cost per iteration is O(nk) arithmetic operations (ops) where k is the number of subscripts i to which the iteration is applied. Another nice feature is that the iteration can be easily parallelized. The EA iteration performs implicit deflation of the roots without computing quotient and remainder and, unlike the iterations based on explicit deflation, it is self correcting.
Root-neighborhood. For a polynomial and a given ϵ>0, the ϵ-root-neighborhood of p(x) is the set formed by the roots of all the polynomials , where . The ϵ-root-neighborhood of is the set formed by the roots of the secular function , where .
The general lines of the strategy on which MPSolve is based are reported below. Here, the goal is to arrive at isolating all the roots up to d guaranteed correct digits.
1.
The EA iteration is applied with a working precision of w=53 bits until all the approximations are in the ϵ-root-neighborhood for ϵ=γun,u=2−w, and γ is a suitable constant whose value comes from the rounding error analysis of the Horner rule.
2.
A set of inclusion disks is computed. If all the disks are isolated, then the algorithm stops and the approximations are delivered. The algorithm stops also if the overlapping disks, if any, have radii which guarantee at least d correct digits in the approximation.
3.
If there are some overlapping or non-isolated disks (unsolved clusters), then the number of digits of the working precision is doubled, i.e., we set w≔2w, and the Ehrlich–Aberth iteration (3) is applied with the new higher precision only for the indices i corresponding to the approximations in these clusters until the computed approximations are in the ϵ-root-neighborhood, ϵ=γun. The computat