In order to rephrase the question. I would ask you to take a look at the following problem:

  1. I have this system of ODE: $$ \begin{cases} \dot{x}(t)= x(t)[r_1(t) -b_1(t)x(t- \tau(t)) - c_1(t)y^m(t)] & t\neq t_k\\ \dot{y}(t)= y(t)[- r_2(t)- b_2(t) y(t- \sigma(t)) +c_2(t) x(t) y^{m-1}(t)] & \\ \Delta x(t_k)= x(t_k^+)- x(t_k)=d_k x(t_k) & t=t_k\\ \Delta y(t_k)= y(t_k^+)- y(t_k) = f_k y(t_k) & \end{cases}. $$
  2. $x(t)$ and $y(t)$ are discontinuous function at points $t_k$.
  3. All these functions: $r_1(t), \, r_2(t), \, b_1(t), \, b_2(t), \, c_1(t),\mbox{ and } c_2(t)$ are positive and periodic with the same period $\omega$.
  4. $\tau(t)$ and $\sigma(t)$ are continuously differentiable positive periodic functions with the same period $\omega$ such that $\tau'(t) <1 \mbox{ and } \sigma'(t)<1$.
  5. $m\in (0,1)$
  6. $-1 < d_k \leq 0, \, -1 < f_k \leq 0$ are constants for $k=1,2, \cdots,$ such that there exists a positive integer $q$ $t_{k+q}=t_k + \omega$.

I am trying to make the right choice for these parameters to solve this with Mathematica.

  • $\begingroup$ Do $r_1(t), \, r_2(t), \, b_1(t), \, b_2(t), \, c_1(t),\mbox{ and } c_2(t)$ have the same period? Also, do you have any other boundary conditions but the discontinuities? $\endgroup$
    – rcollyer
    Jan 15 '13 at 6:27
  • $\begingroup$ thank you rcollyer for your comment to this post. I have improved the question as you have request. $\endgroup$
    – Zbigniew
    Jan 15 '13 at 7:21
  • $\begingroup$ Are the $t_k$'s pre-defined or do you find them as you solve? $\endgroup$
    – yohbs
    Jan 15 '13 at 7:25
  • $\begingroup$ We assume that $x(t)$ and $y(t)$ are discontinous functions at points $t_k$. $\endgroup$
    – Zbigniew
    Jan 15 '13 at 7:30
  • $\begingroup$ Yours is not an ODE, it is a delayed differential equation. $\endgroup$ Mar 12 '18 at 19:01

The following simple example indicates that such a problem cannot be solved with NDSolve (in V10.0.2):

NDSolve[{x'[t] == 1 - x[t - (1 + Sin[t]/10)], 
  x[t /; t <= 0] == 0}, x, {t, 0, 8}]

NDSolve::cdelay: The method currently implemented for delay differential equations does not support delays that depend directly on the time variable or dependent variables. >>

DSolve ran for an hour on the same simple example without finishing before I had to abort it. Memory usage had gotten to 1.5GB. I would be surprised if DSolve could solve it, but it does not complain that it cannot.

Representing your system abstractly as $\dot X = F[X,t]$, with $X = (x,y)$, you might code up your own solver, for instance using an Euler integration scheme:

  1. $t' \leftarrow \text{step}[X, t]$
  2. If $t'$ is a $t_k$, then $X' \leftarrow X + \Delta X$, else $X' \leftarrow F[X, t] * (t' - t)$

As one accumulates values of $X$, one can interpolate to estimate past values, such as for $x(t- \tau(t))$. The step function should return a discontinuity $t_k$ instead of stepping over it. Potential problems are determining the appropriate step size, estimating the error, and controlling precision loss; one might also seek out a more robust integration scheme.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.