Systems of Differential Equations

The system

                    [ 1  1 ]
              U' =  [      ]  .  U
                    [ 4  1 ]

can be entered as

plotdf -ode { D(x,t) = x + y; D(y,t) = 4*x+ y } -xradius 4

When you click at a point say

[x,y] = [1,2]
then
you are finding the trajectory through that point. Note in the above
plot the special directions corresponding to the eigenvectors of the
matrix.

We can calculate the eigenvalues by solving the characteristic equation:

solve((determinant(matrix([1,1],[4,1]) - r*ident(2)))) returns
[R = 3, R = - 1]

If the eigenvalues are complex we have a different situation:

plotdf -ode { D(x,t) = x + -y; D(y,t) = 4*x+ y }

solve(determinant(matrix([1,-1],[4,1]) - r*ident(2))) returns
[R = 1 - 2 %I, R = 2 %I + 1]

Why does the curve rotate in the positive direction?

plotdf -ode { D(x,t) = x + y; D(y,t) = -4*x + y } -xradius 4

An almost linear system:

plotdf -ode { D(x,t) = 1 - x*y; D(y,t) = x -y**3 } -xradius 2 -yradius 2

Comparing two methods of looking at the system

            D[x,t]= y, D[y,t]= -sin(x) - 0.1* y

First we look at the trajectory through the point (x,y) = (0,3).
If you follow the trajectory it eventually seems to circle around the
point (0,13).

plotdf -ode { D(x,t)= y; D(y,t)= -sin(x) - 0.1* y} -xcenter 8 -xradius 8 \ -ycenter 3 -yradius 8

If we look at the same equation with the same inital conditions
(0,3) (in fortran notation!), then we see the 'line 1' (representing 'x')
tending to 13 and the 'line 2' representing 'y' tending to 0.

function xdot = pend(x,t) xdot(1) = x(2); xdot(2) = -sin( x(1)) - 0.1*x(2); end sol=lsode( "pend",[0.0, 3.0], t = linspace(0,40, 200)); plot( t, sol);

Tools for Computation of eigenvalues and eigenvectors

Two useful functions in maxima are: