Home▸Chaos & Dynamics▸Duffing Oscillator: Ball in a Double Well (2D)

Duffing Oscillator: Ball in a Double Well (2D)

2D Duffing-oscillator lab: watch a mass roll through a real-space double-well potential under periodic forcing, with a live phase-plot inset and a twin trajectory released a hair apart to reveal chaotic divergence.

Chaos & Dynamics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-nonlinear-oscillations ↗ Open standalone

This 2D companion drives the same Duffing equation ẍ + δẋ + αx + βx³ = γcos(ωt) as the 3D version, but renders it in real space rather than through abstract phase/Poincaré/bifurcation tabs: the main canvas draws the potential curve V(x) = ½αx² + ¼βx⁴ itself, and a ball physically rolls along it, hopping between the two wells whenever the periodic forcing pumps in enough energy. A translucent twin ball, released with a velocity offset of just 0.02 from the main one, visibly peels apart from it under chaotic parameters — making the sensitive dependence on initial conditions that defines chaos directly visible in physical space, with a compact phase-plot inset (x vs. ẋ) for readers who also want the abstract view.

⚙ Under the hood

2D Duffing-oscillator lab with RK4-integrated equations of motion, a real-space double-well potential view, a phase-plot inset, and a twin trajectory released a hair apart to show chaotic divergence growing in real time.

duffing oscillatorchaos theorydouble well potentialsensitivity to initial conditionsphase spacerunge-kutta

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)