Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Wilkinson's polynomial
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Use dmy dates|date=January 2020}} {{multiple image |align=right |direction=vertical |width=300 |image1=Wilkinson polynomial.svg |caption1=[[Graph of a function|Graph]] of Wilkinson's polynomial |image2=log Wilkinson polynomial.svg |caption2=Graph of <math>\sgn(w(x))\ln(1+|w(x)|)</math> }} In [[numerical analysis]], '''Wilkinson's polynomial''' is a specific [[polynomial]] which was used by [[James H. Wilkinson]] in 1963 to illustrate a difficulty when [[root-finding algorithm|finding the roots]] of a polynomial: the location of the [[root of a polynomial|roots]] can be very sensitive to perturbations in the [[coefficient]]s of the polynomial. The polynomial is <math display="block"> w(x) = \prod_{i=1}^{20} (x - i) = (x-1) (x-2) \cdots (x-20). </math> Sometimes, the term ''Wilkinson's polynomial'' is also used to refer to some other polynomials appearing in Wilkinson's discussion. ==Background== Wilkinson's polynomial arose in the study of algorithms for finding the roots of a polynomial <math display="block"> p(x) = \sum_{i=0}^n c_i x^i. </math> It is a natural question in numerical analysis to ask whether the problem of finding the roots of {{math|''p''}} from the coefficients {{math|''c''<sub>''i''</sub>}} is [[condition number|well-conditioned]]. That is, we hope that a small change in the coefficients will lead to a small change in the roots. Unfortunately, this is not the case here. The problem is ill-conditioned when the polynomial has a [[multiple root]]. For instance, the polynomial {{math|''x''<sup>2</sup>}} has a double root at {{math|1=''x'' = 0}}. However, the polynomial {{math|''x''<sup>2</sup> − ''ε''}} (a perturbation of size ''ε'') has roots at {{math|±√''ε''}}, which is much bigger than {{math|''ε''}} when {{math|''ε''}} is small. It is therefore natural to expect that ill-conditioning also occurs when the polynomial has zeros which are very close. However, the problem may also be extremely ill-conditioned for polynomials with well-separated zeros. Wilkinson used the polynomial {{math|''w''(''x'')}} to illustrate this point (Wilkinson 1963). In 1984, he described the personal impact of this discovery: <blockquote>''Speaking for myself I regard it as the most traumatic experience in my career as a numerical analyst.''<ref> {{Cite book|last=Wilkinson |first=James H. |authorlink=James H. Wilkinson |editor=Gene H. Golub |title= Studies in Numerical Analysis |year=1984 |publisher=Mathematical Association of America |isbn=978-0-88385-126-5 |pages=3 |chapter=The perfidious polynomial}}</ref></blockquote> Wilkinson's polynomial is often used to illustrate the undesirability of naively computing [[eigenvalue]]s of a [[matrix (mathematics)|matrix]] by first calculating the coefficients of the matrix's [[characteristic polynomial]] and then finding its roots, since using the coefficients as an intermediate step may introduce an extreme ill-conditioning even if the original problem was well-conditioned.<ref name=TrefethenBau>{{Citation|first1=Lloyd N. |last1=Trefethen |first2= David|last2= Bau|title=Numerical Linear Algebra|publisher=SIAM|year=1997}}</ref> ==Conditioning of Wilkinson's polynomial== Wilkinson's polynomial <math display="block"> w(x) = \prod_{i=1}^{20} (x - i) = (x-1)(x-2) \cdots (x-20) </math> clearly has 20 roots, located at {{math|1=''x'' = 1, 2, ..., 20}}. These roots are far apart. However, the polynomial is still very ill-conditioned. Expanding the polynomial, one finds <math display="block"> \begin{align} w(x) = {} & x^{20}-210 x^{19}+20615 x^{18}-1256850x^{17}+53327946 x^{16} \\ & {}-1672280820x^{15}+40171771630 x^{14}-756111184500x^{13} \\ & {}+11310276995381x^{12}-135585182899530x^{11} \\ & {}+1307535010540395x^{10}-10142299865511450x^9 \\ & {}+63030812099294896x^8-311333643161390640x^7 \\ & {}+1206647803780373360x^6-3599979517947607200x^5 \\ & {}+8037811822645051776x^4-12870931245150988800x^3 \\ & {}+13803759753640704000x^2-8752948036761600000x \\ & {}+2432902008176640000. \end{align} </math> If the coefficient of ''x''<sup>19</sup> is decreased from −210 by 2<sup>−23</sup> to −210.0000001192, then the polynomial value ''w''(20) decreases from 0 to −2<sup>−23</sup> 20<sup>19</sup> = −6.25×10<sup>17</sup>, and the root at {{math|1=''x'' = 20}} grows to {{math|1=''x'' ≈ 20.8}}. The roots at {{math|1=''x'' = 18}} and {{math|1=''x'' = 19}} collide into a double root at {{math|1=''x'' ≈ 18.62}} which turns into a pair of [[complex conjugate]] roots at {{math|1=''x'' ≈ 19.5 ± 1.9''i''}} as the perturbation increases further. The 20 roots become (to 5 decimals) <math display="block"> \begin{array}{rrrrr} 1.00000 & 2.00000 & 3.00000 & 4.00000 & 5.00000 \\[8pt] 6.00001 & 6.99970 & 8.00727 & 8.91725 & 20.84691 \\[8pt] 10.09527\pm {} & 11.79363 \pm {} & 13.99236\pm{} & 16.73074\pm{} & 19.50244 \pm {} \\[-3pt] 0.64350i & 1.65233i & 2.51883i & 2.81262i & 1.94033i \end{array} </math> Some of the roots are greatly displaced, even though the change to the coefficient is tiny and the original roots seem widely spaced. Wilkinson showed by the stability analysis discussed in the next section that this behavior is related to the fact that some roots ''α'' (such as ''α'' = 15) have many roots ''β'' that are "close" in the sense that |''α'' − ''β''| is smaller than |''α''|. Wilkinson chose the perturbation of 2<sup>−23</sup> because his [[Pilot ACE]] computer had 30-bit [[floating point]] [[significand]]s, so for numbers around 210, 2<sup>−23</sup> was an error in the first bit position not represented in the computer. The two [[real number]]s −210 and −210 − 2<sup>−23</sup> are represented by the same floating point number, which means that 2<sup>−23</sup> is the ''unavoidable'' error in representing a real coefficient close to −210 by a floating point number on that computer. The perturbation analysis shows that 30-bit coefficient [[precision (arithmetic)|precision]] is insufficient for separating the roots of Wilkinson's polynomial. ==Stability analysis== Suppose that we perturb a polynomial {{math|1=''p''(''x'') = Π (''x'' − ''α''<sub>''j''</sub>)}} with roots {{math|''α''<sub>''j''</sub>}} by adding a small multiple {{math|''t''·''c''(''x'')}} of a polynomial {{math|''c''(''x'')}}, and ask how this affects the roots {{math|''α''<sub>''j''</sub>}}. To first order, the change in the roots will be controlled by the [[derivative]] <math display="block">{d\alpha_j \over dt} = -{c(\alpha_j)\over p^\prime(\alpha_j)}. </math> When the derivative is small, the roots will be more stable under variations of {{math|''t''}}, and [[converse (logic)|converse]]ly if this derivative is large the roots will be unstable. In particular, if {{math|''α''<sub>''j''</sub>}} is a multiple root, then the denominator vanishes. In this case, α<sub>''j''</sub> is usually not [[differentiable]] with respect to {{math|''t''}} (unless {{math|''c''}} happens to vanish there), and the roots will be extremely unstable. For small values of {{math|''t''}} the perturbed root is given by the [[power series]] expansion in {{math|''t''}} <math display="block"> \alpha_j + {d\alpha_j \over dt} t + {d^2\alpha_j \over dt^2} {t^2\over 2!} + \cdots </math> and one expects problems when |''t''| is larger than the [[radius of convergence]] of this power series, which is given by the smallest value of |''t''| such that the root {{math|''α''<sub>''j''</sub>}} becomes multiple. A very crude estimate for this radius takes half the distance from {{math|''α''<sub>''j''</sub>}} to the nearest root, and divides by the derivative above. In the example of Wilkinson's polynomial of [[degree of a polynomial|degree]] 20, the roots are given by {{math|1=''α''<sub>''j''</sub> = ''j''}} for {{math|1=''j'' = 1, ..., 20}}, and {{math|''c''(''x'')}} is equal to ''x''<sup>19</sup>. So the derivative is given by <math display="block">{d\alpha_j \over dt} = -{\alpha_j^{19}\over \prod_{k\ne j}(\alpha_j-\alpha_k)} = -\prod_{k\ne j}{\alpha_j\over \alpha_j-\alpha_k} . \,\!</math> This shows that the root {{math|α<sub>''j''</sub>}} will be less stable if there are many roots {{math|α<sub>''k''</sub>}} close to {{math|α<sub>''j''</sub>}}, in the sense that the distance |α<sub>''j''</sub> − α<sub>''k''</sub>| between them is smaller than |α<sub>''j''</sub>|. '''Example'''. For the root α<sub>1</sub> = 1, the derivative is equal to 1/19! which is very small; this root is stable even for large changes in ''t''. This is because all the other roots ''β'' are a long way from it, in the sense that |''α''<sub>1</sub> − ''β''| = 1, 2, 3, ..., 19 is larger than |''α''<sub>1</sub>| = 1. For example, even if ''t'' is as large as –10000000000, the root ''α''<sub>1</sub> only changes from 1 to about 0.99999991779380 (which is very close to the first order approximation 1 + ''t''/19! ≈ 0.99999991779365). Similarly, the other small roots of Wilkinson's polynomial are insensitive to changes in ''t''. '''Example'''. On the other hand, for the root ''α''<sub>20</sub> = 20, the derivative is equal to −20<sup>19</sup>/19! which is huge (about 43000000), so this root is very sensitive to small changes in ''t''. The other roots ''β'' are close to ''α''<sub>20</sub>, in the sense that |''β'' − ''α''<sub>20</sub>| = 1, 2, 3, ..., 19 is less than |''α''<sub>20</sub>| = 20. For ''t'' = −2<sup>−23</sup>, the first-order approximation 20 − ''t''·20<sup>19</sup>/19! = 25.137... to the perturbed root 20.84... is terrible; this is even more obvious for the root ''α''<sub>19</sub> where the perturbed root has a large [[imaginary part]] but the first-order approximation (and for that matter all higher-order approximations) are real. The reason for this discrepancy is that |''t''| ≈ 0.000000119 is greater than the radius of convergence of the power series mentioned above (which is about 0.0000000029, somewhat smaller than the value 0.00000001 given by the crude estimate) so the linearized theory does not apply. For a value such as ''t'' = 0.000000001 that is significantly smaller than this radius of convergence, the first-order approximation 19.9569... is reasonably close to the root 19.9509... At first sight the roots ''α''<sub>1</sub> = 1 and ''α''<sub>20</sub> = 20 of Wilkinson's polynomial appear to be similar, as they are on opposite ends of a symmetric line of roots, and have the same set of distances 1, 2, 3, ..., 19 from other roots. However the analysis above shows that this is grossly misleading: the root ''α''<sub>20</sub> = 20 is less stable than ''α''<sub>1</sub> = 1 (to small perturbations in the coefficient of ''x''<sup>19</sup>) by a factor of 20<sup>19</sup> = 5242880000000000000000000. ==Wilkinson's second example== The second example considered by Wilkinson is <math display="block"> w_2(x) = \prod_{i=1}^{20} (x - 2^{-i}) = (x-2^{-1})(x-2^{-2}) \cdots (x-2^{-20}). </math> The twenty roots of this polynomial are in a [[geometric progression]] with common ratio 2, and hence the quotient <math display="block"> \alpha_j\over \alpha_j-\alpha_k </math> cannot be large. Indeed, the roots of {{math|''w''<sub>2</sub>}} are quite stable to large ''relative'' changes in the coefficients. ==The effect of the basis== The expansion <math display="block">p(x) = \sum_{i=0}^n c_i x^i</math> expresses the polynomial in a particular [[basis (linear algebra)|basis]], namely that of the [[monomial]]s. If the polynomial is expressed in another basis, then the problem of finding its roots may cease to be ill-conditioned. For example, in a [[Lagrange polynomial|Lagrange form]], a small change in one (or several) coefficients need not change the roots too much. Indeed, the basis polynomials for interpolation at the points 0, 1, 2, ..., 20 are <math display="block"> \ell_k(x) = \prod_{i = 0,\ldots,20 \atop i \neq k} \frac{x - i}{k - i}, \qquad\text{for}\quad k=0,\ldots,20. </math> Every polynomial (of degree 20 or less) can be expressed in this basis: <math display="block"> p(x) = \sum_{i=0}^{20} d_i \ell_i(x). </math> For Wilkinson's polynomial, we find <math display="block"> w(x) = (20!) \ell_0(x) = \sum_{i=0}^{20} d_i \ell_i(x) \quad\text{with}\quad d_0=(20!) ,\, d_1=d_2= \cdots =d_{20}=0. </math> Given the definition of the Lagrange basis polynomial {{math|ℓ<sub>0</sub>(''x'')}}, a change in the coefficient {{math|''d''<sub>0</sub>}} will produce no change in the roots of {{math|''w''}}. However, a perturbation in the other coefficients (all equal to zero) will slightly change the roots. Therefore, Wilkinson's polynomial is well-conditioned in this basis. ==Notes== <references/> ==References== Wilkinson discussed "his" polynomial in * J. H. Wilkinson (1959). The evaluation of the zeros of ill-conditioned polynomials. Part I. ''Numerische Mathematik'' '''1''':150–166. * J. H. Wilkinson (1963). ''Rounding Errors in Algebraic Processes''. Englewood Cliffs, New Jersey: Prentice Hall. It is mentioned in standard text books in numerical analysis, like *F. S. Acton, ''Numerical methods that work'', {{ISBN|978-0-88385-450-1}}, p. 201. Other references: * Ronald G. Mosier (July 1986). Root neighborhoods of a polynomial. ''Mathematics of Computation'' '''47'''(175):265–273. * J. H. Wilkinson (1984). [http://www.maa.org/sites/default/files/pdf/upload_library/22/Chauvenet/Wilkinson.pdf The perfidious polynomial.] ''Studies in Numerical Analysis'', ed. by G. H. Golub, pp. 1–28. (Studies in Mathematics, vol. 24). Washington, D.C.: Mathematical Association of America. A high-precision numerical computation is presented in: * Ray Buvel, [http://calcrpnpy.sourceforge.net/ratfunManual.html Polynomials And Rational Functions], part of the ''RPN Calculator User Manual'' (for Python), retrieved on 29 July 2006. {{DEFAULTSORT:Wilkinson's Polynomial}} [[Category:Numerical analysis]] [[Category:Polynomials]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation
(
edit
)
Template:Cite book
(
edit
)
Template:ISBN
(
edit
)
Template:Math
(
edit
)
Template:Multiple image
(
edit
)
Template:Use dmy dates
(
edit
)