The kinetic energy of an oscillator is at a maximum when the displacement is zero
Therefore, the kinetic energy is zero at maximum displacement x = x0, so:The potential energy of an oscillator is at a maximum when the displacement (both positive and negative) is at a maximum,