Forum Index Register Members List Events Mark Forums Read Help

 JREF Forum Help with differential equations and matrices

 Welcome to the JREF Forum, where we discuss skepticism, critical thinking, the paranormal and science in a friendly but lively way. You are currently viewing the forum as a guest, which means you are missing out on discussing matters that are of interest to you. Please consider registering so you can gain full use of the forum features and interact with other Members. Registration is simple, fast and free! Click here to register today.

 Tags matrices , equations , differential , help

 25th September 2004, 01:45 PM #1 yersinia29 Thinker   Join Date: Apr 2004 Posts: 166 Help with differential equations and matrices 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?
 25th September 2004, 02:07 PM #2 TillEulenspiegel Master Poster   Join Date: May 2003 Posts: 2,310 __________________ "God does not play dice with the universe." Albert Einstein "Who is Einstein to tell God what to do?" Niels Bohr Remember, %97.3 of all accidents occur %100 of the time.
 25th September 2004, 02:07 PM #3 Benguin Too Chilled For The Anti-Homeopathy Illuminati   Join Date: Apr 2004 Posts: 1,902 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? __________________ It has been said cats have nine lives which, if true, makes them great candidates for experimentation. 100,000 medical doctors say go read this before quoting their articles. Probably. Voltaire "Atheism - the vice of a few intelligent people"
 28th September 2004, 10:29 AM #4 SGT Critical Thinker     Join Date: Apr 2004 Location: Rio de Janeiro Posts: 345 Call x the vector [Mx My Mz]T , F the matrix [A B C D E F G H J] and b the vector [K L M]]T. Your matrix equation becomes dx /dt = Fx + b if b = 0 the solution is x = x(0)eF t where x(0) is the value of your vector x at t = 0. if b ~= 0 the solution will be: x = x(0)eF t + eF tx(0) integral eF (t-τ )b dτ, The integral is calculated between 0 and t. The matrix eF t is defined as: eF t = I + F t + F2 t2/2! + F3 t3/3! + ... __________________ Never attribute to malice that which can be adequately explained by stupidity. Hanlon's Razor Heaven, n. A place where the wicked cease from troubling you with talk of their personal affairs, and the good listen with attention while you expound on your own. A. Bierce
 29th September 2004, 01:30 PM #5 yersinia29 Thinker   Join Date: Apr 2004 Posts: 166 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?
 29th September 2004, 04:45 PM #6 yersinia29 Thinker   Join Date: Apr 2004 Posts: 166 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?
 29th September 2004, 08:10 PM #7 Vorticity Fluid Mechanic     Join Date: Apr 2002 Location: Los Alamos, NM Posts: 2,646 Quote: Originally posted by yersinia29 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.

JREF Forum

 Bookmarks Digg del.icio.us StumbleUpon Google Reddit