Nonhomogeneous Systems of ODEs, Particular Solutions and Undetermined Coefficients

Home»Math Guides»Solving systems of ODEs (ordinary differential equations), non-homogeneous system of 2 equations

How to solve systems of ordinary differential equations, nonhomogeneous system of ODEs example

We’ve covered many examples of solving homogeneous systems of ODEs, which have right-hand-sides of “0”.

But what if your system of ODEs was non-homogeneous, or in other words, had constants, or anything else such as polynomials or trigonometry or logarithms?

All you need to do is find the homogeneous solution, then the particular solution, and add them together!

We strongly recommend you get practice finding “particular solutions” or the “method of undetermined coefficients”, we have a whole page of solved examples on the subject for single-system ODEs.

Doing this for systems of ODEs is the exact same, except now you need to write more constants in arrays and matrices.

Example problem: Solve \(x’ = \left[ {\begin{array}{*{20}{c}}6&1\\4&3\end{array}} \right]x + \left[ {\begin{array}{*{20}{c}}{6t}\\{ – 10t + 4}\end{array}} \right]\)

This is a system of ODEs with real, distinct eigenvalues, except we now have polynomials in the equations as well, please see our example on how to do the homogeneous solution, we have explained in greater detail how to find the eigenvalues, eigenvectors, and the solution.

The first step is the obtain the eigenvalues by obtaining \(\det \left( {A – \lambda I} \right)\). We will go through these steps quickly, see the previous link to see fully-explained intermediate steps on how to get these.

You will find the eigenvalues to be \({\lambda _1} = 2\) and \({\lambda _2} = 7\).

Now get the eigenvectors. There are infinitely many eigenvectors you can form, but for us we acquired \({K_1} = \left[ {\begin{array}{*{20}{c}}1\\{ – 4}\end{array}} \right]\) and \({K_2} = \left[ {\begin{array}{*{20}{c}}1\\1\end{array}} \right]\).

Put the eigenvalues and eigenvectors together with constants, we obtain the homogeneous solution to be:

\[{x_h} = {c_1}\left[ {\begin{array}{*{20}{c}}1\\{ – 4}\end{array}} \right]{e^{2t}} + {c_2}\left[ {\begin{array}{*{20}{c}}1\\1\end{array}} \right]{e^{7t}}\]

Now for the tricky part, finding the “particular solution”. Again, please review our examples on how to find many types of particular solutions and the Method of Undetermined Coefficients. You need to construct arrays containing the same and lower degree polynomials with constants:

\[{x_p} = \left[ {\begin{array}{*{20}{c}}{{a_2}}\\{{b_2}}\end{array}} \right]t + \left[ {\begin{array}{*{20}{c}}{{a_1}}\\{{b_1}}\end{array}} \right]\]

Also find the derivative:

\[{x_p}’ = \left[ {\begin{array}{*{20}{c}}{{a_2}}\\{{b_2}}\end{array}} \right]\]

Now substitute both of these into the original question problem statement.

\[\left[ {\begin{array}{*{20}{c}}{{a_2}}\\{{b_2}}\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}6&1\\4&3\end{array}} \right]\left( {\left[ {\begin{array}{*{20}{c}}{{a_2}}\\{{b_2}}\end{array}} \right]t + \left[ {\begin{array}{*{20}{c}}{{a_1}}\\{{b_1}}\end{array}} \right]} \right) + \left[ {\begin{array}{*{20}{c}}6\\{ – 10}\end{array}} \right]t + \left[ {\begin{array}{*{20}{c}}0\\4\end{array}} \right]\]

Simplify the messy expression.

\[\left[ {\begin{array}{*{20}{c}}0\\0\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}{\left( {6{a_2} + {b_2} + 6} \right)t}&{6{a_1} + {b_1} – {a_2}}\\{\left( {4{a_2} + 3{b_2} – 10} \right)t}&{4{a_1} + 3{b_1} – {b_2} + 4}\end{array}} \right]\]

You can get four equations from above to solve for 4 variables. Remember you can look at each variable power, so look at the terms in the first row with only t’s, look at the first row that don’t have any t’s, and repeat for the second row.

You will acquire the following four equations.

\[6{a_2} + {b_2} + 6 = 0\]

\[4{a_2} + 3{b_2} – 10 = 0\]

\[6{a_1} + {b_1} – {a_2} = 0\]

\[4{a_1} + 3{b_1} – {b_2} + 4 = 0\]

Solve the equations to get the values, it will be messy arithmetic. Check your calculator if you have a 4 by 4 matrix solving capability.

\[{a_1} = – \frac{4}{7}\]

\[{a_2} = – 2\]

\[{b_1} = \frac{{10}}{7}\]

\[{b_2} = 6\]

Now add our homogeneous solution to the particular solution we just found to get the solution to the system of ODEs:

\[x = {c_1}\left[ {\begin{array}{*{20}{c}}1\\{ – 4}\end{array}} \right]{e^{2t}} + {c_2}\left[ {\begin{array}{*{20}{c}}1\\1\end{array}} \right]{e^{7t}} + \left[ {\begin{array}{*{20}{c}}{ – 2}\\6\end{array}} \right]t + \left[ {\begin{array}{*{20}{c}}{ – \frac{4}{7}}\\{\frac{{10}}{7}}\end{array}} \right]\]

This is a good kind of question to practice for a differential equations exam because it has a lot of concepts it tests all at once and it’s not that it’s very difficulty, it’s just time-consuming because you need to find the homogeneous and particular solutions.

Try an example where a system of ODEs has repeated real eigenvalues!

Try an example where a system of ODEs has complex eigenvalues!

Try solving some single differential equations next by clicking here!

Click here to return to the Math Guides hubpage

Leave a Comment