Example with [Maple Math]

> A := matrix( [ [ 2, 1 ], [ -1, 4 ] ] );

[Maple Math]

>

> charpoly( A, lambda );

[Maple Math]

> eigenvals( A );

[Maple Math]

Notice that the eigenvalues are positive - so the origin is a source - but the eigenvalue is repeated.

>

> eigenvects( A );

[Maple Math]

Note that there is only one eigenvector for this matrix.

>

The straight-line solutions are:

> Y1 := exp(3*t) * matrix( 2, 1, [ 1, 1 ] );

[Maple Math]

>

> V1 := matrix( 2, 1, [ 1, 1 ] );

[Maple Math]

> V2 := matrix( 2, 1, [ v1, v2 ] );

[Maple Math]

> eqn := evalm( A &* V2 - ( 3*V2 + V1 ) );

[Maple Math]

> soln := solve( { -v1+v2-1 = 0 }, { v1, v2 } );

[Maple Math]

> V2 := subs( soln , v2=1, evalm(V2) );

[Maple Math]

>

> Y2 := exp(3*t) * evalm( t * V1 + V2 );

[Maple Math]

>

> ode1 := diff( x(t), t ) = 2*x(t) + y(t);

> ode2 := diff( y(t), t ) = -x(t) + 4*y(t);

> MODEL := { ode1, ode2 }:

[Maple Math]

[Maple Math]

> VARS := { x(t), y(t) }:

> DOMAIN := t=0..3:

> RANGE := x=-2..2, y=-2..2:

> dirPLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, arrows=MEDIUM ):

> dirPLOT;

>

> IC := [ [ x(0)=0.5, y(0)=0.4 ], [ x(0)=0.1, y(0)=0.05 ], [ x(0)=0.01, y(0)=0.005 ],
[ x(0)=0.5, y(0)=0.6 ], [ x(0)=0.1, y(0)=0.15 ], [ x(0)=0.01, y(0)=0.015 ],
[ x(0)=-0.5, y(0)=-0.4 ], [ x(0)=-0.1, y(0)=-0.05 ], [ x(0)=-0.01, y(0)=-0.005 ],
[ x(0)=-0.5, y(0)=-0.6 ], [ x(0)=-0.1, y(0)=-0.15 ], [ x(0)=-0.01, y(0)=-0.015 ] ]:

> 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 ] ]:

> linePLOT := DEplot( MODEL, VARS, DOMAIN, RANGE, ICline, arrows=NONE, linecolor=BLUE ):

> #linePLOT;

>

> display( [ dirPLOT, solPLOT, linePLOT ], title=`Example of Repeated Eigenvalues (Source)` );

>