## Author: M Turhan ÇOBAN
## Created: 2021-10-25

function z = optimums_bisection(f,a,b)
    g=@(x)df(f,x);
    c=root_limits (g,a,b);
    n=length(c);
    for i=1:n
      x(i)=bisection2(g,c(i,1),c(i,2));
      y=df(g,x(i));
      if y>0 cond(i)=-1;    ## minimum
      elseif y<0 cond(i)=1; ## maximum
      else cond(i)=0;       ## extremum
      endif
      z(i,:)=[x(i) cond(i)]';
    endfor
endfunction
