HomeArticlesChaos & Dynamics

The Duffing Oscillator: When a Spring Turns Chaotic

One cubic term turns an ordinary driven spring into a hysteretic, period-doubling, eventually chaotic system — and the Poincaré section makes the chaos visible.

mysimulator teamUpdated June 2026≈ 8 min read▶ Open the simulation

A spring that refuses to be linear

An ideal spring obeys Hooke's law, force proportional to displacement, and its equation of motion is a simple sine wave forever. Georg Duffing's 1918 equation adds a cubic stiffness term to that spring, a damping term, and a periodic external drive, giving a deceptively small equation that can produce everything from simple oscillation to full chaos depending only on the drive amplitude:

ẍ + δẋ + αx + βx³ = γ·cos(ωt)

δ = damping,  α = linear stiffness,  β = cubic (nonlinear) stiffness
γ = drive amplitude,  ω = drive frequency
live demo · a driven nonlinear oscillator's response● LIVE

Hardening, softening, and the folded resonance curve

With β > 0 the spring gets stiffer as it stretches further (a hardening spring); with β < 0 it gets softer (softening). This alone bends the classic resonance peak of a linear oscillator sideways into a curved, tilted shape, and past a critical drive amplitude that curve folds over on itself. In the folded region three different oscillation amplitudes are mathematically valid solutions at the same drive frequency — the system becomes bistable, jumping abruptly between a small-amplitude and a large-amplitude response as the frequency is swept slowly up versus down, a hysteresis loop that a linear spring can never produce.

From periodic to chaotic as the drive grows

For small γ the oscillator settles into simple periodic motion at the drive frequency. Increase γ and the response can period-double — settling into a cycle that repeats only every two drive periods, then four, then eight — a period-doubling cascade that is one of the most common routes into chaos in nonlinear systems generally, not just this one. Beyond the accumulation point of that cascade the motion becomes aperiodic: bounded, deterministic, but never repeating, tracing out a strange attractor in phase space with the same stretch-and-fold structure as the Lorenz system, despite coming from a completely different physical setup.

The Poincaré section: turning a tangle into dots

Plotting position against velocity directly produces a dense, hard-to-read tangle once the motion is chaotic. The standard trick is a Poincaré section: instead of plotting every instant, sample the state once per drive period (stroboscopically, at the same phase of cos(ωt) each time). A periodic orbit collapses to a single point or a small finite set of points; a period-doubled orbit shows two, four or eight points; and chaotic motion reveals itself as an intricate, self-similar scatter of points — the fractal cross-section of the underlying strange attractor, visible at a glance instead of buried in a tangled trajectory.

Why a 1918 equation still matters

The Duffing equation is one of the simplest models that contains hardening/softening stiffness, forced resonance, hysteresis and a full route to chaos in one line, which is why it remains the standard textbook and engineering test case for nonlinear vibration — from MEMS resonators and structural beams that buckle under load, to the electrical analogue circuits historically used to study chaos before cheap computers made numerical integration easy.

Frequently asked questions

What makes the Duffing oscillator different from a normal spring?

The cubic term βx³ makes the restoring force nonlinear: the spring gets stiffer or softer as it stretches further, instead of staying proportional to displacement. That single term is enough to produce bent resonance curves, jumps between amplitudes, and eventually chaos.

Why does the resonance curve tilt and fold over?

Because the spring's stiffness itself depends on amplitude, the resonance frequency shifts as the oscillation grows, bending the response curve sideways. Past a critical drive strength the curve folds back on itself, creating a region with three possible amplitudes for one drive frequency and an abrupt jump between them.

What is a Poincaré section actually showing?

It samples the oscillator's state once every drive cycle instead of continuously. A periodic motion then shows up as a handful of fixed points, while chaotic motion produces a scattered, self-similar pattern of points — the fractal structure of the underlying strange attractor, without the visual clutter of the full continuous trajectory.

Try it live

Everything above runs in your browser — open Duffing Oscillator and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Duffing Oscillator simulation

What did you find?

Add reproduction steps (optional)