 Duffing is cast as a set of first order equations:

ydotdot = - del ydot - y - gamma y^3 + esp cos omega t

now:

y2dot = - del y2dot -y1 - gamma y1^3 + eps cos omega t

and

y1dot = y2


The set is solved by lsode routine, presumably could be anything,

eg.


