function [T,x] = bisect(f,a,b,eps)

k = 0;
x = (a+b)/2;
T(k+1,1:6)=[k,a,b,b-a,x,f(x)];
if f(a)*f(b) >= 0
    display('Sem troca de sinal')
else
    while (b-a) >= eps & abs(f(x)) >= eps
        if f(x)*f(b) < 0
            a = x;
        else
            b = x;
        end
        x = (a+b)/2;
        k = k+1;
        T(k+1,1:6)=[k,a,b,b-a,x,f(x)];
    end
end
x = (a+b)/2;