Complex Boundaries of Newton's Method

Dr. Frank Wang

This worksheet creates the image represents the way Newton's method for solving equations leads from different starting points to one of four possible solutions (in this case the equation is x^4-1 = 0 .  The attracting pull of four points, in the four dark holes, creates "basins of attraction," each a different color, with a complicated fractal boundary.  

> restart:

> newton := proc(x,y)

>   local z, m;

>   z := x+I*y;

>   for m from 0 to 50 while abs(z^4-1) >= 1e-3 do

>     z := z - (z^4-1)/(4*z^3);

>   end do;

>   m

> end:

> plot3d(0, -1.2..1.2, -1.2..1.2, orientation=[-90,0], grid=[250, 250], style=patchnogrid, scaling=constrained, color=newton);

[Plot]

> plot3d(newton/30, -1.2..1.2, -1.2..1.2, grid=[250, 250], style=patchnogrid, scaling=constrained, color=newton);

[Plot]

>