Springs, pendulums, sound waves and alternating currents all behave as harmonic oscillators. The simple harmonic motion calculator takes the amplitude, the frequency, the initial phase, a time and a mass, and gives the displacement, velocity and acceleration at that time, the period, the angular frequency, the maximum speed and acceleration and the kinetic, potential and total energy.
How the calculation works
- Enter the amplitude, the frequency and the initial phase of the motion x(t) = A cos(2πft + φ).
- Enter the time at which you want the state of the oscillator, and the mass to get the energies.
- The calculator gives the displacement, the velocity and the acceleration at that time, which follow v = −Aω sin(ωt + φ) and a = −ω² x.
- It also gives the period, the angular frequency ω = 2πf, the maximum speed Aω, the maximum acceleration Aω² and the energies, which add up to ½ m ω² A².
Example
An oscillator with amplitude 0.10 m, frequency 2 Hz and zero phase has ω = 12.57 rad/s and period 0.5 s. At t = 0.1 s the phase is 72°, so the displacement is 0.1 × cos 72° = 0.0309 m, the velocity is −1.195 m/s and the acceleration is −4.88 m/s². The maximum speed is 1.257 m/s and the maximum acceleration 15.79 m/s². With a mass of 0.5 kg, the total energy is 0.395 J, split into 0.357 J of kinetic energy and 0.038 J of potential energy.
Why it matters
The same equations describe many systems, so one calculator can be used to check homework, design a vibration test, or understand how a signal evolves in time. Seeing the energy split between kinetic and potential helps to understand why the motion repeats.
Good to know
The calculator assumes an ideal oscillator without damping or driving, where the amplitude stays constant. It does not derive the frequency from a spring constant or a length: for those, use the spring-mass or pendulum calculators. Angles are in degrees.
Related tools
The spring-mass calculator finds the frequency of a mass on a spring, the pendulum calculator covers swinging bodies, and the damping ratio calculator shows how losses change the motion.