Zulko / ddeint

Scipy-based Delay Differential Equation (DDE) solver
Creative Commons Zero v1.0 Universal
36 stars 24 forks source link

Solving second order delay differential equations #10

Open Alexjamescooper opened 3 years ago

Alexjamescooper commented 3 years ago

Hi Zulko,

firstly, thank you for writing ddeint!. I am trying to solve an initial value problem for the case that x''(t) is known and depends on x(t-dt). In scipy without the delay I do this as following:

def function(z, t): return np.array([x''(z[1]), z[0]])

then odeint returns an np.array of [x',x]

However in ddeint this seems difficult as I cannot index z. Any help would be appreciated.

Cheers!

phboett commented 2 years ago

Well more than a year later: Does the example in https://computationalmindset.com/en/mathematics/solving-delay-differential-equations-in-python-using-numerical-methods.html help?