Figures 3.1 and 3.3
> ode1 := diff( x(t), t ) = y(t);
> ode2 := diff( y(t), t ) = -x(t);
> MODEL := { ode1, ode2 }:
> VARS := { x(t), y(t) }:
> DOMAIN := t=0..10:
> RANGE := x=-2..2, y=-2..2:
> IC := [ [ x(0)=0.6, y(0)=0 ], [ x(0)=1.2, y(0)=0 ], [ x(0)=1.8, y(0)=0 ] ]:
> dirPLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, arrows=MEDIUM ):
> #dirPLOT;
> solPLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, IC, arrows=NONE, stepsize=0.1, linecolor=GREEN ):
> #solPLOT;
> display( [ dirPLOT, solPLOT ], title=`Figure 3.1` );
>
> xPLOT := DEplot( MODEL, VARS, DOMAIN, [ IC[3] ], scene=[t,x], arrows=NONE, stepsize=0.1, linecolor=GREEN ):
> yPLOT := DEplot( MODEL, VARS, DOMAIN, [ IC[3] ], scene=[t,y], arrows=NONE, stepsize=0.1, linecolor=BLUE ):
> display( [ xPLOT, yPLOT ], title=`Figure 3.3` );
>