Example with
> A := matrix( [ [ 2, 4 ], [ 3, 6 ] ] );
>
> charpoly( A, lambda );
> eigenvals( A );
Since zero is an eigenvalue, there will be a line of equilibrium solutions for this system. Since the other eigenvalue is positive, all other solutions will converge (along straight lines) to an equilibrium solution - not necessarily the origin.
>
> eigenvects( A );
>
The straight-line solutions are:
> Y1 := exp(8*t) * matrix( 2, 1, [ 2, 3 ] );
> Y2 := exp(0*t) * matrix( 2, 1, [ -2, 1 ] );
>
> ode1 := diff( x(t), t ) = 2*x(t) + 4*y(t);
> ode2 := diff( y(t), t ) = 3*x(t) + 6*y(t);
> MODEL := { ode1, ode2 }:
> VARS := { x(t), y(t) }:
> DOMAIN := t=0..1:
> RANGE := x=-2..2, y=-2..2:
> dirPLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, arrows=MEDIUM ):
> dirPLOT;
>
>
IC := [ [ x(0)=-0.8, y(0)=0.8 ], [ x(0)=-1.2, y(0)=0.2 ],
[ x(0)=1.2, y(0)=-0.3 ], [ x(0)=0.8, y(0)=-0.8 ],
[ x(0)=-1.8, y(0)=1.3 ], [ x(0)=-2.2, y(0)=0.7 ],
[ x(0)=2.2, y(0)=-0.7 ], [ x(0)=1.8, y(0)=-1.3 ] ]:
> solPLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, IC, arrows=NONE, stepsize=0.1, linecolor=GREEN ):
> #solPLOT;
>
>
ICline := [ [ x(0)=0.2, y(0)=0.3], [ x(0)=-0.2, y(0)=-0.3 ],
[ x(0)=-2, y(0)=1 ], [ x(0)=2, y(0)=-1 ],
[ x(0)=-1, y(0)=0.5 ], [ x(0)=1, y(0)=-0.5 ] ]:
> linePLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, ICline, arrows=NONE, linecolor=BLUE ):
> #linePLOT;
>
> display( [ dirPLOT, solPLOT, linePLOT ], title=`Example of Sink` );
Notice how the solutions travel along paths that are parallel to the eigenvector for the non-zero eigenvalue and the line of equilibrium solutions conicides with the direction of the zero eigenvalue.
>