Use a for loop with a simple implementation of the Newton-Raphson method.

Code:

clear;clc;
x = 2;%initial guess
iters = 10;%num of iterations
h = 1e-6;%step size
f = @(x) ((5-x.^2)/2).^(1/3)-(x.^3+x);
i = 0;
while i <= iters;
fprintf('Iteration %g : x = %0.3f\n',i,x)
df = (f(x+h)-f(x))/h;
x = x-f(x)/df;
i = i + 1;
end

Results in:

Code:

Iteration 0 : x = 2.000
Iteration 1 : x = 1.345
Iteration 2 : x = 0.959
Iteration 3 : x = 0.814
Iteration 4 : x = 0.795
Iteration 5 : x = 0.795
Iteration 6 : x = 0.795
Iteration 7 : x = 0.795
Iteration 8 : x = 0.795
Iteration 9 : x = 0.795
Iteration 10 : x = 0.795

Elbarto