How this calculator works
An ideal harmonic oscillator experiences acceleration proportional to displacement and directed towards equilibrium. This calculator uses a cosine convention: at zero time and zero phase, the oscillator begins at positive maximum displacement, at rest. Velocity and acceleration are the time derivatives of that position. The chart shows motion from time zero, while the scalar readouts use your selected time. Inverse time and phase use the principal arccosine branch from zero to pi; additional branches repeat every cycle.
Formula
x = A cos(omega t + phi); v = -A omega sin(omega t + phi); a = -omega² x; omega = 2 pi f; v_max = A omega.
Worked example
At A = 2 m, f = 0.5 Hz and zero phase, t = 0 gives x = 2 m, v = 0 and a = -19.73921 m/s². With A = 3 m at the same frequency, t = 1 s gives x = -3 m.
Advertisement
Frequently asked questions
Can I use a sine convention?
Yes. Set phase to -90 degrees to turn the cosine into a sine with zero initial displacement and positive velocity.
Does this include damping?
No. The amplitude and frequency remain constant. Use the damping-ratio tool for a decaying free response.
Why does acceleration point opposite displacement?
The restoring force points towards equilibrium. Its direction reverses when the oscillator crosses equilibrium.