Let
A = the amplitude of vibration
k = the spring constant
m = the mass of the object
The displacement at time, t, is of the form
x(t) = A cos(ωt)
where
ω = the circular frequency.
The velocity is
v(t) = -ωA sin(ωt)
The maximum velocity occurs when the sin function is either 1 or -1.
Therefore
[tex]v_{max} = \omega A[/tex]
Therefore
[tex]v(t) = -V_{max} sin(\omega t)[/tex]
The KE (kinetic energy) is given by
[tex]KE = \frac{m}{2}v^{2} = \frac{m}{2} V_{max}^{2} sin^{2} (\omega t)[/tex]
The PE (potential energy) is given by
[tex]PE = \frac{k}{2} x^{2} = \frac{k}{2} A^{2} cos^{2} (\omega t)[/tex]
When the KE and PE are equal, then
[tex]v^{2} = \frac{k}{m} A^{2} cos^{2} (\omega t)[/tex]
For the oscillating spring,
[tex]\omega ^{2} = \frac{k}{m} \\ V_{max} = \omega A = \sqrt{ \frac{k}{m} } A [/tex]
Therefore
[tex]v^{2} = \frac{k}{m} \frac{m}{k} V_{max}^{2} cos^{2} ( \sqrt{ \frac{k}{m} t} ) \\ v = V_{max} \,cos( \sqrt{ \frac{k}{m} t} )[/tex]
Answer: [tex]v(t) = V_{max} cos( \sqrt{ \frac{k}{m} t} )[/tex]