Mass Spring System Simulation

\[ m\ddot{y} + c\dot{y} + ky = 0, \quad y(0) = y_0, \quad \dot{y}(0) = v_0 \]

Displacement (y) vs Time (t)

About This Simulation

This interactive tool visualizes the motion of a mass-spring-damper system governed by the second-order differential equation:

Adjust mass , spring constant , and damping to observe the three regimes:

  • Underdamped (): oscillating with decaying amplitude
  • Critically damped (): fastest non-oscillatory return to equilibrium
  • Overdamped (): slow non-oscillatory return

Gravity shifts the visual equilibrium position but does not affect oscillation dynamics.

Numerical methods: The simulation uses adaptive integration for accuracy and stability. For most parameter values, it employs the velocity Verlet (Störmer) method—a symplectic integrator that conserves energy well in undamped cases. When the system becomes stiff (large damping or high frequency), it automatically switches to implicit methods: backward Euler for the first step, followed by the second-order backward differentiation formula (BDF-2).