WOLFRAM LANGUAGE TUTORIAL
Linear Systems of ODEs
Here is a system of two ODEs whose coefficient matrix has real and distinct eigenvalues.
This solves the system. Note that the general solution depends on two arbitrary constants C
Here is a plot of some particular solutions obtained by giving specific values to C
. In this case, the origin is called a node.
In this system, the eigenvalues of the coefficient matrix are complex conjugates of each other.
This plots the solution for various values of the arbitrary parameters. The spiraling
behavior is typical for systems with complex eigenvalues.
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.
This verifies the solution.
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.
The rows of the coefficient matrix for this system form an orthogonal set of vectors.
Here is a system of three first-order ODEs. The coefficient matrix is upper triangular.
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.
In the following example, the algorithm finds one rational solution for
. (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
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.
Particular solutions to the system can be obtained by assigning values to the constants C and C.
Here is a plot of the solution for one choice of parameters.