One root of a polynomial
Find a root of the polynomial (1+x+x^2)^100 with input rounded to 16 digits using Newton's method.
> Digits := 200;
> p := expand((1+x+x^2)^100):
> h := evalf(convert(p,horner,x),16):
> p1 := diff(expand(h),x):
> h1 := convert(p1,horner,x):
> it := unapply(x-h/h1,x):
> r := -5.;
> to 20 do r := it(r); od:
> r;
Is r an approximate root of h ?
> subs(x=r,h);
Is r close to the exact roots of p?
> s := solve(1+x+x^2,x);
> evalf(s[1],16);
> evalf(r,16);
We started with (1+x+x^2)^100, expanded it , and rounded its coefficients to 16 digits. Then we found one root of the rounded coefficient polynomial and found that it did not have any digits in common with the exact roots of the original polynomial. If we want to find the roots of p to 16 digits then we would need much more than 16 digits in the input coefficients .