![]()
![]()
Computer
Lab Modules![]()
The Matrix Exponential Solution of D.E.'s
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.
Computer Lab Work.
Exercise 1. (a) Use the matrix exponential to find the general solution to the system of D.E.'s X' = A X, where
1. (b) Find the solution in
part (a) that has the I.C.'s
.
Then plot these solutions over the interval 0 <= t <= 4.
Solution. Find the eigenvalues of A and arrange them in a diagonal matrix d. Next, find the eigenvectors of A and arrange them in the columns of a matrix p, and find the inverse of p.
Verify that
.
Now form the fundamental matrix solution f[t] using
,
then check to see that f[t] satisfies the D.E.
Now you can use the built in Mathematica command MatrixExp[A t] to construct the fundamental matrix solution F[t]. It performs all the above computations automatically.
Extract the columns of F[t] and construct the three
linearly solutions, and form the general solution X[t] to the
D.E.
Then construct the solution with the desired I.C.'s and call it
Y[t].
Extract the three coordinate functions from Y[t] and call them y1[t], y2[t], y3[t], and plot the functions.
Exercise 2. (a) Use the matrix exponential to find the general solution to the system of D.E.'s X' = A X, where
2. (b) Find the solution in
part (a) that has the I.C.'s
.
Then plot these solutions over the interval 0 <= t <= 5.
Solution. Use the built in Mathematica command MatrixExp[A t] to construct the fundamental matrix solution F[t]. It performs all the above computations automatically.
Extract the columns of F[t] and construct the three
linearly solutions, and form the general solution X[t] to the
D.E.
Then construct the solution with the desired I.C.'s and call it
Y[t].
Extract the three coordinate functions from Y[t] and call them y1[t], y2[t], y3[t], y4[t], and plot the functions.
More Background. The
"compartment" model is used to describe the concentration of a
dissolved substance in several compartments in a system. For
Exercise, the "closed" three-stage system consists of three tanks
containing V1, V2, V3 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 k1 = r/V1, k2 = r/V2, k3 = r/V3. Then the
differential equation for the system is
![[Graphics:e17.txtgr19.gif]](e17.txtgr19.gif)
Exercise 3. Find the solution
to the "closed" three-stage system where
![]()
with the initial conditions
.
Plot the solution curves for
for 0 <= t <= 5.
From your observations what do you conjecture about the sum
![]()
First, compute the matrix exponential.
Second, separate out the three linearly independent solutions and
form the general solution X[t].
Then form the particular solution Y[t] with the given
I.C.'s
Extract the three coordinate functions from Y[t] and call
them y1[t], y2[t], y3[t].
Plot the functions to see how the solute moves through the system of
tanks.
From your observations of the graphs, what do you notice about the
total amount of solute in the system at time t, i.e. what can you say
about the sum
.
Return to the Differential Equations Project
Return to the Numerical Analysis Project
Return to the Complex Analysis Project
(c) John H. Mathews, 1998