The motion of a mass on a spring, with spring constant K is as shown in figure.
The equation of motion is given by x(t)=Asinωt+Bcosωt with ω=√Km.
Suppose that at time t=0, the position of mass is x(0) and velocity v(0), then its displacement can also be represented as x(t)=Ccos(ωt−ϕ), where C and ϕ are :