• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Help with differential equations and matrices

yersinia29

Thinker
Joined
Apr 23, 2004
Messages
165
I need to solve a system of 3 differential equations that are all coupled to each other. I think matrices would be the best way to do it, but i need some help.

Lets say that the 3 variables are Mx, My, and Mz, and the diffeq setup is:

dMx/dt = A*Mx + B*My + C*Mz

dMy/dt = D*Mx + E*My + F*Mz

dMz/dt = G*Mx + H*My + J*Mz


So the matrix would be:

dM/dt = [A B C
D E F
G H J] M + [K L M]

Can somebody give me a step by step of how to solve this system of ODEs?
 
My calculus at that level is at best rusty, and it was never that good to start with.

I think the problem is intended to guide you towards LaGrange ... have you covered that yet?
 
Call x the vector [Mx My Mz]<sup>T</sup> ,
F the matrix [A B C
D E F
G H J]
and b the vector [K L M]]<sup>T</sup>.

Your matrix equation becomes
dx /dt = Fx + b

if b = 0 the solution is
x = x(0)e<sup>F t</sup>
where x(0) is the value of your vector x at t = 0.

if b ~= 0

the solution will be:
x = x(0)e<sup>F t </sup>+ e<sup>F t</sup>x(0) integral e<sup>F (t-τ )</sup>b dτ,
The integral is calculated between 0 and t.

The matrix e<sup>F t</sup> is defined as:

e<sup>F t</sup> = I + F t + F<sup>2</sup> t<sup>2</sup>/2! + F<sup>3</sup> t<sup>3</sup>/3! + ...
 
SGT, I've got another question.

I know the general solution for 2x2 ODE matrix is of the form Ce^At + Ce^Bt + ....

However, I've seen some 3x3 ODE matrices where the solution is not of this form, but is instead of the form

(Ce^At)*(Ce^Bt)*(Ce^Dt).....

This seems like a fundamentally different solution set than the one above.

I guess my real question is, what determines the nature of additive exponentials vs multiplicative exponentials in teh solution set?
 
Here's another way of asking my question:

Suppose you have the following diffeq:

dF/dt = (A + B)F

Now from what I understand, the solution to this is:

F = (e^At*e^Bt)F(0)

My question is why/how is that the case?
 
yersinia29 said:
Here's another way of asking my question:

Suppose you have the following diffeq:

dF/dt = (A + B)F

Now from what I understand, the solution to this is:

F = (e^At*e^Bt)F(0)
No, what you have there is not quite right. Assuming that you mean A and B to be matrices, the correct solution would be:

F(t)=e^[(A+B)t] F(0)

This is not the same as what you have unless A and B commute. (If they commute, that means that AB=BA.)

To answer the general question of this thread:

Suppose you have a system of ODEs of the form:

dx/dt = Ax + b

where x is an n-dimensional vector, A is a constant n by n matrix, and b is a constant n-dimensional vector. We can start off by defining a new variable y, which satisfies:

x=y - A^-1 b

Here "A^-1" means the inverse of A. Substituting in this expression for x simplifies our equation to:

dy/dt = Ay

Now, to find the general solution of this homogeneous n-dimensional ODE, we assume that A has eigenvectors

v1, v2, ... , vn

with corresponding eigenvalues

e1, e2, ... , en

This means that for each i, we have A vi = ei vi. (For more about eigenvalues/vectors, see http://mathworld.wolfram.com/Eigenvalue.html )

A little fiddling around will show that the general solution to the equation for y(t) is:

y(t) = C1 v1 e^( e1 t ) + C2 v2 e^( e2 t ) + ... + Cn vn e^( en t )

(try substituting this back into the equation for dy/dt to see that it is a solution.) Here C1, C2, ... , Cn are arbitrary constants. If we happen to have an initial condition for each of the n components of x, then we also have initial conditions for all of the components of y. We can then find the C's by setting t=0 in the above expression for y(t):

y(0) = C1 v1 + C2 v2 + ... + Cn vn

which is a set of n linear algebraic equations for the n unknown C's. Solve it and you're done.
 

Back
Top Bottom