Module for the Matrix Exponential Solution of a Linear System of O. D. E.
Numerical Methods for O. D. E. using Mathematica. (c) John H. Mathews, 2003
Background.
Consider the matrix differential equation
, the solution can be obtained with the matrix exponential function
. The traditional method is to first find the eigenvalues and eigenvectors and diagonalization of the matrix. The new technology method is to use Mathematica's built in matrix exponential.
Example 1. (a) Use the matrix exponential to find the general solution to the system of D.E.'s
, where
1. (b) Find the solution in part (a) that has the I.C.'s
.
Then plot these solutions for
.
Solution 1.
Example 2. (a) Use the matrix exponential to find the general solution to the system of D.E.'s
, where
2. (b) Find the solution in part (a) that has the I.C.'s
.
Then plot these solutions for
.
Solution 2.
The Closed Compartment Model.
The "compartment" model is used to describe the concentration of a dissolved substance in several compartments in a system. For example, the "closed" three-stage system consists of three tanks containing
gallons of solute. The liquid flows at the rate r from the first tank and is mixed, then flows at the rate r into the second tank and is mixed, then flows at the rate r into the third tank and is mixed, and finally flows out of the third tank and back into the first tank at the rate r. We define the constants
.
Then the differential equation for the system is
Example 3. Find the solution to the "closed" three-stage system where
with the initial conditions
.
Plot the solution curves for
for
.
From your observations what do you conjecture about the sum
Solution 3.
Research Experience for Undergraduates