At the start when time equal to zero, the initial conditions are:
![]()
These equations must be solved to find f.
Solution:
The two equations for the initial conditions can be combined into one equation.

This equation is the most useful when both xo and vo have non-zero values. The values in brackets are needed since your calculator only returns the principle value and not all possible values of the trigonometric inverse of the tangent function.
Phase Angle in SHM Simulation
The complex relationship between an oscillating object's initial phase angle and the angle of rotation of SHM is displayed along with a mass on a spring undergoing SHM.
TWO EXAMPLES:
(1) System is at rest initially:
When the system is displaced and given no initial velocity, then the system starts out its initial position equal to its amplitude. In this case the phase angle has to be +p/2 or -p/2 since

If xo is also positive, then phase is +p/2 since

If xo is negative, then phase is -p/2.
(2) System is at the equilibrium position initially:
When the system is at the equilibrium position initially and given some initial velocity, then the system starts out with its maximum velocity. In this case the phase angle be either 0 or p since xo = A sin(f) = 0 when f = 0 or p. If the initial velocity of the system is positive then the phase angle is 0 whereas the phase angle is p if the initial velocity is negative. You can see that this is true since v(0) = vmax cos(0) = vmax > 0 , where as v(0) = vmax cos(p) -vmax < 0.