Numerical Solutions of ODE with Delay
Numeric solutions for initial value problems with ODE/DAE via dsolve[numeric] has been enhanced to accommodate delay terms for the three main variable step integrators, rkf45, ck45, and rosenbrock.
Example: Harmonic oscillator with delay
dsys ≔ ⅆ2ⅆ t2 yt + yt−110=0, y0=1, y'0=0
dsn ≔ dsolvedsys, numeric:
For variable delay, the maximum delay time, which is not always trivial to compute, needs to be provided in the call to dsolve:
dsys_var ≔ ⅆⅆ t xt = −xt−12−exp−t2, x0=1
max_delay ≔ fsolvet = 12+exp−t2, t;
dsn_var ≔ dsolvedsys_var, numeric, delaymax=0.74:
Detailed information on this feature, such as setting of initial values, controlling the storage used to retain the delay data, and use with events can be found on the dsolve[numeric][delay] help page.
dsolve/numeric, dsolve/rkf45, dsolve/ck45, dsolve/rosenbrock, dsolve/numeric/delay
Download Help Document