Three identical masses sit on a frictionless track between two fixed walls, each pair — wall–mass and mass–mass — joined by an identical spring. Newton's second law for each mass gives a linear system of three coupled ODEs; this is not an animation of pre-baked curves, it is numerically integrated every frame (symplectic Euler, sub-stepped for stability):
m ẍ₁ = k(x₂ − 2x₁) − b ẋ₁
m ẍ₂ = k(x₁ − 2x₂ + x₃) − b ẋ₂
m ẍ₃ = k(x₂ − 2x₃) − b ẋ₃
This tridiagonal system has three exact eigenmodes. For N=3 masses between fixed walls the analytic frequencies and shapes are:
ωₙ = 2√(k/m) · sin(nπ/8), n = 1,2,3
xᵢ⁽ⁿ⁾ ∝ sin(inπ/4), i = 1,2,3
- Mode 1 — lowest frequency: all three masses swing the same direction, the middle one furthest.
- Mode 2 — the outer masses move opposite each other while the centre mass stays still (a node).
- Mode 3 — highest frequency: neighbouring masses always move in opposite directions.
- Pluck centre mass — a single displaced mass is not an eigenmode; it decomposes into a weighted sum of all three modes, so you see genuine beating as they drift in and out of phase.
- q₁, q₂ — the live projection of the current state onto the normalised mode shapes (q_n = √(1/2)·Σᵢ xᵢ·sin(inπ/4)). Exciting "Mode 1" alone should hold q₁ steady while q₂, q₃ stay near zero — a direct check that the numerics match the analytic eigenmodes.
Real-world relevance: this exact 1-D chain is the textbook model for phonons in a crystal lattice and for vibrational normal modes in molecules — the same tridiagonal eigenvalue problem, just with atoms instead of balls.