Source: High school physics (Chinese)
Problem
A vibrating spring oscillator has a mechanical energy of $1.0$ J, an amplitude of $0.10$ m, and a maximum speed of $1.0$ m/s.
The total mechanical energy equals both the maximum elastic potential energy and the maximum kinetic energy: $E = \dfrac{1}{2}kA^2 = \dfrac{1}{2}mv_{\max}^2$.
From $E = \dfrac{1}{2}kA^2$, the spring constant is $k = \dfrac{2E}{A^2} = \dfrac{2 \times 1.0}{0.10^2} = 200$ N/m. From $E = \dfrac{1}{2}mv_{\max}^2$, the mass is $m = \dfrac{2E}{v_{\max}^2} = \dfrac{2 \times 1.0}{1.0^2} = 2.0$ kg. The frequency is $f = \dfrac{1}{2\pi}\sqrt{\dfrac{k}{m}} = \dfrac{1}{2\pi}\sqrt{\dfrac{200}{2.0}} = \dfrac{10}{2\pi} = \dfrac{5}{\pi} \approx 1.6$ Hz.