Systems of ODEs, Real Repeated Eigenvalues, 3 by 3

Home»Math Guides»Solving systems of ODEs (ordinary differential equations), real distinct eigenvalues, 3 equations (3 by 3 matrix)

How to solve systems of ordinary differential equations, using eigenvalues, real repeated eigenvalues (3 by 3 matrix) worked-out example problem

Here we will solve a system of three ODEs that have real repeated eigenvalues.

You may want to first see our example problem on solving a two system of ODEs that have repeated eigenvalues, we explain each step in further detail.

Example problem: Solve the system of ODEs, \(x’ = \left[ {\begin{array}{*{20}{c}}2&1&6\\0&2&5\\0&0&2\end{array}} \right]x\)

First find \(\det \left( {A – \lambda I} \right)\).

To find that determinant, you need to break up the 3 by 3 matrix into smaller 2 by 2 matrices, see our guide to finding higher-order determinants.

You will obtain the following characteristic polynomial:

\[{\left( {\lambda – 2} \right)^3} = 0\]

So 2 is an eigenvalue of multiplicity three.

Let K represent the first eigenvector, first solve for:

\[\left( {A – 2I} \right)K = 0\]

\[\left[ {\begin{array}{*{20}{c}}0&1&6\\0&0&5\\0&0&0\end{array}} \right]\left[ {\begin{array}{*{20}{c}}{{k_1}}\\{{k_2}}\\{{k_3}}\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}0\\0\\0\end{array}} \right]\]

You can choose some of the k values, but you should keep them simple, try to get unit vectors if possible.

We use the first row, set \({k_3} = 0\), \({k_1}\) can be anything because it’s a free variable, so set \({k_1} = 1\), and \({k_2} = 0\) so that the right-hand side equals 0.

\[K = \left[ {\begin{array}{*{20}{c}}1\\0\\0\end{array}} \right]\]

We will use P and Q to represent the second and third eigenvectors, respectively, and lowercase will represent their components that make up the vector.

For the second eigenvector, solve \(\left( {A – 2I} \right)P = K\)

\[\left[ {\begin{array}{*{20}{c}}0&1&6\\0&0&5\\0&0&0\end{array}} \right]\left[ {\begin{array}{*{20}{c}}{{p_1}}\\{{p_2}}\\{{p_3}}\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}1\\0\\0\end{array}} \right]\]

We use the second row, \(5{p_3} = 0\), so \({p_3} = 0\), and you can choose anything else since they’re free variables, so we chose \({p_1} = 0\) and \({p_2} = 1\).

\[P = \left[ {\begin{array}{*{20}{c}}0\\1\\0\end{array}} \right]\]

For the third eigenvector, solve \(\left( {A – 2I} \right)Q = P\)

\[\left[ {\begin{array}{*{20}{c}}0&1&6\\0&0&5\\0&0&0\end{array}} \right]\left[ {\begin{array}{*{20}{c}}{{q_1}}\\{{q_2}}\\{{q_3}}\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}0\\1\\0\end{array}} \right]\]

We used the first row to get,

\[Q = \left[ {\begin{array}{*{20}{c}}0\\{ – 6}\\1\end{array}} \right]\]

Remember there is no one answer because you can make the vectors however you want, but just try to keep it simple.

If your instructor wants everything to have the same answer, then they would give an initial condition, the initial condition allows you to solve for the constants and makes everybody have the same end result.

In this case we didn’t have an initial condition for this problem, but the final step is just arithmetic and matrix-solving for the constants.

Memorize the following structure for repeated root solutions!

The first term has the first eigenvector, the second term has the first two eigenvectors but the first eigenvector is multiplied by t, and the third term has all three eigenvectors, but the first is multiplied by t twice, and the second is multiplied by t once.

The final solution is:

\[x(t) = {c_1}\left[ {\begin{array}{*{20}{c}}1\\0\\0\end{array}} \right]{e^{2t}} + {c_2}\left( {\left[ {\begin{array}{*{20}{c}}1\\0\\0\end{array}} \right]t{e^{2t}} + \left[ {\begin{array}{*{20}{c}}0\\1\\0\end{array}} \right]{e^{2t}}} \right) + {c_3}\left( {\left[ {\begin{array}{*{20}{c}}1\\0\\0\end{array}} \right]{t^2}{e^{2t}} + \left[ {\begin{array}{*{20}{c}}0\\1\\0\end{array}} \right]t{e^{2t}} + \left[ {\begin{array}{*{20}{c}}0\\{ – 6}\\1\end{array}} \right]{e^{2t}}} \right)\]

Solving the system of ODEs using MATLAB, double check your solution is correct!

Most of the time the answers to these questions will have analytical solutions (you can represent the answers perfectly using equations) if your instructor asked you to do them by hand.

If the system of ODEs have analytical solutions, you can use the symbolic variables in MATLAB and its “dsolve” command to get the answer, you don’t even have to have initial conditions, it will generate constants for you. 

You can replace the constants in the matrix with what you have, think of the script as an easy calculator for systems of ODEs. “B” is just a matrix of non-homogeneous terms, if you have those, but here we don’t have that so it’s just a zero vector.

%bai-gaming.com/math-guides
syms x1(t) x2(t) x3(t)
A = [2 1 6; 0 2 5; 0 0 2];
B = [0; 0; 0];
Y = [x1; x2; x3];
odes = diff(Y) == A*Y + B
[x1Sol(t), x2Sol(t), x3Sol(t)] = dsolve(odes)
x1Sol(t) = simplify(x1Sol(t))
x2Sol(t) = simplify(x2Sol(t))
x3Sol(t) = simplify(x3Sol(t))

Try a system of ODEs with complex (real and imaginary) eigenvalues solved problem next! 

Try solving some single differential equations next by clicking here!

Click here to return to the Math Guides hubpage

Leave a Comment