Solving system of differential equations, checking for stability and plotting the result

dynamical systemsordinary differential equationsstability-theory

I am trying to solve the following system, but I am not sure if I am doing it properly

\begin{equation}
\mathbf{\dot{y}} = \mathbf{Ay} \text{ where } \mathbf{A} = \begin{bmatrix}
-2 & 1 \\
-1 & 0
\end{bmatrix}
\end{equation}

I learned that the solution will have general form:

\begin{equation}
x = \eta e^{r t}
\end{equation}

where $\eta$ is the eigenvector and $r$ the eigenvalue.

I calculated these using:

$$det(A- r I)\eta = 0$$
the eigenvalues are given by
\begin{equation}
det(A- r I) = 0 \implies r = -1.
\end{equation}

afterwards the eigenvector will be given by:
$$\left(\begin{pmatrix}-2&1\\ -1&0\end{pmatrix}-1\cdot \begin{pmatrix}1&0\\ 0&1\end{pmatrix}\right)\begin{pmatrix}
x\\
y\\

\end{pmatrix}=0$$

giving:

$ \begin{pmatrix}-1&1\\ -1&1\end{pmatrix} \begin{pmatrix}
x\\
y\\

\end{pmatrix}$
next this can be reduced by row echelon to $\begin{pmatrix}-1&1\\ 0&0\end{pmatrix}\begin{pmatrix}
x\\
y\end{pmatrix}= 0 \implies -x +y =0$
thus x=y

So the final solution would be:

$$x(t) = \begin{pmatrix}y\\ y \end{pmatrix}e^t$$.

Are my solutions correct or is there mistake somewhere? Also, how could I check for stability and plot the graph including the eigenvector the isoclines and some trajectories?

Best Answer

Your original system can be rewritten as:

$$\begin{bmatrix} \dot{y}_1 \\ \dot{y}_2 \end{bmatrix}=\begin{bmatrix} -2 & 1 \\ -1 & 0 \end{bmatrix} \begin{bmatrix} y_1 \\ y_2 \end{bmatrix}$$

Where $y_1=y_1(t)$, $y_2=y_2(t)$ are the functions to be found.

Let's consider a general system of linear ODEs with constant coefficients:

$$\dot{\vec{y}}=\hat{A} \vec{y}$$

Indeed, a partial solution to such a system can be expressed through the eigenvalues and eigenvectors of a square matrix $\hat{A}$ because:

$$\hat{A} \vec{a}_j=v_j \vec{a}_j$$

$$\vec{y}_j=\vec{a}_j e^{v_j t}$$

Where $\vec{a}_j$ and $v_j$ are eigenvectors and eigenvalues respectively. $j=1,...,n$ where $n$

Using this, we can write:

$$\dot{\vec{y}}_j=v_j\vec{a}_j e^{v_j t}=\hat{A} \vec{a}_j e^{v_j t}=\hat{A}\vec{y}_j$$

We can write the general solution as a combination of partial solutions for all eigenvalues and eigenvectors:

$$\vec{y}(t)=\sum_j^n C_j \vec{a}_j e^{v_j t}$$

For some arbitrary constants $C_j$.


Now eigenvalues for small $n$ are indeed found by solving the equation:

$$\det (\hat{A}-v\hat{I})=0$$

In this case the equation becomes:

$$(-2-v)(-v)+1=0 \\ v^2+2v+1=0 \\ (v+1)^2=0 \\ v=-1$$

We get a degenerate case, when the two eigenvalues are the same (repeated eigenvalues).

Because of that, for the general solution we need to take the following two vectors:

$$\vec{y}_1=\vec{a} e^{vt} \\ \vec{y}_2=(\vec{b}+\vec{a} t)e^{vt}$$

Where $\vec{b}$ is the solution of:

$$(\vec{A}-v \vec{I}) \vec{b}=\vec{a}$$

Why can we do that I leave for you to find in your lectures/textbooks.

This leaves us to find the eigenvector $\vec{a}=(a_1,a_2)^T$ for $v=-1$. We need to solve:

$$-2a_1+a_2=-a_1 \\ -a_1=-a_2$$

We get $a_1=c$, $a_2=c$ for some arbitrary constant $c$. Since we are searching for a partial solution we can take $c=1$.

The vector $\vec{b}$ is found from:

$$(-2+1) b_1+b_2=1 \\ -b_1+b_2=1$$

Again, we get multiple solutions, so I think we can choose whatever we want, like:

$$b_1=0 \\ b_2=1$$

The general solution can be expressed as:

$$\vec{y}(t)=C_1 \begin{bmatrix} 1 \\ 1 \end{bmatrix} e^{-t}+C_2 \left(\begin{bmatrix} 0 \\ 1 \end{bmatrix}+\begin{bmatrix} 1 \\ 1 \end{bmatrix} t \right) e^{-t}$$

For arbitrary constants $C_1,C_2$. We can check if it works by substitution:

$$\dot{\vec{y}}(t)=(C_2-C_1) \begin{bmatrix} 1 \\ 1 \end{bmatrix} e^{-t}-C_2 \left(\begin{bmatrix} 0 \\ 1 \end{bmatrix}+\begin{bmatrix} 1 \\ 1 \end{bmatrix} t \right) e^{-t}$$

$$\hat{A} \vec{y}=-C_1 \begin{bmatrix} 1 \\ 1 \end{bmatrix} e^{-t}+C_2 \left(\begin{bmatrix} 1 \\ 0 \end{bmatrix}-\begin{bmatrix} 1 \\ 1 \end{bmatrix} t \right) e^{-t}$$

The two expressions after simplification are equal, so our solution is correct.