function [xvals yvals]=ImprovedEulerMethod(f,xmin,xmax,steps,y0)
	 xvals=linspace(xmin,xmax,steps+1);
	 h=(xmax-xmin)/steps;
	 x=xmin;
	 y=y0;
	 yvals=[y];
	 for i=1:steps
	     slope1=f(x,y);
	     ynew=y+h*slope1;
	     slope2=f(xvals(i+1),ynew);
	     slope=(slope1+slope2)/2;
	     y=y+h*slope;
	     yvals=[yvals y];
	     x=xvals(i+1);
	 end
end
