Skip to content

Halley's Method

Oscar Veliz edited this page Nov 2, 2021 · 11 revisions

Table of Contents

Halley Fractal

Halley Fractal video

See Newton Fractal documentation.

The video covering Halley Fractals can be found here https://youtu.be/3WiVGSy_084. Code to generate these fractals is given in HalleyFractal.plt written in gnuplot. To run the program have gnuplot installed (gnuplot.info) then type gnuplot HalleyFractal.plt in the terminal in the directory where HalleyFractal.plt is saved. Alternatively, open the gnuplot app then go to File > Open and select the HalleyFractal.plt file, or from gnuplot cd to correct directory and then type load 'HalleyFractal.plt'. The fractal will be generated and stored in HalleyFractal.png and can take a while depending on the number of iterations, function complexity, and resolution. You can edit the .plt file using any text editor though I would recommend VS Code with the gnuplot syntax highlighting extension.

The following fractals were created using the following functions and settings normally centered at 0 + 0i with r of 2 and a 16:9 ratio.

z3 - 1

p(z) = z ** 3 - 1
dp(z) = 3 * z ** 2
ddp(z) = 6*z

z^3-1

a = 0.5

z^3-1

a = {0.5,0.5}

z^3-1

z8+15z4-16

p(z) = z**8 + 15*z**4 - 16
dp(z) = 8*z**7 + 60*z**3
ddp(z) = 56*z**6 + 180*z**2

z^8-15z^4+16

a = 0.5

z^8-15z^4+16

a = {0.5,0.5}

z^8-15z^4+16

centerx = .62
centeri = .619
r = .1

z^8-15z^4+16

arctan(z)

p(z) = atan(z)
dp(z) = 1 / (z**2 +1)
ddp(z) = (-2*z) / ((z**2+1)**2)

arctan

a = 0.5

arctan

a = {0.5,0.5}

arctan

sin(z)

p(z) = sin(z)
dp(z) = cos(z)
ddp(z) = -sin(z)

sin

a = 0.5

sin

a = {0.5,0.5}

sin

Colored Roots

See Newton Fractal documentation for details on how to isolate the portion that converges on a single root. Then use your favorite photo editor to remove the backgrounds, recolor, and then combine. z3-1 z8+15z4-16

Reference Links

Correction to Video

Video Mistakes and How to Fix Them

The example at 8:08 had an error with the programming of f'(x). The bug caused the numbers in the table and the plots for that example to be incorrect. There is a separate issue in that example where 2 was written as the input instead of -2. Also there is typo in the name Christopher Wren at 0:46.

Generalized Halley's Method

Generalized Halley's Method

The video covering Generalized Halley's method can be found here. Code is available here. The code can be run online (no installation needed) via octave-online. Similar instructions can be found here.

References:

  • "Abstract Padé-approximants for the solution of a sytem of nonlinear equations" by Cuyt and van der Cruyssen doi
  • "Konstruktion und Durchführung von Iterationsverfabren höherer Ordnung" by Ehrmann doi
  • "The Solution of Equations by Continued Fractions" by Frame doi
  • "Iterative Solution of Nonlinear Equations in Several Variables" by Ortega and Rheinboldt books.google.com