Find all roots of polynomial using Bairstow method
`f(x)=x^3+x^2-x+2` and `r=-0.9, s=0.9`
Solution:
`x^3+x^2-x+2=0`
In this problem the coefficients are `a_0=1,a_1=1,a_2=-1,a_3=2`
Let the initial approximation `p_0=-0.9` and `q_0=0.9`
`1^(st)` iteration :
`-p_0` `0.9` | `a_0` `1` | `a_1` `1` | `a_2` `-1` | `a_3` `2` |
`-q_0` `-0.9` | | `-p_0*b_0` `0.9` | `-p_0*b_1` `1.71` | `-p_0*b_2` `-0.171` |
| | | `-q_0*b_0` `-0.9` | `-q_0*b_1` `-1.71` |
| `b_0` `1` | `b_1=a_1-p_0*b_0` `1.9` | `b_2=a_2-p_0*b_1-q_0*b_0` `-0.19` | `b_3=a_3-p_0*b_2-q_0*b_1` `0.119` |
| | `-p_0*c_0` `0.9` | `-p_0*c_1` `2.52` | |
| | | `-q_0*c_0` `-0.9` | |
| `c_0` `1` | `c_1=b_1-p_0*c_0` `2.8` | `c_2=b_2-p_0*c_1-q_0*c_0` `1.43` | |
`Delta p=-(b_3*c_0-b_2*c_1)/(c_1^2-c_0*(c_2-b_2))=-(0.651)/(6.22)=-0.1047`
`Delta q=-(b_2*(c_2-b_2)-b_3*c_1)/(c_1^2-c_0*(c_2-b_2))=-(-0.641)/(6.22)=0.1031`
`p_1=p_0+Delta p=-0.9-0.1047=-1.0047`
`q_1=q_0+Delta q=0.9+0.1031=1.0031`
`2^(nd)` iteration :
`-p_1` `1.0047` | `a_0` `1` | `a_1` `1` | `a_2` `-1` | `a_3` `2` |
`-q_1` `-1.0031` | | `-p_1*b_0` `1.0047` | `-p_1*b_1` `2.014` | `-p_1*b_2` `0.011` |
| | | `-q_1*b_0` `-1.0031` | `-q_1*b_1` `-2.0108` |
| `b_0` `1` | `b_1=a_1-p_1*b_0` `2.0047` | `b_2=a_2-p_1*b_1-q_1*b_0` `0.011` | `b_3=a_3-p_1*b_2-q_1*b_1` `0.0002` |
| | `-p_1*c_0` `1.0047` | `-p_1*c_1` `3.0234` | |
| | | `-q_1*c_0` `-1.0031` | |
| `c_0` `1` | `c_1=b_1-p_1*c_0` `3.0093` | `c_2=b_2-p_1*c_1-q_1*c_0` `2.0313` | |
`Delta p=-(b_3*c_0-b_2*c_1)/(c_1^2-c_0*(c_2-b_2))=-(-0.0327)/(7.0357)=0.0047`
`Delta q=-(b_2*(c_2-b_2)-b_3*c_1)/(c_1^2-c_0*(c_2-b_2))=-(0.0215)/(7.0357)=-0.0031`
`p_2=p_1+Delta p=-1.0047+0.0047=-1`
`q_2=q_1+Delta q=1.0031-0.0031=1`
`3^(rd)` iteration :
`-p_2` `1` | `a_0` `1` | `a_1` `1` | `a_2` `-1` | `a_3` `2` |
`-q_2` `-1` | | `-p_2*b_0` `1` | `-p_2*b_1` `2` | `-p_2*b_2` `0` |
| | | `-q_2*b_0` `-1` | `-q_2*b_1` `-2` |
| `b_0` `1` | `b_1=a_1-p_2*b_0` `2` | `b_2=a_2-p_2*b_1-q_2*b_0` `0` | `b_3=a_3-p_2*b_2-q_2*b_1` `0` |
| | `-p_2*c_0` `1` | `-p_2*c_1` `3` | |
| | | `-q_2*c_0` `-1` | |
| `c_0` `1` | `c_1=b_1-p_2*c_0` `3` | `c_2=b_2-p_2*c_1-q_2*c_0` `2.0001` | |
`Delta p=-(b_3*c_0-b_2*c_1)/(c_1^2-c_0*(c_2-b_2))=-(0)/(7.0001)=0`
`Delta q=-(b_2*(c_2-b_2)-b_3*c_1)/(c_1^2-c_0*(c_2-b_2))=-(0)/(7.0001)=0`
`p_3=p_2+Delta p=-1=-1`
`q_3=q_2+Delta q=1=1`
Approximate root `p=-1` and `q=1`
Hence extracted quadratic factor `=x^2+px+q=x^2-x+1`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then