Diagonalizable Systems of ODEs

As we saw in last class, the system $$ \frac{d}{dt}\vec{y} = A \vec{y}$$ has solutions in the form $\vec{y}(t) = e^{At}\vec{C}.$ If $A$ is a diagonalizable 2x2 matrix, then $$\vec{y}(t) = C_1 e^{\lambda_1 t}\vec{u}+C_2 e^{\lambda_2 t}\vec{v},$$ where $\vec{u}$ and $\vec{v}$ are eigenvectors of $A$ with eigenvaues $\lambda_1$ and $\lambda_2$ respectively.

Example: Find the unique solution to \begin{align} \frac{d}{dt} \begin{bmatrix}y_1\\ y_2 \end{bmatrix} = \begin{bmatrix}1 & 2 \\ 2 & 1 \end{bmatrix} \begin{bmatrix}y_1 \\ y_2 \end{bmatrix} && \vec{y}(0) = \begin{bmatrix}1 \\ 0\end{bmatrix} \end{align} We need t find the eigenvectors and associated eigenvalues for the matrix. Eigenvector-eigenvalue pairs satisfy $$ A \vec{u} - \lambda \vec{u}=(A-\lambda I)\vec{u} = 0,$$ which has non-zero solutions only if $\rm{det}(A - \lambda I)=0.$ Therefore, we find $\lambda$ that solves \begin{align} \rm{det}(A-\lambda I) &= \rm{det}\begin{bmatrix} 1-\lambda& 2 \\ 2 & 1-\lambda \end{bmatrix}\\ & = (1-\lambda)^2 -4 \\ 0 &= \lambda^2 - 2\lambda -3 \end{align} Therefore, the eigenvalues are $\lambda_1 = -1$ and $\lambda_2 = 3$.

The eigenvector associated with $\lambda_1= -1$ satisfies \begin{align} (A + I)\vec{u} &= 0 \\ \begin{bmatrix} 1+1 & 2 \\ 2 & 1+1\end{bmatrix}\begin{bmatrix}u_1 \\ u_2 \end{bmatrix} &= \begin{bmatrix} 0 \\ 0 \end{bmatrix}. \end{align} By design, this system has infinitely many solutions, so we will have to make a choice about one of $u_1$ or $u_2$. If we let $u_1=1$, then we have $$\begin{bmatrix} 2 & 2 \\ 2 & 2 \end{bmatrix}\begin{bmatrix} 1 \\ u_2 \end{bmatrix} = \begin{bmatrix} 2+ 2u_2\\ 2 + 2u_2 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}.$$ Therefore $u_2 = -1,$ and $\vec{u} = [1,-1]^T$.

Similarly, the eigenvector associated to $\lambda_2 = 3$ satisfies \begin{align} (A -3I)\vec{u} &= 0 \\ \begin{bmatrix} 1-3 & 2 \\ 2 & 1-3\end{bmatrix}\begin{bmatrix}u_1 \\ u_2 \end{bmatrix} &= \begin{bmatrix} 0 \\ 0 \end{bmatrix}. \end{align} Letting $v_1 =1$ gives $v_2 = 1$, and therefore $\vec{v} = [1,1]^T.$

Putting this all together, the general solution is $$ \vec{y}(t) = C_1 e^{-t}\begin{bmatrix}1 \\ -1\end{bmatrix}+ C_2 e^{3t}\begin{bmatrix}1\\-1\end{bmatrix}$$ We now use the initial conditions to find the values of $C_1$ and $C_2$. The initial conditions give us \begin{align} \vec{y}(0) &= C_1e^{0}\begin{bmatrix}1 \\ -1 \end{bmatrix} + C_2 e^{0}\begin{bmatrix}1 \\ 1 \end{bmatrix}\\ \begin{bmatrix} 1 \\ 0 \end{bmatrix} &= \begin{bmatrix} C_1+ C_2\\ C_1 - C_2\end{bmatrix}, \end{align} which indicates that $C_1 = C_2 = 1/2$. Therefore the unique solution is $$ \vec{y}(t) = \frac{1}{2}e^{-t}\begin{bmatrix} 1 \\ -1 \end{bmatrix} + \frac{1}{2}e^{3t}\begin{bmatrix} 1 \\ 1 \end{bmatrix}$$

Example: Find the general solution to the system \begin{align} \frac{d}{dt} \begin{bmatrix}y_1\\ y_2 \end{bmatrix} = \begin{bmatrix}1 & 2 \\ -2 & 1 \end{bmatrix} \begin{bmatrix}y_1 \\ y_2 \end{bmatrix} \end{align} Again, we start by finding the eigenvalues of the matrix. \begin{align} \rm{det}(A-\lambda I) &= \rm{det}\begin{bmatrix} 1-\lambda& 2 \\ -2 & 1-\lambda \end{bmatrix}\\ & = (1-\lambda)^2 +4 \\ 0 &= \lambda^2 - 2\lambda +5. \end{align} By the quadratic formula, we find $$ \lambda_{\pm} = \frac{2 \pm \sqrt{4-20}}{2} = 1 \pm 2i.$$ Notice that these eigenvectors are complex conjugates of one another, $\lambda_+ = \lambda_-^\dagger$.

The eigenvector associated with $\lambda_+= 1+2i$ satisfies \begin{align} (A -(1+2i)I)\vec{u} &= 0 \\ \begin{bmatrix} 1-(1+2i) & 2 \\ -2 & 1-(1+2i)\end{bmatrix}\begin{bmatrix}u_1 \\ u_2 \end{bmatrix} &= \begin{bmatrix} 0 \\ 0 \end{bmatrix}. \end{align} By design, there are infinitely many solutions, so letting $u_1 = 1$, we get $u_2 = i.$

Since $A$ is a real matrix, the other eigenvector satisfies $$ (A\vec{u})^\dagger = A\vec{u}^\dagger.$$ On the other hand, we have $$ (A\vec{u})^\dagger = (\lambda_+ \vec{u})^\dagger = \lambda_+^\dagger \vec{u}^\dagger = \lambda_- \vec{u}^\dagger.$$ Therefore the eigenvector associated with $\lambda_-$ is $\vec{v} = \vec{u}^\dagger = [1, -i ]^T.$ Putting this together, the general solution can be written as $$\vec{y}(t) = C_1 e^{(1+2i)t}\begin{bmatrix}1\\ i\end{bmatrix} + C_2 e^{(1-2i)t}\begin{bmatrix}1 \\ -i \end{bmatrix}.$$ However, the problem was initially posed to us with all real values, so we should really return our solution in terms of real numbers rather than complex ones. We can rearrange this solution by making use of Euler's identity, and by writing $$ \vec{u} = \begin{bmatrix} 1 \\ i \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \end{bmatrix} + i \begin{bmatrix} 0\\ 1 \end{bmatrix} = \vec{a}+i\vec{b}.$$ Similarly, $\vec{v} = \vec{a}-i\vec{b}$ for the same $\vec{a}$ and $\vec{b}$. Therefore \begin{align} \vec{y}(t) &= e^{t}(C_1 e^{2it}\vec{u}+C_2 e^{-2it}\vec{v})\\ &= e^{t}(C_1(\cos(2t)+i\sin(2t))(\vec{a}+i\vec{b})\\ &\quad+C_2(\cos(2t)-i\sin(2t))(\vec{a}-i\vec{b}))\\ &= e^{t}\big((C_1+C_2)\cos(2t)\vec{a} + (C_1-C_2)i\sin(2t)\vec{a}\\ &\quad + (C_1-C_2)i\cos(2t)\vec{b} -(C_1+C_2)\sin(2t)\vec{b}\big).\\ \end{align} Let $\widetilde{C_1}= C_1+C_2$ and $\widetilde{C_2} = (C_1-C_2)i$. Then the general solution is \begin{align} \vec{y}(t) &= e^{t}(\widetilde{C_1}\cos(2t)+\widetilde{C_2}\sin(2t))\vec{a}\\ &\quad+ e^{t} (\widetilde{C_2}\cos(2t)-\widetilde{C_1}\sin(2t))\vec{b} \end{align}

Practice Problems

Find the general solution to each system of ODEs

  1. $$\frac{d}{dt}\vec{y} = \begin{bmatrix} 2 & 4 \\ 1 & -1\end{bmatrix} \vec{y} $$
  2. $$\frac{d}{dt}\vec{y} = \begin{bmatrix} 0 & 4 \\ -1 & 0\end{bmatrix} \vec{y} $$
  3. $$\frac{d}{dt}\vec{y} = \begin{bmatrix} 1 & 4 \\ -1 & 1\end{bmatrix} \vec{y} $$