# Solving System of ODEs Using Matrix Diagonalisation

I have been given the matrix $$A = \begin{bmatrix} -3 & -2 & 2 \\ 0 & 2 & 0 \\ -4 & -1 & 3 \\\end{bmatrix}$$.

I firstly needed to find the matrix $$P$$ that diagonalises it, so I found the eigenvalues of $$A$$, the corresponding eigenvectors and then constructed $$P$$ with columns being those eigenvectors. So, $$P=\begin{bmatrix} 1 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 2 & 1 \\\end{bmatrix}$$ (with the corresponding diagonal matrix $$\begin{bmatrix} -1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \\\end{bmatrix}$$).

I need to use these results to solve the following system of ODEs: $$x_1' =-3x_1 -2x_2 +2x_3$$ $$x_2' =2x_2$$ $$x_3' =-4x_1 -x_2 +3x_3$$ where $$x_i'=\frac{dx_i}{dt}$$.

Now I recognise that the coefficients in the system of ODEs correspond directly to the values of matrix $$A$$, however I am not sure how to use diagonalisation to solve it? I guess you could set up an equation where y $$=A$$x where y is a column vector $$[x_1', x_2', x_3']$$ and x is the column vector $$[x_1, x_2, x_3]$$, however I'm not sure how to go from here? I'm guessing I would use $$P$$?

Any guidance would be greatly appreciated.

## 3 Answers

Using the fact that $$A=PDP^{-1}$$ we can write the system as x'=$$A$$x=$$PDP^{-1}$$x or $$(P^{-1}x)^{'}=DP^{-1}x$$ so setting $$y=P^{-1}x$$ we solve $$y'=Dy$$ (which is easily solved). Then once we know y, use x=$$P$$y to find x.

$$\newcommand{\C}{\mathbb{C}}\newcommand{\R}{\mathbb{R}}$$Suppose you have a (time-independent!) matrix $$A\in \C^{n\times n}$$ and are looking for a solution $$x\colon I\to\C^n$$ to the linear ODE $$x^\prime(t)=Ax(t), x(0)=x_0.\hspace{3em} (1)$$

Step 1 First, calculate the Jordan Canonical Form $$J$$ and the transformation matrix $$T$$, so that $$T^{-1}AT=J$$.

Step 2 Consider now a solution $$z\colon I\to\C^n$$ to the linear ODE $$z^\prime(t)=Jz(t), z(0)=z_0.\hspace{3em} (2)$$ The function $$x\colon I\to\C^n, t\mapsto Tz(t)$$ is then a solution to (1) for inital value $$x_0=Tz_0$$: $$x^\prime(t)=Tz^\prime(t)=TJz(t)=(TJT^{-1})Tz(t)=Ax(t).$$

In your case the Jordan Canonical Form is diagonal, therefore the system (2) decouples and you can solve the three independent ODEs $$z_1^\prime(t)=-z_1(t), \\ z_2^\prime(t)=z_2(t),\\ z_3^\prime(t)=2z_3(t)$$ to obtain $$z(t)=\begin{pmatrix}e^{-t}&0&0\\0&e^{t}&0\\0&0&e^{2t}\end{pmatrix}z_0=\begin{pmatrix}z_{0,1}e^{-t}\\z_{0,2}e^{t}\\z_{0,3}e^{2t}\end{pmatrix}.$$ Multiply this by the transformation matrix $$T$$ to obtain the solution to your original ODE.

If the JCF is not diagonal there is a similar formula for the solution to (2).

$$X'=AX$$ where $$A = \begin{pmatrix} -3 & -2 & 2 \\ 0 & 2 & 0 \\ -4 & -1 & 3 \\\end{pmatrix}$$ Since you already have calculated the eignevalues $$\lambda_i$$ and the eigenvectors $$V_i$$ then the solution to the system is: $$X(t)=C_1e^{\lambda_1 t}V_1+C_2e^{\lambda_2 t}V_2+C_3e^{\lambda_3 t}V_3$$

• How did you derive this last equation? Jun 17, 2020 at 2:36
• @RubyPa It's a well known result for differential system. You have three distincts eigenvalues here. Jun 17, 2020 at 2:48