Use the bairstows method to find the roots of the following
Use the bairstow\'s method to find the roots of the following polynomial.
x5 - 9x4 +25x3 -5x2 -26x + 24 = 0
Make sure to determine the roots correct to at least four significant figures.
Solution
Roots are :
-4.36376519662558
1.39848742554330-j1.8100778592698
1.39848742554330+j1.8100778592698
-0.820722036190821
1.38750880631095
Since the equation will take about 16 iterations to solve, It can implemented only in software. I used MATLAB-2013a to solve it. But can use any other software to solve it.
I am here by providing the basic algorithm update that you will find usefull. Having need to get complete code feel free to contact.
Algorithm :
Solution to Bairstow method problem given by:
x^5-9*x^(4)+25*x^(3)-5*x^(2)-26*x^(1)+24.
Coefficent is denoted by a
The accuracy to which the polynomial is satisfied is given by 10^-5 denoted by tol.
The solutions are obtained according to the following algorithm:
while degree of the polynomial is greater than>2
Initialise the loop via (you can use other initialisation):
u=1; v=1; st=1;
while st>tol
b(1)=a(1)-u; b(2)=a(2)-b(1)*u-v;
for k=3:n
b(k)=a(k)-b(k-1)*u-b(k-2)*v;
end;
c(1)=b(1)-u; c(2)=b(2)-c(1)*u-v;
for k=3:n-1
c(k)=b(k)-c(k-1)*u-c(k-2)*v;
end;
calculate change in u and v
c1=c(n-1); b1=b(n); cb=c(n-1)*b(n-1);
c2=c(n-2)*c(n-2); bc=b(n-1)*c(n-2);
if n>3, c1=c1*c(n-3); b1=b1*c(n-3); end;
dn=c1-c2;
du=(b1-bc)/dn; dv=(cb-c(n-2)*b(n))/dn;
u=u+du; v=v+dv;
st=norm([du dv]); it=it+1;
end;
Solve the quadratic equation parameterized by u,v,n,a that will provide you real and imaginary part of roots given by r1,r2,im1,im2
rts(n,1:2)=[r1 im1]; rts(n-1,1:2)=[r2 im2];
n=n-2;
a(1:n)=b(1:n);
end;
u=a(1); v=a(2);
Again,Solve the quadratic equation parameterized by u,v,n,a that will provide you real and imaginary part of roots given by r1,r2,im1,im2
rts(n,1:2)=[r1 im1];
if n==2
rts(n-1,1:2)=[r2 im2];
end;

