function [approx] = hw1afn(a,b,N)

   fa = hw1f(a);
   for n = 1:N+1
      cut = (a+3*b)/4;
      approx = (2*a+b)/3;
      fcut = hw1f(cut);
      if fa*fcut <= 0
         b = cut;
      else
         a = cut;
         fa = fcut;
      end       
   end

end

