The Duffing Oscillator system is described in terms of a set of two simple coupled ODEs to solve. This solution can be obtained suffciently accurately via the Runge Kutta 4th order method.
The program to implement the numerical solution of the Duffing Oscillator can be derived from the Runge Kutta 4th order program to solve the mass on a spring problem.
Adapt this code according to the following steps
They have the following functions:
The -i option is implemented via an infinite
loop
with a
statement
Michel Vallieres 2014-03-04