What is Simple Harmonic Motion?
Simple harmonic motion (SHM) describes any oscillation in which the restoring force is proportional to displacement, such as a mass on a spring or a small-angle pendulum. Its position over time follows a cosine wave. This calculator returns the displacement, velocity, acceleration, angular frequency, and period at any instant from four inputs: amplitude A, frequency f, phase φ, and time t.
How to use it
Enter the amplitude in meters, the frequency in hertz, the phase angle in radians, and the time in seconds. The calculator computes \( \omega = 2\pi f \), then evaluates the displacement, velocity and acceleration equations at your chosen instant. All results use SI units.
The formula explained
The core equation is $$x(t) = A\cos\!\left(\omega t + \varphi\right)$$ where \( \omega = 2\pi f \) is the angular frequency in rad/s. Differentiating once gives velocity $$v(t) = -A\omega\sin\!\left(\omega t + \varphi\right)$$ and again gives acceleration $$a(t) = -A\omega^{2}\cos\!\left(\omega t + \varphi\right) = -\omega^{2} x$$ The period \( T = \dfrac{1}{f} \) is the time for one complete cycle.
Worked example
Suppose \( A = 0.5 \) m, \( f = 2 \) Hz, \( \varphi = 0 \), and \( t = 0.1 \) s. Then $$\omega = 2\pi(2) \approx 12.566 \ \text{rad/s}$$ and the argument is \( \omega t = 1.2566 \) rad. Displacement $$x = 0.5\cdot\cos(1.2566) \approx 0.1545 \ \text{m}$$ Velocity $$v = -0.5\cdot 12.566\cdot\sin(1.2566) \approx -5.975 \ \text{m/s}$$ Acceleration $$a = -0.5\cdot 12.566^{2}\cdot\cos(1.2566) \approx -24.40 \ \text{m/s}^{2}$$ The period \( T = \dfrac{1}{2} = 0.5 \) s.
FAQ
Why does phase use radians? The cosine argument is an angle, so \( \varphi \) and \( \omega t \) must share the same unit; radians are standard in physics.
What if frequency is zero? A zero frequency means no oscillation, so \( \omega = 0 \) and the period is undefined (shown as 0).
Can I use it for a pendulum? Yes, for small angles a pendulum is approximately SHM; use its natural frequency for \( f \).