Energy of the Simple Harmonic Oscillator
Oscillators including simple harmonic oscillators store a fixed amount of total energy in two ways. The first type of energy of the simple harmonic oscillator is the kinetic energy (KE) and the second type of the energy of the simple harmonic oscillator is the potential energy (PE).
Energy of the simple harmonic oscillator at maximum
At maximum displacement, there is zero kinetic energy of the simple harmonic motion so the stored potential energy equals the total energy.
Energy of the simple harmonic oscillator at equilibrium
At equilibrium position, the potential energy stored is zero and he kinetic energy equals the total energy.
Energy of the Simple Harmonic Oscillator (Simple harmonic motion oscillator)
Both kinetic energy of the simple harmonic motion oscillator and the potential energy of the simple harmonic motion oscillator when added together will always give the total energy stored in the simple harmonic motion oscillator.
For example, at a displacement of  x, the potential energy (PE) = E_{1} and kinetic energy (KE) = E_{2 }so the total energy of the simple harmonic oscillator is E = E_{1} + E_{2}. The total energy stored by a simple harmonic oscillator is given by the following formula.
Formula for simple harmonic oscillator
where:

E = total energy stored in the simple harmonic oscillator (J)

m = mass of the simple harmonic oscillator (kg)

f = frequency of the simple harmonic oscillator (Hz)

A =amplitude of the simple harmonic oscillations (m)
