Posted By:
31 Mar, 2013 11:12 am PDT

Calculate complex roots of a function using newton method in Matlab

I have a polynomial p(x) = x^2 - 3x^3 + 20x^2 + 44x +54.
This polynomial has a complex root near 2.5 +4.5i. I want to find the root using newton method

How can I do it in Matlab?



It is done in the same way as done with real roots, start with initial guess of complex root: 

clear all
%Defining initial values

x1 = 2.5 + 4.5*i;
tol = 1;

% loop to check tolerence
while(tol > 10^(-5))
    F_x1 = x1^4-3*x1^3+20*x1^2+44*x1+54;
    F_x1_dot = 4*x1^3-9*x1^2+40*x1+44;
    x2 = x1 - F_x1/F_x1_dot;
    tol = abs(x2-x1) ;

Please watch the video for details**********

Was it useful?  

Please login to reply to this problem.