clear all; clc; i = 0; % counter m = 100; % max number of iterations x0 = 3; while(i<=m) syms x y y = x^2-4; dy = diff(y); f = inline(dy)³ y = x0^2-4; x1 = x0-y/f(x0); x0 = x1; i = i+1; end x = x1