Differential Equations Project

Computer Lab Modules

 

The Matrix Exponential Solution of D.E.'s

 

 

Background. Consider the matrix differential equation [Graphics:e17.txtgr1.gif], the solution can be obtained with the matrix exponential function [Graphics:e17.txtgr2.gif]. 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

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr3.gif]

1. (b) Find the solution in part (a) that has the I.C.'s
[Graphics:e17.txtgr5.gif].
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.

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr6.gif]

Verify that [Graphics:e17.txtgr7.gif].

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr8.gif]

Now form the fundamental matrix solution f[t] using [Graphics:e17.txtgr9.gif],
then check to see that f[t] satisfies the D.E.

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr10.gif]

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.

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr11.gif]

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].

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr12.gif]

Extract the three coordinate functions from Y[t] and call them y1[t], y2[t], y3[t], and plot the functions.

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr13.gif]
 
 

Exercise 2. (a) Use the matrix exponential to find the general solution to the system of D.E.'s X' = A X, where

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr14.gif]

2. (b) Find the solution in part (a) that has the I.C.'s
[Graphics:e17.txtgr15.gif].
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.

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr16.gif]

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].

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr17.gif]

Extract the three coordinate functions from Y[t] and call them y1[t], y2[t], y3[t], y4[t], and plot the functions.

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr18.gif]
 

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]

 

Exercise 3. Find the solution to the "closed" three-stage system where
[Graphics:e17.txtgr20.gif]
with the initial conditions
[Graphics:e17.txtgr21.gif].
Plot the solution curves for [Graphics:e17.txtgr22.gif] for 0 <= t <= 5.
From your observations what do you conjecture about the sum [Graphics:e17.txtgr23.gif]

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr24.gif]

First, compute the matrix exponential.

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr25.gif]

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

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr26.gif]

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.

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr27.gif]

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 [Graphics:e17.txtgr28.gif].

[Graphics:e17.txtgr4.gif][Graphics:e17.txtgr29.gif]
 

Solutions.



 

Return to the Differential Equations Project

Return to the Numerical Analysis Project

Return to the Complex Analysis Project

 
























(c) John H. Mathews, 1998