PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

Related simulators

Continue with similar topics in this category — or all 37 in Waves & Sound.

View category →
NewUniversity / research

Forced Nonlinear Pendulum

Launch Simulator

θ¨+γθ˙+(g/L)sinθ=A cosωt; phase plot; vs Double Pendulum 2-DOF.

NewSchool

Tide Constituents & Beats

Launch Simulator

M2/S2/K1/O1 harmonic superposition, spring-neap beat cycle, diurnal inequality, and an amphidromic phase cartoon.

NewSchool

Wave Speed: String vs Rod

Launch Simulator

v = √(T/μ) for a string vs v ≈ √(E/ρ) for longitudinal bar waves.

NewSchool

Acoustic Levitation (Schematic)

Launch Simulator

Standing wave cos(kx)cos(ωt); pressure nodes marked; bead cartoon near a node.

NewUniversity / research

KdV Solitons (Exact)

Launch Simulator

u_t + 6uu_x + u_xxx = 0; Hirota two-soliton collision or one sech² pulse.

FeaturedSchool

Wave on a String

Launch Simulator

Shake one end, adjust frequency and amplitude. Standing waves and reflections.

PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Waves & Sound/Duffing Oscillator

Duffing Oscillator

m x¨+cx˙+kx+k₃x³=F cos ωt; soft/hard spring; A(ω) scan vs IC.

Presets

Dynamics

1 kg
18 N/m
-6 N/m³
0.28 N·s/m

Drive F cos(ωt)

2.4 N
4.2 rad/s

Initial state

0 m
0 m/s

Restoring force F_s = −kx − k₃x³. Negative k₃ softens the spring at large |x| (response peak bends toward lower ω); positive k₃ stiffens. The coarse A(ω) curves compare long-time amplitude after a cold start at x = 0 vs a start at x = 4.2 m — in some ranges both ω give different attractors (simplified multivalued / hysteresis hint).

Shortcuts

  • •Space / Enter — start run
  • •R — stop & clear graph

Measured values

ω₀ (linear part)4.243rad/s
x0.000m
v0.000m/s
Amp est. (recent)0.000m

Live graphs

About this model

The Duffing oscillator is a canonical model in nonlinear dynamics, extending the familiar linear harmonic oscillator to explore the rich phenomena that arise when the restoring force is no longer proportional to displacement. Its governing equation is m x¨ + c x˙ + k x + k₃ x³ = F cos ωt, where m is mass, c is the damping coefficient, k is the linear stiffness coefficient, and k₃ is the coefficient of the cubic nonlinearity. The term F cos ωt represents an external periodic driving force. The cubic term, k₃ x³, fundamentally changes the system's behavior. When k₃ > 0, the spring stiffens with displacement, modeling a 'hard spring' (like a stiffening material). When k₃ < 0, the spring softens with displacement, modeling a 'soft spring' (observed in some materials and magnetic pendulums). This simulator visualizes the oscillator's response, plotting the trajectory in phase space (x vs. x˙) and the amplitude A as a function of the driving frequency ω. Key learnings include the existence of multiple steady-state solutions for a given driving frequency (bistability), the characteristic 'jump' and hysteresis phenomena in the amplitude-frequency response curve, and the sensitivity to initial conditions. Students can explore how damping, nonlinearity strength, and drive amplitude shape these responses, connecting abstract mathematics to tangible physical systems like nonlinear electrical circuits, structural vibrations, and atomic force microscopy.

Who it's for: Upper-division undergraduate and graduate students in physics or engineering studying nonlinear dynamics, vibrations, and chaos, as well as educators demonstrating advanced oscillatory phenomena.

Key terms

  • Nonlinear Oscillator
  • Restoring Force
  • Bistability
  • Hysteresis
  • Phase Space
  • Amplitude-Frequency Response
  • Hard Spring
  • Soft Spring

How it works

The Duffing model adds a cubic stiffness k₃x³ to a damped, harmonically driven oscillator. Softening (k₃ &lt; 0) bends the resonance peak toward lower frequencies; hardening (k₃ &gt; 0) shifts it upward. Amplitude can be multivalued for the same drive frequency depending on initial conditions — a toy version is shown by comparing two numerical A(ω) sweeps. For large drive and damping, dynamics can become chaotic (not the focus here).

Key equations

m x'' + c x' + k x + k₃ x³ = F₀ cos(ωt)

Frequently asked questions

What's the key difference between the Duffing oscillator and a simple harmonic oscillator?
The simple harmonic oscillator has a linear restoring force (F = -kx), leading to a symmetric, single-valued resonance curve. The Duffing oscillator adds a cubic term (F = -kx - k₃ x³), making the restoring force nonlinear. This causes the resonance curve to bend, creating frequency regions with two possible stable amplitudes (bistability) and discontinuous 'jumps' in amplitude as frequency is swept.
What does 'hysteresis' mean in the context of this oscillator?
Hysteresis refers to the dependence of the system's state on its history. When slowly increasing the drive frequency, the amplitude follows the high-amplitude branch of the resonance curve until it suddenly 'jumps down' to the low-amplitude branch. When decreasing frequency, the jump back up occurs at a different frequency. The path taken (up or down) is not the same, creating a hysteresis loop in the amplitude-frequency plot.
Are the chaotic behaviors of the driven pendulum and the Duffing oscillator related?
Yes, they are closely related. The driven, damped pendulum's equation of motion can be approximated, for moderate angles, by a Duffing-type equation with a negative cubic stiffness (a soft spring nonlinearity). Both systems are classic examples of driven, damped nonlinear oscillators that can exhibit period-doubling routes to chaos, strange attractors, and sensitive dependence on initial conditions under certain parameter regimes.
What is a real-world example of a 'hard spring' Duffing oscillator?
A clamped metal beam or panel subjected to large transverse vibrations often acts as a hard spring system. As the center deflects, the mid-plane stretches, significantly increasing the effective stiffness. This is a key consideration in the nonlinear vibration analysis of aircraft wings, bridges, and micro-electromechanical systems (MEMS) to avoid unexpected resonant jumps.