Skip to content

Bairstow's Method

Oscar Veliz edited this page Aug 5, 2022 · 3 revisions

Bairstow's Method video

The video covering Bairstows's Method can be found at https://youtu.be/iUGEk6kngFw. Example code is given in Bairstow.py file, written in Python. You can run the program online from http://tpcg.io/844BYG (although fractals may not be accessible from the server). To run the program locally have Python installed (https://www.python.org/) then type python Bairstow.py in the terminal in the directory where it is saved.

Special Installation Instructions

You may also need to install Python and Numpy and matplotlib which can be done by running the command pip install numpy matplotlib once Python is installed.

Example Polynomials

Polynomials for are saved as lists for examle the list [1,-1,-1] represents the polynomial x² - x - 1 and can be solved using the function allRoots like allRoots([1, 0, 0, 0, 15, 0, 0, 0, -16]). Fractals can be created using the function fractal in the same way, fractal([1, 0, 0, 0, 15, 0, 0, 0, -16]) and are saved inside the file BairstowFractal.png.

Fractal Examples

x^8+15x^4-16

x^8+15x^4-16

x^3-1

x^3-1

x^4 + 1

x^4+1

Reference links: