Textbook equation: m x″ + c x′ + kx = F cos(2πft). Positive x is right; the spring force is −kx and the damping force is −cx′.
ω₀ = √(k/m), ζ = c/(2√(km)), and A = F/√((k − mω²)² + (cω)²), where ω = 2πf. Free oscillation is possible only for ζ < 1; the damped frequency is ω₀√(1−ζ²).
E = ½mv² + ½kx². The energy change equals drive work minus damping loss: ΔE = ∫F cos(ωt)v dt − ∫cv² dt.
The live trajectory and independent numerical trials use fourth-order Runge–Kutta at a textbook-method step of 1/240 s. Checks compare exact free and forced solutions and an integrated energy ledger. A check passes below 0.1% numerical difference (illustrative tolerance).
The cart is an ideal point mass, the spring obeys Hooke’s law, damping is linear, and the track is horizontal. Real springs have finite travel and nonlinearities; the drawing rescales the ideal displacement rather than modelling hard stops. All apparatus settings are illustrative; equations and constants are textbook; the illustration is scaled. Independent educational exhibit; not affiliated with any apparatus manufacturer.