Source
> A := matrix( [ [ 2, 2 ], [ 1, 3 ] ] );
>
> charpoly( A, lambda );
> eigenvals( A );
With two positive eigenvalues, the origin is a source for this system.
>
> eigenvects( A );
>
The straight-line solutions are:
> Y1 := exp(4*t) * matrix( 2, 1, [ 1, 1 ] );
> Y2 := exp(t) * matrix( 2, 1, [ -2, 1 ] );
>
> ode1 := diff( x(t), t ) = 2*x(t) + 2*y(t);
> ode2 := diff( y(t), t ) = x(t) + 3*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.25, y(0)=-0.1 ], [ x(0)=0.5, y(0)=-0.2 ], [ x(0)=1, y(0)=-0.4 ],
[ x(0)=0.25, y(0)=-0.2 ], [ x(0)=0.5, y(0)=-0.3 ], [ x(0)=1, y(0)=-0.6 ],
[ x(0)=-0.25, y(0)=0.1 ], [ x(0)=-0.5, y(0)=0.2 ], [ x(0)=-1, y(0)=0.4 ],
[ x(0)=-0.25, y(0)=0.2 ], [ x(0)=-0.5, y(0)=0.3 ], [ x(0)=-1, y(0)=0.6 ] ]:
> solPLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, IC, arrows=NONE, stepsize=0.1, linecolor=GREEN ):
> #solPLOT;
>
>
ICline := [ [ x(0)=0.1, y(0)=0.1], [ x(0)=-0.1, y(0)=-0.1 ],
[ x(0)=0.2, y(0)=-0.1 ], [ x(0)=-0.2, y(0)=0.1 ] ]:
> linePLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, ICline, arrows=NONE, linecolor=BLUE ):
> #linePLOT;
>
> display( [ dirPLOT, solPLOT, linePLOT ], title=`Example of Source` );
Notice how the solutions become parallel to the eigenvector for the larger eigenvalue. The different sizes of the eigenvalues can also be seen by noting the relative length of the two straight-line solutions.
>