The Duffing oscillator is a nonlinear second-order differential equation — ẍ + δẋ + αx + βx³ = γ cos(ωt) — that models a mass attached to a spring with cubic stiffness, subject to periodic forcing and damping. Unlike a simple harmonic oscillator, the cubic term (βx³) makes the restoring force nonlinear, enabling a rich variety of behaviours including period doubling, bifurcation cascades, strange attractors and deterministic chaos. This simulation lets you tune all five parameters in real time and observe the resulting phase portrait and Poincaré section.
The Duffing equation was first analysed by Georg Duffing in 1918 to explain nonlinear resonance in mechanical structures. Today it serves as a canonical model in nonlinear dynamics, chaos theory and signal processing, and its dynamics appear in engineering systems ranging from beam vibrations to Josephson junctions in superconductors.
The Duffing oscillator is a nonlinear driven-damped oscillator whose restoring force includes a cubic term (βx³) in addition to the usual linear term (αx). This cubic nonlinearity allows the system to possess one or two stable equilibria (depending on the sign of α), and when a periodic driving force γ cos(ωt) is applied, the system can exhibit regular periodic motion, period-doubling cascades or fully chaotic behaviour, all within the same deterministic equation.
Use the sliders to adjust the five parameters: α (linear stiffness), β (cubic stiffness), δ (damping), γ (forcing amplitude) and ω (forcing frequency). The left canvas shows the phase portrait (position x vs. velocity ẋ) with a fading trail; the right canvas shows the time series x(t) with red Poincaré dots sampled once per driving period. Try the preset buttons — "Chaos" starts with classical Duffing chaos, while "Period-2" shows a period-doubling regime. The regime detector in the stats row will update automatically.
The Poincaré section samples the phase-space coordinates (x, ẋ) exactly once every drive period T = 2π/ω and plots them as red dots. A single isolated dot indicates period-1 (simple periodic) motion; two dots indicate period-2; a finite set of dots indicates higher periodicity; and a fractal cloud of densely scattered dots is the hallmark of a strange attractor — deterministic chaos. This stroboscopic technique distils the long-term behaviour of the system into a compact geometric picture.
When α < 0 and β > 0 the potential energy function V(x) = αx²/2 + βx⁴/4 has two minima separated by an energy barrier at x = 0, forming a double-well shape. Without forcing the system settles into one of the two wells. Periodic driving can give the oscillator enough energy to hop between wells. Because each crossing is sensitive to tiny differences in the trajectory, nearby initial conditions diverge exponentially — the definition of chaos. The double-well Duffing equation (with α = −1, β = 1) is the most commonly studied chaotic variant, and it is the default preset in this simulation.
Duffing-type dynamics appear in many engineering and physical systems. Buckled elastic beams under oscillatory loading follow the double-well Duffing equation closely; the two wells correspond to the two buckled positions. Nonlinear electronic circuits — including certain RLC circuits with a ferromagnetic core — exhibit Duffing chaos. MEMS (micro-electromechanical systems) resonators used in sensors and actuators operate in the nonlinear Duffing regime at large amplitudes. Josephson junctions in superconductor circuits and certain models of ship rolling motion also belong to the Duffing family.
No. Chaos is deterministic: given exactly the same initial conditions the trajectory is completely reproducible. What makes it "chaotic" is extreme sensitivity to initial conditions — two trajectories that start an infinitesimal distance apart diverge exponentially, quantified by a positive Lyapunov exponent. Random motion has no such underlying rule. In the simulation you can observe this by noting that the Poincaré section, though it looks scattered, traces out the same fractal strange attractor every time you restart with the same parameters.
Georg Duffing, a German engineer, introduced the equation in his 1918 monograph "Erzwungene Schwingungen bei veränderlicher Eigenfrequenz" (Forced Oscillations with Variable Natural Frequency). Duffing was trying to account for the asymmetric resonance peaks he observed in mechanical vibration experiments, which a simple harmonic model could not explain. The chaotic nature of the equation was not recognised until the 1960s–1970s, when numerical simulations by researchers such as Philip Holmes and others revealed the strange-attractor structure and connected it to the emerging theory of chaos.
The Duffing oscillator belongs to the broader family of periodically driven nonlinear oscillators, which also includes the Van der Pol oscillator (energy-dependent damping, used to model cardiac rhythms and electrical circuits), the pendulum with large-amplitude oscillations, and the bouncing ball on a vibrating table. In phase space, its strange attractor is related to the horseshoe map described by Stephen Smale. The Lorenz attractor and Rossler attractor are autonomous (undriven) chaotic systems; all of these are available as separate simulations on this site.
Engineers exploit Duffing nonlinearity in several ways. Nonlinear vibration energy harvesters use the double-well Duffing topology to capture energy over a broader frequency band than linear harvesters. Nonlinear vibration absorbers (NVAs) intentionally use cubic stiffness to achieve amplitude-independent tuning. In structural health monitoring, shifts in the nonlinear resonance frequency of a Duffing-type beam signal crack propagation. Chaos synchronisation in Duffing circuits has been proposed for secure analogue communications, where the chaotic carrier masks the signal.
Active research directions include: fractional-order Duffing oscillators (replacing integer derivatives with fractional ones to model viscoelastic materials), quantum analogues of the Duffing equation in driven superconducting qubits, and machine-learning-based prediction of chaotic Duffing trajectories as a benchmark for reservoir computing and physics-informed neural networks. Researchers also study networks of coupled Duffing oscillators as models of synchronisation and pattern formation in complex systems, and use the Duffing equation as a test bed for new numerical integration schemes and uncertainty quantification methods.