Question: Please help me with this Matlab problem. Thank you in advance. 4. We saw last week that Newton's method will work for complex roots if

Please help me with this Matlab problem. Thank you in advance.

Please help me with this Matlab problem. Thank you in advance. 4.We saw last week that Newton's method will work for complex roots

4. We saw last week that Newton's method will work for complex roots if we start with a complex initial guess. It's true. The simple polynomial P(z)23 1 has three roots 1,-12iv3, and-12x3 (you can check this with the roots comm and) (a) (4 points) Let's say our initial guess is of the form o = z + iy. Write a Newton's 1-i3 method function file that takes the real part x and the imaginary part y of an initial guess and returns a root p. To get you started with complex numbers in MATLAB, here are the first few lines for your function file: function s newton (x,y) %Newton's method with an initial guess x+iy f- e(z) z"3-1; %define the function and its derivative 1-sqrt(-1); %complex number i p(1)-x+I*y; Sthe first iterate Run your function with an initial guess Po = 0.25 + i0.5. What root do you get, and how many iterations are necessary? By the way, just typing i in MATLAB will work as V-1. We only suggested defining 1=sqrt (-1) as the imaginary number because we so often want to use i as an index instead (b) (6 points) We will plot the basin of attraction for this function. Set up arrays 4. We saw last week that Newton's method will work for complex roots if we start with a complex initial guess. It's true. The simple polynomial P(z)23 1 has three roots 1,-12iv3, and-12x3 (you can check this with the roots comm and) (a) (4 points) Let's say our initial guess is of the form o = z + iy. Write a Newton's 1-i3 method function file that takes the real part x and the imaginary part y of an initial guess and returns a root p. To get you started with complex numbers in MATLAB, here are the first few lines for your function file: function s newton (x,y) %Newton's method with an initial guess x+iy f- e(z) z"3-1; %define the function and its derivative 1-sqrt(-1); %complex number i p(1)-x+I*y; Sthe first iterate Run your function with an initial guess Po = 0.25 + i0.5. What root do you get, and how many iterations are necessary? By the way, just typing i in MATLAB will work as V-1. We only suggested defining 1=sqrt (-1) as the imaginary number because we so often want to use i as an index instead (b) (6 points) We will plot the basin of attraction for this function. Set up arrays

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!