function [xsol,y]=secante(a,b,tol)

x(1)=a;
x(2)=b;
y=x;
while abs(x(2)-x(1))>tol
	x(3)=x(2) -(fun(x(2))*(x(2)-x(1))/(fun(x(2))-fun(x(1))));
	y=[y x(3)];
	x(1)=[];
end
xsol=x(2);
