The polynomial (f(z)=z^{4}-1) has four roots: at (1,-1, i), and (-i). We can find the roots using

Question:

The polynomial \(f(z)=z^{4}-1\) has four roots: at \(1,-1, i\), and \(-i\). We can find the roots using Newton's method in the complex plane: \(z_{k+1}=z_{k}-f\left(z_{k}ight) / f^{\prime}\left(z_{k}ight)\). Here, \(f(z)=z^{4}-1\) and \(f^{\prime}(z)=4 z^{3}\). The method converges to one of the four roots, depending on the starting point \(z_{0}\). Write a Comp1ex and Picture client NewtonChaos that takes a command-line argument \(n\) and creates an \(n\)-by- \(n\) picture corresponding to the square of size 2 centered at the origin. Color each pixel white, red, green, or blue according to which of the four roots the corresponding complex number converges (black if no convergence after 100 iterations).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: