Wilkinson's polynomial

Question P10.2.2

Use NumPy's Polynomial class (see Section 6.4) to generate an object representing Wilkinson's polynomial, \begin{align*} P(x) &= \prod_{i=1}^{20}(x-i) = (x-1)(x-2)\cdots(x-20)\\ &= x^{20} - 210x^{19} + 20615x^{18} + \cdots + 2432902008176640000 \end{align*} from its roots to the available numerical precision; then find the roots of this representation of the polynomial.


To access solutions, please obtain an access code from Cambridge University Press at the Lecturer Resources page for my book (registration required) and then sign up to scipython.com providing this code.