Create duffing.cc

Actually implement the Duffing oscillator model.