Systems of ODEs

103 Views Asked by At

I want to solve a system of ODEs of the following type:

$$\large\frac{d\phi_{i}}{dt} = {\mu_{i}}^2\phi_{i} + \sum_{j=1}^{N}a_{ij}\phi_{j}$$

There were IMSL/Visual Numerics routines such as DMOLCH, DBVPFD, PASVA3, etc, that were designed to solve problems like those, and I used to have accesses to IMSL, but not any more. Thus, my question is: aren't there public/free libraries (in either Fortran or Python) to numerically solve systems like the above? I don't think this can be done with Matlab (or not without a great effort) and I'm not quite sure if Numpy can.

Thanks for any help.

1

There are 1 best solutions below

1
On

This is a linear system $\dfrac{dX}{dt} = A X$ where $A$ is an $N \times N$ matrix. The solution is $X(t) = \exp(At) X(0)$. Matlab can compute the matrix exponential with the function expm. Is there a reason this won't work for you?