Solve system of first order ODEs when values are a matrix

156 Views Asked by At

I have a set of first order ODEs such that

$$ \frac{d \Psi}{ds} = H(s)\Psi$$

H(s) is an 8x8 matrix.

I would like to find $\Psi(b)$ where $b$ is 10, for instance. The initial value for $\Psi(a)$ is a 8x8 identity matrix when $a$ is 5, for instance.

Normally I would solve something like this in Matlab using ode45 (Runge-Kutta), but I'm not sure how to handle this when $\Psi$ is a matrix instead of a vector.

Is there anything special that needs to be done when $\Psi$ is a matrix instead of a vector?

1

There are 1 best solutions below

4
On BEST ANSWER

The short answer is: Nothing changes. You can interpret your matrix equation as 8 vector equations, i.e. $\Psi=(\Psi_1,\ldots,\Psi_8)$ where $\Psi_1,\ldots,\Psi_8$ are vector valued functions. There is no kind of "interaction" between the 8 equations, i.e. you can solve them independently. I can also imagine (just give it a try) that matlab won't bother wether you have a vector or a matrix as initial value.