Systems of ODEs, Repeated Real Eigenvalues, 2 by 2

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

How to solve systems of ordinary differential equations, using eigenvalues, repeated real eigenvalues/eigenvectors worked-out example problem

You may be asked to solve systems of ordinary differential equations simultaneously.

Let’s do an example where the characteristic polynomial gives repeated real eigenvalues.

If you’re not sure what we’re talking about, we suggest you look at other examples we have where we solve a system of 2 ODEs, we have the easiest case where you have real eigenvalues, and another case where you have complex (real and imaginary) eigenvalues.

Example problem: Solve the system of ODEs, \(x’ = \left[ {\begin{array}{*{20}{c}}3&{ – 18}\\2&{ – 9}\end{array}} \right]x\)

Find the eigenvalues by finding \(\det \left( {A – \lambda I} \right)\)

\[\det \left( {A – \lambda I} \right) = \left| {\begin{array}{*{20}{c}}{3 – \lambda }&{ – 18}\\2&{ – 9 – \lambda }\end{array}} \right|\]

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

\[{\lambda _1} = {\lambda _2} = – 3\]

Substitute the eigenvalue into \({A – \lambda I}\) and find the first eigenvector, let’s use k’s to represent intermediate variables.

\[\left[ {\begin{array}{*{20}{c}}2&{ – 6}\\2&{ – 6}\end{array}} \right]\left[ {\begin{array}{*{20}{c}}{{k_1}}\\{{k_2}}\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}0\\0\end{array}} \right]\]

\[2{k_1} – 6{k_2} = 0\]

Note, we divided the first row by a factor of 3.

You can choose one of the variables, and when choosing it’s best to keep it simple. Choose \({k_2}\) to be 1 to get \({k_1}\) to be 3.

\[{K_1} = \left[ {\begin{array}{*{20}{c}}3\\1\end{array}} \right]\]

We need to find a second eigenvector. Let’s choose p to represent more variables.

Put the eigenvector you found onto the right-hand side of the following equation,

\[\left( {A + 3I} \right)P = K\]

\[\left[ {\begin{array}{*{20}{c}}6&{ – 18}\\2&{ – 6}\end{array}} \right]\left[ {\begin{array}{*{20}{c}}{{p_1}}\\{{p_2}}\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}3\\1\end{array}} \right]\]

You can choose anything for the second eigenvector, but keep it simple. We chose \({p_1} = \frac{1}{2}\), so then \({p_2} = 0\).

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

The solution will be in the following form, be careful and memorize the structure below (the second term has the second eigenvector, but you also need to multiply by an extra t term in the first eigenvector of the second term):

\[x = {c_1}\left[ {\begin{array}{*{20}{c}}3\\1\end{array}} \right]{e^{ – 3t}} + {c_2}\left( {\left[ {\begin{array}{*{20}{c}}3\\1\end{array}} \right]t{e^{ – 3t}} + \left[ {\begin{array}{*{20}{c}}{\frac{1}{2}}\\0\end{array}} \right]{e^{ – 3t}}} \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)
A = [3 -18; 2 -9];
B = [0; 0];
Y = [x1; x2];
odes = diff(Y) == A*Y + B
[x1Sol(t), x2Sol(t)] = dsolve(odes)
x1Sol(t) = simplify(x1Sol(t))
x2Sol(t) = simplify(x2Sol(t))

Try solving some single differential equations next by clicking here!

Click here to return to the Math Guides hubpage

Leave a Comment