Math 260 Eigenvalues and stability analysis of linear systems in the plane

Save your work regularly--you never know when Mathematica may crash.  

Email your completed file to tleise@amherst.edu by Monday 4pm.

Classifying the fixed point of a 2D linear system according to the eigenvalues

1) Both positive: unstable node
2) Both negative: asymptotically stable node
3) One positive and one negative: saddle point
4) Purely imaginary: center (closed orbits), which is Lyapunov stable
5) Complex-valued with positive real part: unstable spiral point
6) Complex-valued with negative real part: asymptotically stable spiral point

Matrices and eigenvalues in Mathematica

Matrices are entered into Mathematica by making a list of the rows of the matrix:

A={{0,1},{3,2}};
A//MatrixForm  (* don't save a matrix in MatrixForm, as calculations won't work properly *)

You can find the eigenvalues and eigenvectors of a matrix with the Eigensystem command, which lists the two eigenvalues followed by the associated eigenvectors.

Eigensystem[A]//MatrixForm

Column vector is the default type of vector:

{1,3}//MatrixForm

Observe that A times an eigenvector equals the eigenvalue times the eigenvector (where a period denotes matrix multiplication):

A.{1,3}//MatrixForm

A.{1,-1}//MatrixForm

Plotting trajectories in the plane in Mathematica

We can plot the vector field of the velocity vectors at each point to get a feel for what the trajectories will look like :

VectorPlot[{-4y,x+y},{x,-3,3},{y,-3,3}]

Then we can plot solutions of the system starting at different initial points, superimposed on the vector field (to see the direction of flow):

soln1=Flatten[DSolve[{x'[t]==-4y[t],y'[t]==x[t]+y[t],x[0]==1,y[0]==0},{x[t],y[t]},t],1]
soln2=Flatten[DSolve[{x'[t]==-4y[t],y'[t]==x[t]+y[t],x[0]==0,y[0]==2},{x[t],y[t]},t],1]
Show[ParametricPlot[{x[t],y[t]}/.soln1,{t,0,12.4},PlotStyle->Blue],ParametricPlot[{x[t],y[t]}/.soln2,{t,0,10},PlotStyle->Red],VectorPlot[{-4y,x+y},{x,-300,300},{y,-300,300}],PlotRange->All]

Exercises

Exercise 1.  Consider the system (OverDot[x])=-2x-2y, (OverDot[y])=-x-3y.
    (a) Find the eigenvalues of the matrix A corresponding to this system.
    (b) Classify the fixed point at the origin based on the eigenvalues.
    (c) Find solutions starting at the initial points (1,1), (-1,-1), (-1,1) and (1,-1).  Put the plot commands together in a Show command to get a single plot with the four trajectories and the vector field.

Exercise 2.  Consider the system (OverDot[x])=-x-y, (OverDot[y])=-y.
    (a) Find the eigenvalues of the matrix A corresponding to this system.
    (b) Classify the fixed point at the origin based on the eigenvalues.
    (c) Find solutions starting at the initial points (1,1), (-1,-1), (-1,1) and (1,-1).  Put the plot commands together in a Show command to get a single plot with the four trajectories and the vector field.

Exercise 3.  Consider the system (OverDot[x])=4y, (OverDot[y])=-9x.
    (a) Find the eigenvalues of the matrix A corresponding to this system.
    (b) Classify the fixed point at the origin based on the eigenvalues.
    (c) Find solutions starting at the initial points (1,0), (2,0), and (0,4), for a long enough time frame to see entire orbits.  Put the plot commands together in a Show command to get a single plot with the three trajectories and the vector field.

Exercise 4.  Consider the system (OverDot[x])=-x-2y, (OverDot[y])=2x-y.
    (a) Find the eigenvalues of the matrix A corresponding to this system.
    (b) Classify the fixed point at the origin based on the eigenvalues.
    (c) Find solutions starting at two different initial points.  Put the plot commands together in a Show command to get a single plot with the two trajectories and the vector field.

Exercise 5.  Consider the system (OverDot[x])=2x+3y, (OverDot[y])=-x-2y.
    (a) Find the eigenvalues of the matrix A corresponding to this system.
    (b) Classify the fixed point at the origin based on the eigenvalues.
    (c) Find solutions starting at (-0.03,0.01), (0.03,-0.01), (-2,2), (2,-2), (-2,1.8), (2,-1.8), (-2,2.1), and (2,-2.1), then combine into a single plot using the Show command.  Use an option like PlotRange->{{-3,3},{-3,3}} to get a good view of the trajectories.