Duffing oscillator solver

This webpage uses the Runge-Kutta-Fehlberg fourth-order method with fifth-order error checking (RKF45) to approximate the solution to the problem of the Duffing oscillator:

x¨+δx˙+αx+βx3=γcos(ωt)\begin{aligned} \ddot{x} + \delta \dot{x} + \alpha x + \beta x^3 = \gamma \cos{(\omega t)} \end{aligned}

Below you can specify these various parameters, as well as the initial conditions and starting and end times. The default values give chaotic behaviour.

Simulation parameter form.
Parameter Value Explanation
Linear stiffness parameter.
Nonlinearity in restoring force parameter.
Amplitude of periodic driving force.
Damping parameter.
Angular frequency of periodic driving force.
End time (in seconds or s) for the simulation.
Initial xx coordinate in metres (m) .
Initial value of x˙\dot{x} (ms1\mathrm{m}\cdot \mathrm{s}^{-1}).
Error tolerance.
Tolerance type, can be either absolute (0) or relative (1).
Initial step size.
Minimum allowed step size.
Time increment for skipping ahead in animation.
Time you want to skip ahead to in animation when you press the skip button.
Width (in px) of Plotly windows used for plotting and animation below.
Height (in px) of Plotly windows used for plotting and animation below.
Proportion of animation time passed per real time. tScale=1.0t_{\mathrm{Scale}}=1.0 means animation and real time match. tScale<1.0t_{\mathrm{Scale}}<1.0 means the animation is going more slowly than real time. tScale>1.0t_{\mathrm{Scale}}>1.0 means it is going more rapidly.