Here you will program the Newton-Raphson root finding method with details specified as fol-lows. Your code will continue performing iterations of this root finding method until it hasfound the root within the given tolerance. The function should return when it has found aroot for whichf(rt)is withintolof 0 (inclusive), or aftermaxiteriterations have beenperformed.

Respuesta :

Answer:

function [rt,n_iter]=newtonsMethod(f,df,x0,tol,max_iter)

rt=x0;

if(abs(f(rt))<tol)

n_iter=0;

return;

end

for i=1:max_iter

rt=x0-f(x0)/df(x0);

if(abs(f(rt))<tol)

break;

end

x0=rt;

end

n_iter=i;

end

Explanation:

Ver imagen akindeleot