//  Euler comparaison cas exact
//
C=3;D=4;y0=5;
//
deff('ydot=f(t,y)','ydot=C*y+D')
deff('y=yex(t)','y=-D/C+(y0+D/C)*exp(C*t)')
//
T=3;
N=200;
h=T/N;
t=0:h:T;
//
y=y0;
//
Yapp=[y0]
for i=1:N
 y=y+h*f(t(i),y);
 Yapp=[Yapp,y]
end
figure(1)
clf()
plot(t,Yapp,'b-*');
//
tex=0:0.001:T;Yexacte=yex(tex);
plot(tex,Yexacte,'black-')
//
