Mathematics 285 Improved Euler's Method

restart;
f:=(s,t)->0.2*s*t;
x[0]:=1;
y[0]:=1;
n:=64;
h:=5.0/n;
for i from 0 to n-1 do
   x[i+1]:=x[0]+h*(i+1);
   yp:=y[i]+h*f(x[i],y[i]);
   y[i+1]:=0.5*(y[i]+yp+h*f(x[i+1],yp));
od:
plot([seq([x[i],y[i]],i=0..n)]);
Last Updated: Sat Sep 11 18:24:18 PDT 2004