Duffing Oscillator

Simulate the forced nonlinear equation \(\ddot{x} + \delta\dot{x} + \alpha x + \beta x^3 = \gamma\cos(\omega t)\) and explore hardening springs, double-well potentials, and chaos.

\(\ddot{x} + 0.30\dot{x} - 1.00x + 1.00x^3 = 0.37\cos(1.20t)\)
Quick presets:
Parameters & Initial Conditions
Damping \(\delta\)
Linear stiff. \(\alpha\)
Cubic stiff. \(\beta\)
Forcing amp. \(\gamma\)
Forcing freq. \(\omega\)
Init. displ. \(x_0\)
Init. veloc. \(v_0\)
End time \(T\)

Launches a cloud of trajectories from many nearby initial conditions at once, so you can watch them collapse onto the strange attractor. Single-trajectory animation and the \(x(t)\) graph are disabled in this mode; set how many with # trajectories below.

# trajectories \(n\)
Regime: Double Well Tsit5
Ready — press Reset to compute
t = 0.000  |  x = 0.000  |  ẋ = 0.000
Speed:
Step:
Trail:

Space pause / resume  R reset  A show all

Animation — Duffing oscillator, physical view
Phase portrait \((x,\,\dot{x})\)
Displacement \(x(t)\) vs time
Simulation time
Cite this tool
Kapita, S. (2026). Duffing Oscillator. Math Tools. https://shelvean.github.io/math-tools/duffing.html