Write a program to do Bairstow's method. The program should take as input
and integer n and a vector a of dimension n+1 representing a
polynomial of degree n. It should also take as input a tolerance tol,
a maximum number of iterations it and an initial guess u,v for a
quadratic factor x2-ux-v. The program should return c,d where
x2-cx-d is your final estimate for a quadratic factor. The program
should terminate when either
or
.
Find real quadratic factors of x4+x2+1 and x3+x2-2.