# system of coupled nonlinear ODEs with complex coefficients

I am interested in numerically solving the following system of coupled ODEs

$$\left(i-\frac{1}{2\Omega}f_{m,n}\right) \frac{d a_{m,n}(t)}{dt} =E_{m,n}^{\text{kin}}(t) + \left(\omega_{0}+V_{m,n}-\frac{i}{2}\gamma+\frac{i}{2}f_{m,n}\right)a_{m,n}(t) +\left(g-\frac{i}{2}r\right)|a_{m,n}(t)|^2 a_{m,n}(t)$$

Here $m$ and $n$ are integers, and represent indices on a 2D lattice, as in fact we are dealing with a system of coupled ODEs, one for each lattice point. The lattice is NxN, with N or the order of 30.

The unknown is the complex function $a_{m,n}(t)$. $f_{m,n}$ is also complex, while all the other parameters are real.

The kinetic and potential energy terms are

$$E_{m,n}^{\text{kin}}(t) = -J [ e^{-i\phi_{m,n}^x}a_{m+1,n}(t)+e^{i\phi_{m,n}^x}a_{m-1,n}(t) +e^{-i\phi_{m,n}^y}a_{m,n+1}(t)+e^{i\phi_{m,n}^y}a_{m,n-1}(t) ]$$ and $$V_{m,n} = \frac{1}{2} \kappa b^2 \left[ (m-m_0)^2 + (n-n_0)^2 \right]$$ while $(\phi_{m,n}^{x},\,\phi_{m,n}^{y})=(-\pi\alpha nb,\,\pi\alpha mb)$, $\alpha = \frac{p}{q}$ and $p,q \in \mathbb{Z}$.

Could someone suggest a suitable numerical scheme for tackling this problem?

• What have you tried? An ODE with 900 variables doesn't sound very large for today. – Wolfgang Bangerth May 7 '15 at 2:25
• it is not so large, the problem is that it is not linear.. – Andrei May 7 '15 at 8:33
• Also, the coefficients being complex makes it hard to use most ode solvers. – Andrei May 7 '15 at 12:02
• Then split it into 1800 real-valued ODEs. That's still a small problem, linear or nonlinear. I can't imagine you can't get this to solve in a reasonable time using Matlab, Maple or Mathematica. (Unless, of course, the problem is stiff, in which case all of the problems you have with these packages would carry over to any other solution you can think of). In other words, I see absolutely no advantage to implementing anything yourself here. – Wolfgang Bangerth May 7 '15 at 12:43
• So you're suggesting something like a simple Runge-Kutta could work? How do I find out if the problem is stiff or not? – Andrei May 7 '15 at 16:45