Solving using exponentiation of matrices (or "exponentiation of operators")

When you solve the single differential equation [Graphics:../Images/index_gr_183.gif], you get the solution [Graphics:../Images/index_gr_184.gif].  It turns out that if you are solving the system of differential equations [Graphics:../Images/index_gr_185.gif] (where A is a matrix of constant coefficients), the solution winds up being [Graphics:../Images/index_gr_186.gif] (needless to say, there is a lot of math that goes on behind the scenes to make this work out).  Of course, for this to make any sense, you have to have some idea what it means to raise e to a matrix power.  I won't go into all the details here, but the short form is that if you consider one definition of [Graphics:../Images/index_gr_187.gif] to be [Graphics:../Images/index_gr_188.gif], then you can define [Graphics:../Images/index_gr_189.gif] as [Graphics:../Images/index_gr_190.gif](where [Graphics:../Images/index_gr_191.gif], the identity matrix), assuming the infinite sum actually converges.  So, for example, [Graphics:../Images/index_gr_192.gif]  (this is, of course, a very simple example).  The good news is that Mathematica has a function built in for dealing with this: MatrixExp.  So, we could use:

[Graphics:../Images/index_gr_193.gif]
[Graphics:../Images/index_gr_194.gif]

So, let's work the problem from the previous section again, shall we?

[Graphics:../Images/index_gr_195.gif]
[Graphics:../Images/index_gr_196.gif]
[Graphics:../Images/index_gr_197.gif]
[Graphics:../Images/index_gr_198.gif]

(Notice that I use N[mA] in order to get a nicely readable solution, sort of...)

[Graphics:../Images/index_gr_199.gif]
[Graphics:../Images/index_gr_200.gif]

Notice, however, the imaginary components in the answer.  This is due to some round-off errors.  Now, for positive t values, this turns out to be relatively insignificant.  Compare:

[Graphics:../Images/index_gr_201.gif]
[Graphics:../Images/index_gr_202.gif]

However, for negative t values, it certainly isn't:

[Graphics:../Images/index_gr_203.gif]
[Graphics:../Images/index_gr_204.gif]

You can fix this in one of two ways:  The best way is to keep things symbolic as long as possible:

[Graphics:../Images/index_gr_205.gif]
[Graphics:../Images/index_gr_206.gif]

This isn't a very readable solution, but notice that:

[Graphics:../Images/index_gr_207.gif]
[Graphics:../Images/index_gr_208.gif]
[Graphics:../Images/index_gr_209.gif]
[Graphics:../Images/index_gr_210.gif]

The other method is to just take the real components of your solution (and hope that nothing important is going on behind the scenes with that imaginary component):

[Graphics:../Images/index_gr_211.gif]
[Graphics:../Images/index_gr_212.gif]
[Graphics:../Images/index_gr_213.gif]
[Graphics:../Images/index_gr_214.gif]
[Graphics:../Images/index_gr_215.gif]
[Graphics:../Images/index_gr_216.gif]


Converted by Mathematica      July 20, 2003