Steffensen's method: Difference between revisions

Content deleted Content added
inserted tolerance parameter in Python code: Zero tolerance doesn't work in many cases
m If we replace the variables p1 and p2 in the last formula this would not give the steffensen iterate. Now it is fixed.
Line 80:
% This is so that if the method fails to converge, we won't
% be stuck in an infinite loop.
p1 = f(p0) + p0; % calculate the next two guesses for the fixed point.
p2 = f(p1) + p1;
p = p0-(p1-p0)^2/(p2-2*p1+p0) % use Aitken's delta squared method to
% find a better approximation to p0.