The Bairstow Method


This program approximates the roots of a polynomial. It finds the precise roots quickly, provided that the initial guesses (available from the Q-D program) are reasonably close to the actual roots.


Introduction

The Bairstow method program finds the roots of a polynomial whose coefficients you enter. It is able to converge on the roots more quickly than the Q-D method but requires an initial guess for each root. Because the Q-D metho can generate the initial guesses, the Q-D method is helpful when the roots ou guess fail to make the Bairstow program converge on the precise roots.

Before running the program, you must partition the calculator for at least 125 data registers, which is the default partitioning.

The polynomial you enter has the form

0 = anxn + … a3x3 + a2x2 + a1x + a0


Because the calculator has built-in solutions for quadratic and cubic polynomials, the program requires you to enter a polynomial of fourth order or higher. The largest polynomial the program can use is 25th order.

The program reduces the polynomial by a quadratic factor, x2 + rx + s = 0, resulting in a polynomial whose degree is two less than the original polynomial. You enter r and s, and the program searches for the remaining roots. You can determine the values of r and s from the Q-D program, or you can estimate the values of r and s.

Reference

Applied Numerical Analysis, Curtis F. Gerald, Addison-Wesley, 1970.

Starting the Program

To start the program that uses the Bairstow method:
  1. Select { ZRO } from the MATHEMATICS menu.
    The calculator displays the FUNCTION ZEROS menu.
  2. Press { BAI }.
    The program displays:
    D_07rYhf
  3. Enter the number of iterations you want performed and press { #it }.
  4. Enter the allowable error and press { err }.
  5. Press { EOD }.
    The program displays:
    D_4aqau0
  6. Select the appropriate option.
    • To enter a new polynomial, press { YES } and proceed to "Entering the Coefficients" below.
    • To use a polynomial you have already entered (using either the Q-D program, or a previous run of this program), press { NO } and proceed to "Entering the r and s values" below.

Entering the Coefficients

When you select { YES } from the ENTER POLY? menu, the program displays:
D_sIualY
Enter the degree of the polynomial and press { n }.
Press { EOD }.
The program prompts you to enter the coefficient of each term, beginning with the first term.
D_fuFsL2
where the number in the display is the number of the term.
Enter the coefficient and press { ENT }.
Repeat step 3 until all the coefficients are entered.
The program then displays the menu shown in the next section below.

The Edit Menu

After you enter all the coefficients, the program displays an EDIT? menu that allows you to change any of the values.
D_mLuPhg
  • If you do not want to edit, press { NO } and go to the section on "Entering the r and s Values".
  • If you want to edit, press { YES }, and use the procedure in the next section below.

Editing the Coefficients

When you select { YES } from the EDIT? menu, the program displays the same menu that you used to enter the coefficients.
D_fuFsL2
  • To display the current value of the coefficient, press the [ CE ] key.
  • To accept the current value and proceed to the next coefficient, press { ENT }.
  • To edit the current value, enter the correct value and press { ENT }.
When you press { ENT } to accept or edit the value of the last coefficient, the program returns to the EDIT? menu.

D_1cBRWh

Entering the r and s Values

When you select { NO } from either the ENTER POLY? or the EDIT? menu, the program displays:
D_hFS712
  1. Enter the r value and press { r }.
  2. Enter the s value and press { s }.
  3. Press { EOD }.
    The program proceeds in one of two ways.
    • If the reduced polynomial is not cubic or quadratic, the program finds the roots of the factor x2 + rx + s, allows you to examine the reduced polynomial, and proceeds with another reduction.
    • If the reduced polynomial is cubic or quadratic, the program finds the roots.
  4. Proceed according to the message that is display.
  • If the message is REAL ROOTS, go the the section on "Real Roots" below.
  • If the message is either COMPLEX ROOTS or 1 REAL, 2 COMPLEX, go the applicable section below.

Real Roots

If the polynomial is not cubic, the program displays:
D_hveKgy
  1. Press { R1 } and { R2 } to display the two real roots.
  2. Press { ESC }.
    The program proceeds in one of two ways.
    • If the roots are not the last two roots of the polynomial, the program displays SEE NEXT POLY? Use the procedure listed in "Selecting Options" below.
    • If all the roots have been found, the program returns to the FUNCTION ZEROS menu.
If the reduced polynomial is cubic, the program displays a screen similar to the one above, but with an additional { R3 } option shown.
  1. Press { R1 }, { R2 }, and { R3 } to display the three real roots.
  2. Press { ESC } to return to the FUNCTION ZEROS menu.

Complex Roots

If the roots of the equation are a complex conjugate pair, the program displays:
D_47MpC2
  1. Press { Re } and { Im } to display the real and imaginary parts of the complex conjugate pair.
  2. Press { ESC }.
    The program proceeds in one of two ways.
    • If the roots are not the last two roots of the polynomial, the program displays SEE NEXT POLY?. Use the procedure described in "Selecting Options" below.
    • If all the roots have been found, the program returns to the FUNCTION ZEROS menu.

1 Real, 2 Complex

If the equation has one real and a complex conjugate pair of roots, the program displays:
D_l7Blia(after scrolling is finished).
  1. Press { R3 } to display the real root.
  2. Press { Re } and { Im } to display the real and imaginary parts of the complex conjugate pair.
  3. Press { ESC } to return to the FUNCTION ZEROS menu.

Selecting Options

If the roots displayed are not the last roots of the polynomial, the program displays a menu to let you view the coefficients of the reduced polynomial.
D_ieIhpm
  • To return to the ENTER POLY? menu without viewing the coefficients, press { NO }.
  • To view the coefficients, press { YES } and follow the procedure in the next section below.

Displaying the Reduced Polynomial

When you press { YES }, the program displays the coefficients of the reduced polynomial, beginning with the coefficient of the highest-order term.
D_iTIFJL for example.
  1. Press { NXT } repeatedly to display each remaining coefficient.
  2. After all the coefficients have been displayed, pressing { NXT } returns you to the SEE NEXT POLY? menu.


Back