Re: Integrating Differential Equations with Time Delay

*To*: mathgroup at smc.vnet.net*Subject*: [mg75590] Re: Integrating Differential Equations with Time Delay*From*: rob <josh2499 at hotmail.com>*Date*: Sun, 6 May 2007 01:45:53 -0400 (EDT)*References*: <f1eqpt$59j$1@smc.vnet.net> <f1hmhp$pij$1@smc.vnet.net>

Jean-Marc Gulliet wrote: > Haider Arafat wrote: > >>I am not able to use NDSolve to integrate a differential equation of the >>form >> >>u''(t) + a u(t) == b u(t-tau); >>u(0) == u0; >>u'(0)==udot0; >> >>where tau, a, and b are all constants. Is there any way to numerically >>integrate this type of equations >>in Mathematica. >> >>Any help is appreciated, >> >>Haider Arafat > > > Allan Hayes's package NDelayDSolve should be of interest: "The package > extends the built-in function NDSolve to deal with delay differential > equations." See "Delay-Differential Equations" at > http://library.wolfram.com/infocenter/MathSource/725/ > > Regards, > Jean-Marc > Hi, I got this package and I believe it loads ok. But I can't seem to get it to work. I read the text in the top of the NDelayDSolve.m file (I found no other sources of documentation for it) and I've tried many ways to get it to work. Here's what I did: a=1; b=1; tau=6; u0=0; udot0=0; <<"NDelayDSolve`" eqns={u''[t] + a u[t] == b u[t - tau], u[0] == u0, u'[0] == udot0} sol = NDelayDSolve[eqns, {u -> (#1 &)}, {t, 0, 5}] But I get the following err. message (snipped) NDSolve::"ndnco" : "The number of constraints (4) (initial conditions) \is not equal to the total differential order of the system (2)..... I tried all sorts of groupings of the DE and the two constraints and with most other attempts the error message goes away but the sol= statement is just repeated and not evaluated. In short it thinks my 2 constraints are 4 or it doesn't do anything at all. Could you perhaps suggest something that would make this system work? Thank you.