Mass-Spring SHM Simulation

Mass-Spring SHM Simulation

Simple Harmonic Motion of Mass-Spring System

This simulation demonstrates three different initial conditions for SHM:

General solution: x(t) = A·cos(ωt + φ)
ω = √(k/m), A = amplitude, φ = initial phase

Initial conditions:
a) Mean position (x=0): φ = π/2 → x(t) = A·sin(ωt)
b) Maximum stretched: φ = 0 → x(t) = A·cos(ωt)
c) Maximum compressed: φ = π → x(t) = -A·cos(ωt)

All cases have same frequency (ω) and amplitude (A), differing only in initial phase (φ).

Leave a Comment

Scroll to Top