function [p] = hw1bfn(a, b, N)

   fa = hw1afn(a);
   for n = 1:N
      p = (a+b)/2;
      fp = hw1afn(p);
      if fa*fp <= 0
         b = p;
      else
         a = p;
         fa = fp;
      end
   end

end
