# Phase portrait for a 2D system of ODEs

I have been asked to draw the phase portrait for the following system of ODEs $$A =\begin{bmatrix}-1 & -4\\1 & -1\end{bmatrix}$$, $$\frac{d\vec{y}}{dt} = A\vec{y}$$

I am able to characterise the phase portrait but I cannot seem to find a way to draw the exact behaviour of the system.

By calculating the trace to be $$-2$$ and the determinant to be $$5$$, I know that the phase portrait is an unstable spiral, but how would I know which direction the spiral goes in, which vectors are parallel to it etc.

The only method that seems valid to me is to just plug and chug certain vector values and see what happens to the gradient.

Is there any other way of easily identifying the behaviour from the eigenvectors or eigenvalues?

• Write out your system explicitly: $$x'(t)=-x-4y$$ $$y'(t)=x-y$$ Can you shade in the region of the $xy-$ plane where $x'(t)>0,y'(t)>0$? What about where $x'(t)>0,y'(t)<0$? What do these regions tell you above the flow velocity vectors?
– user801306
Commented Feb 23, 2021 at 14:06

It is definitely possible! Sorry for the late response, I just saw this.

In terms of a general sketch, you can do the following

Since the determinant is non-zero (calculated below), the equation $$A{\bf y}_0={\bf 0}$$ has only one solution, namely, the origin $${\bf y}_0=\left[\begin{array}{c}0\\0\end{array}\right]$$. So the system of ODEs only has one Equilibrium point at $${\bf y}_0$$.

In terms of classification, you can use the fact that for a 2x2 matrix

$$A=\left[\begin{array}{cc}-1&-4\\1&-1\end{array}\right]$$

the the invariants of the matrix are the trace $${\tt tr}(A)$$ and the determinant $${\tt det}(A)$$

$$p={\tt trace}(A)=a_{11}+a_{22}=-1-1=-2=\lambda_1+\lambda_2$$

$$q={\tt det}(A)=a_{11}a_{22}-a_{12}a_{21}=1-(-4)=5=\lambda_1\lambda_2$$

These two quantities, along with an additional quantity $$\Delta=p^2-4q$$ can be used to quickly classify the critical point.

$$\Delta=p^2-4q=(-2)^2-5=4-5=-1$$

So $$\Delta<0$$, $$p<0$$, and $$q>0$$ means that this is an asymptotically stable equilibrium point, i.e., the solutions are going to spiral in to the point.

Problem 18, Page 398 of the book "Elementary Boundary Value Problems" by Boyce, DiPrima and Meade has a great illustration of what this means in terms of the classification of the critical point. I put a red dot on the image showing where this system is classified.

Btw, this system is a linear homogeneous system and can be exactly solved. I will do this here but it is not needed for the classification that you are asking for (assuming that I understand you correctly)

Extra Content: Finding the Exact Solution

The eigenvalues are $$\lambda_1=-1-2i$$ and $$\lambda_1=-1+2i$$ which are complex and this means that the eigenvectors will also be complex. I am omitting the calculations, lmk if you need me to show these, they are $${\bf \xi_1}=\left[\begin{array}{c}-2i\\1\end{array}\right]=\left[\begin{array}{c}0\\1\end{array}\right]-i\left[\begin{array}{c}2\\0\end{array}\right]={\bf a}-i{\bf b}$$ and $${\bf \xi_2}=\left[\begin{array}{c}2i\\1\end{array}\right]=\left[\begin{array}{c}0\\1\end{array}\right]+i\left[\begin{array}{c}2\\0\end{array}\right]={\bf a}+i{\bf b}$$

It then follows that the following vector functions are linear independent real-valued solutions of the ODE system $${\bf u}(t)=e^{-t}\left({\bf a}\cos(2t)-{\bf b}\sin(2t)\right)=\left[\begin{array}{c}-2e^{-t}\sin(2t)\\e^{-t}\cos(2t)\end{array}\right]$$ $${\bf v}(t)=e^{-t}\left({\bf a}\sin(2t)+{\bf b}\cos(2t)\right)=\left[\begin{array}{c}2e^{-t}\cos(2t)\\e^{-t}\sin(2t)\end{array}\right]$$ This calculation can be found in the same book that I referenced earlier as equation (17) at the bottom of page 322.

This leads to the general solution of $${\bf y}(t)=c_1{\bf u}(t)+c_2{\bf v}(t)=\left[\begin{array}{c}2e^{-t}(-c_1\sin(2t)+c_2\cos(2t))\\e^{-t}(c_1\cos(2t)+c_2\sin(2t))\end{array}\right]$$

Where the constants $$c_1$$ and $$c_2$$ can be solved for using an initial condition.

I used some Python code that I wrote up to plot out the phase-plane for a grid of 100x100 initial conditions to show you what it looks like for $$t$$ from $$0$$ to $$3$$.

$$t=0$$ $$t=1$$ $$t=2$$ $$t=3$$

Animation

Let me know if you have any questions. I hope this helps.

Evaluate $$x^\prime, y^\prime$$ above the critical point and determine the slope of the vector field.