function [x1,x2,y1,y2,iter]=FAUSSEPOSITIONtestarret(epsilon,init1,init2,f,Niter)
x1 = init1; x2 = init2; e = x2 - x1; iter = 0; 
while iter < Niter & e > epsilon
   x1old = x1; x2old = x2;   
   delta = f(x2) - f(x1);  
   if delta == 0 
      x1 = x1; x2 = x2;  
   else 
      y  = x2 - (f(x2) .* (x2-x1))./delta ;  
      fy = f(y).* f(x1);  
      if fy < 0
         x1 = x1; x2 = y; 
     else 
         x1 = y; x2 = x2; 
     end
     e = max(x1-x1old,x2old-x2); iter = iter +1;  
   end  
end
y1 = f(x1); y2 = f(x2);  
endfunction 
