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) = A\sin\omega t + B\cos\omega t$ with $\omega = \sqrt{\dfrac{K}{m}}$.
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) = C\cos(\omega t - \phi)$, where $C$ and $\phi$ are
Answer: (D) $C = \sqrt{\frac{v(0)^2}{\omega^2} + x(0)^2},\ \phi = \tan^{-1}\left(\frac{v(0)}{x(0)\omega}\right)$
At $t = 0$: $x(0) = B$ and $v(0) = A\omega$, so $A = \dfrac{v(0)}{\omega}$.
$C\cos(\omega t - \phi) = C\cos\phi\cos\omega t + C\sin\phi\sin\omega t$, so $C\cos\phi = B = x(0)$ and $C\sin\phi = A = \dfrac{v(0)}{\omega}$.
$$C = \sqrt{\frac{v(0)^2}{\omega^2} + x(0)^2},\quad \phi = \tan^{-1}\left(\frac{v(0)}{x(0)\omega}\right)$$
Solution by Sreeraj P, M.Sc Physics