Linear Systems of ODEs
Here is a system of two ODEs whose coefficient matrix has real and distinct eigenvalues.
| Out[2]= |  |
This solves the system. Note that the general solution depends on two arbitrary constants
C[1] and
C[2].
| Out[5]= |  |
Here is a plot of some particular solutions obtained by giving specific values to
C[1] and
C[2]. In this case, the origin is called a
node.
| Out[7]= |  |
In this system, the eigenvalues of the coefficient matrix are complex conjugates of each other.
| Out[9]= |  |
| Out[12]= |  |
This plots the solution for various values of the arbitrary parameters. The
spiraling behavior is typical for systems with complex eigenvalues.
| Out[14]= |  |
Solving homogeneous systems of ODEs with constant coefficients and of arbitrary order is a straightforward matter. They are solved by converting them to a system of first-order ODEs.
This solves a homogeneous system of ODEs of order 3, with constant coefficients.
| Out[16]= |  |
This verifies the solution.
| Out[17]= |  |
In general, systems of linear ODEs with non-constant coefficients can only be solved in cases where the coefficient matrix has a simple structure, as illustrated in the following examples.
This first-order system has a diagonal coefficient matrix. The system is
uncoupled because the first equation involves only

and the second equation depends only on

. Thus, each equation in the system can be integrated independently of the other.
| Out[18]= |  |
The rows of the coefficient matrix for this system form an orthogonal set of vectors.
| Out[20]= |  |
| Out[23]= |  |
| Out[24]= |  |
Here is a system of three first-order ODEs. The coefficient matrix is upper triangular.
Out[26]//MatrixForm= |
| |  |
| Out[29]= |  |
As for single ODEs, there are sophisticated modern algorithms for solving systems of ODEs with rational coefficients.
This solves a system of two first-order ODEs with rational coefficients. Note that the solution is composed entirely of rational functions.
| Out[30]= |  |
In the following example, the algorithm finds one rational solution for

and

. (The equation for

is uncoupled from the rest of the system.) Using the rational solution,
DSolve is able to find the remaining exponential solution for

and

.
| Out[32]= |  |
| Out[33]= |  |
The systems considered so far have all been homogeneous. If the system is inhomogeneous (that is, if there are terms free from any dependent variables and their derivatives), DSolve applies either the method of variation of parameters or the method of undetermined coefficients to find the general solution.
This solves an inhomogeneous system.
| Out[38]= |  |
Particular solutions to the system can be obtained by assigning values to the constants C[1] and C[2].
Here is a plot of the solution for one choice of parameters.
| Out[40]= |  |