function [wN] = hw7afn(t0,w0,h,N)

   w = w0;
   t = t0;
   for k = 1:N
      wstar = w+h/2*f(t,w);
      w = w+h*f(t+h/2,wstar);
      t = t+h;
   end
   wN = w;

end
