Mathematics 285 Euler's Method with Table

restart; 
f:=(x,y)->0.2*x*y; 
x[0]:=1; 
y[0]:=1; 
n:=5; 
h:=1.0/n; 
for i from 1 to n do 
   x[i]:=x[0]+h*i; 
   y[i]:=y[i-1]+h*f(x[i-1],y[i-1]); 
od: 
matrix([seq([x[i],y[i],yc(x[i]),
   abs(y[i]-yc(x[i])),
   abs((y[i]-yc(x[i]))/yc(x[i]))],i=0..n)]);
Last Updated: Fri Sep 10 12:09:47 PDT 2004