(N/A) Consider a block of mass $m$ attached to a spring of spring constant $k$ on a frictionless horizontal surface. Let $x=0$ be the equilibrium position.
When the block is pulled to a displacement $x_m$ and released,it oscillates between $-x_m$ and $+x_m$. At any displacement $x$,the total mechanical energy $E$ is the sum of kinetic energy $K$ and potential energy $U$:
$E = K + U = \frac{1}{2}mv^2 + \frac{1}{2}kx^2$
At the extreme position $x = x_m$,the velocity $v = 0$,so the total energy is purely potential:
$E = \frac{1}{2}kx_m^2$
Since the system is conservative,the total energy remains constant at any position $x$:
$\frac{1}{2}kx_m^2 = \frac{1}{2}mv^2 + \frac{1}{2}kx^2$
At the equilibrium position $x=0$,the potential energy is zero,and the kinetic energy is maximum,where $v = v_m$:
$\frac{1}{2}mv_m^2 = \frac{1}{2}kx_m^2$
Solving for $v_m$:
$v_m^2 = \frac{k}{m}x_m^2 \implies v_m = \sqrt{\frac{k}{m}}x_m$
This confirms that the kinetic energy is converted into potential energy and vice versa,while the total mechanical energy remains constant throughout the motion.