function [x,iter] = DICHOTOMIEtestarret(epsilon,init1,init2,f,Niter)
x = init1; y = init2; iter = 0; e = (y-x)/2; 
  while iter < Niter & e > epsilon  
    c  = (x + y)/2; u  = f(x)*f(c); 
    if u <= 0
      x = x; y = c; 
    else 
      x = c; y = y; 
    end
    e = abs(y-x); 
    iter = iter +1;   
  end 
x = (x+y)/2; 
endfunction
