Re: Systems of ODEs
- To: mathgroup at smc.vnet.net
- Subject: [mg42070] Re: [mg42047] Systems of ODEs
- From: Selwyn Hollis <selwynh at earthlink.net>
- Date: Wed, 18 Jun 2003 02:10:38 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Not sure how well it will work for you, but there's always MatrixExp. ----- Selwyn Hollis http://www.math.armstrong.edu/faculty/hollis On Tuesday, June 17, 2003, at 05:43 AM, PAUL ANDREW ELLISON wrote: > Hello everyone, > > I have been solving systems of ODE's with Mathematica recently, and > have developed a few questions. To begin with, all the systems of the > form A'[t]==C1 A[t]+C2 B[t], B'[t]==C3 A[t]+C4 B[t], and the > coefficients (C1, C2, C3, C4) are completely symbolic. The DSolve > method worked very well when the problem was simply a system of 2 > equations: > > Simplify[DSolve[{P'[t]==k A[t]+k B[t]+k C[t],A'[t]==k A[t],B'[t]==k > B[t],C'[t]==k > C[t],P[0]==0,A[0]==A0,B[0]==B0,C[0]==C0},{P[t],A[t],B[t],C[t]},t]] > > However, when the system is complicated by adding equations and > difficulty to the symbolic coefficients, the calculation takes an > extreme amount of time (Calculation was let run for about 70 hours > without crashing on a 1.8mHz P4 with 512mb of RAM until i stopped the > calculation). The system that caused this long of a calculation was > as follows: > > Simplify[DSolve[{P'[t]==k1 A[t]+k2 B[t]+k3 C[t],A'[t]==(-k1-k12) > A[t]+k21 B[t],B'[t]==(-k2-k21-k23) B[t]+k12 A[t]+k32 > C[t],C'[t]==(-k3-k32) C[t]+k23 > B[t],P[0]==0,A[0]==A0,B[0]==B0,C[0]==C0},{P[t],A[t],B[t],C[t]},t]] > > Is there some trick to making such complicated systems solve without > having to devote an entire weeks worth of computer time to it? > The only other method that I know to solve them would be to use the > eigenvector/eigenvalue form to solve first order systems such as this > one. The only problem there is that when I calculate the Eigensystem > of the coefficient matrix, the output is nearly 50 pages long. It > seems like it would be too much work to copy and paste 50 pages of > eigenvectors and eigenvalues into V*e^(\[Lambda]*t) where > V=eigenvector and \[Lambda]=corresponding eigenvalue, and then put all > the results into the form of the fundamental matrix. Perhaps there is > a built-in command for taking the output of the Eigensystem command to > a fundamental matrix for the solution of a first order differential > system. > Any input would be much appreciated, Thanks in advance. > > -Paul Ellison > >