Saddle
> A := matrix( [ [ 3, 0 ], [ 1, -2 ] ] );
>
> charpoly( A, lambda );
> eigenvals( A );
Since there is one positive and one negative eigenvalue, the origin is a saddle for this system.
>
> eigenvects( A );
>
The straight-line solutions are:
> Y1 := exp(-2*t) * matrix( 2, 1, [ 0, 1 ] );
> Y2 := exp(3*t) * matrix( 2, 1, [ 5, 1 ] );
>
> ode1 := diff( x(t), t ) = 3*x(t);
> ode2 := diff( y(t), t ) = x(t) - 2*y(t);
> MODEL := { ode1, ode2 }:
>
> VARS := { x(t), y(t) }:
> DOMAIN := t=0..3:
> RANGE := x=-10..10, y=-10..10:
> dirPLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, arrows=MEDIUM ):
> dirPLOT;
>
>
IC := [ [ x(0)=0.1, y(0)=1 ], [ x(0)=0.1, y(0)=4 ], [ x(0)=0.1, y(0)=7 ],
[ x(0)=-0.1, y(0)=1 ], [ x(0)=-0.1, y(0)=4 ], [ x(0)=-0.1, y(0)=7 ],
[ x(0)=0.1, y(0)=-1 ], [ x(0)=0.1, y(0)=-4 ], [ x(0)=0.1, y(0)=-7 ],
[ x(0)=-0.1, y(0)=-1 ], [ x(0)=-0.1, y(0)=-4 ], [ x(0)=-0.1, y(0)=-7 ] ]:
> solPLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, IC, arrows=NONE, linecolor=GREEN ):
> #solPLOT;
>
>
ICline := [ [ x(0)=0, y(0)=10 ], [ x(0)=0, y(0)=-10 ],
[ x(0)=0.5, y(0)=0.1 ], [ x(0)=-0.5, y(0)=-0.1 ] ]:
> linePLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, ICline, arrows=NONE, linecolor=BLUE ):
> #linePLOT;
>
> display( [ dirPLOT, solPLOT, linePLOT ], title=`Example of Saddle` );
Notice how these solutions move (essentially) straight down the y-axis before moving in the direction of the eigenvector corresponding to the positive eigenvalue.
>