John K. answered 06/28/15
Tutor
4.9
(13)
Math and Engineering Tutor, Professional Engineer
Newton's method in computer form is x = x - f(x)/f'(x) or in this case x1= x0 - (x0^2 - 2) / (2*x0). In MATLAB12.
% Newtons Method
x = zeros(1,10);
x(1,1) = 1.33;
for i = 1:10;
x(1,i+1) = x(1,i) - ((x(1,i)^2 - 2)) / (2*x(1,i));
end
disp(x(1,10));
end
x = zeros(1,10);
x(1,1) = 1.33;
for i = 1:10;
x(1,i+1) = x(1,i) - ((x(1,i)^2 - 2)) / (2*x(1,i));
end
disp(x(1,10));
end
This will give the the sqrt(2) correct to at least four places after several iterations. I don't know what your algorithm will produce or how you derived it. If the algorithm converges then Xn+1 = Xn. Upon substituting in the iteration Xn+1 = 0.
I don't think your algrithm converges.
Sauske K.
07/24/15