Question: Newtons method to Secant method in maple.

Im have alittle trouble with my secant method code. and was wondering if could get some help on the matter.

Secant:=proc(f,x0,tol)
fp=diff(f,x);
fp2=diff(f,x)-1;
guess0=x0;
guess1:=evalf(guess0-subs(x=guess0,fp)/subs(x=guess0,limit((fp-fp2)/guess0-guess1),x=guess1)); count:=1;
while abs(guess0-guess1)>tol do
guess0:=guess1;
guess1:=evalf(guess0-subs(x=guess0,fp)/subs(x=guess0,limit((fp-fp2)/guess0-guess1),x=guess1)); count:=count+1;
end;
guess1;count;
end:

im sort of new with numercal analysis.

Please Wait...