getf("sys_diff.sci");
//
// Exemple 1
//
xset("window",0);xbasc();
// definition du systeme 
deff("yprim=F1(t,y)",..
    ["yprim1=y(2)";..
     "yprim2=-sin(y(1))";..
     "yprim=[yprim1;yprim2]"]);
XY0 = [[0;1],[-2;2],[2;-2]];
tmax = 7; pas = 0.01;
champxy(F1,XY0,tmax,0.01);
//
// Exemple 2
//
xset("window",1);xbasc();
// definition du systeme 
deff("yprim=F2(t,y)",..
    ["yprim1=-y(1)-2*y(2)/log(y(1)^2+y(2)^2)";..
     "yprim2=-y(2)+2*y(1)/log(y(1)^2+y(2)^2)";..
     "yprim=[yprim1;yprim2]"]);
XY0 = [[3;3],[3;-3],[-3;3],[-3;-3]];
tmax = 1.4; pas = 0.001;
champxy(F2,XY0,tmax,0.01);
//
// Exemple 3
//
xset("window",2);xbasc();
// definition du systeme 
deff("yprim=F3(t,y)",..
    ["yprim1=-(y(1))^2-y(2)";..
     "yprim2=-y(1)+(y(2))^2";..
     "yprim=[yprim1;yprim2]"]);
XY0 = [[4;2],[-1;0],[2;-4],[-2;-4]];
tmax = 0.6; pas = 0.01;
champxy(F3,XY0,tmax,0.01);
//
// Exemple 4 (Lotka-Volterra)
//
xset("window",3);xbasc();
// definition du systeme 
deff("yprim=F4(t,y)",..
    ["yprim1=4*y(1)-2*y(1)*y(2)";..
     "yprim2=-y(2)+3*y(1)*y(2)";..
     "yprim=[yprim1;yprim2]"]);
XY0 = [[1;1],[1.5;1.5],[2;2],[2.5;2.5]];
tmax = 5; pas = 0.01;
champxy(F4,XY0,tmax,0.01);
 








