What is the significance of the sign of the velocity for a particle executing SHM? So while deriving equation for the velocity of particle executing SHM at any point, I noticed a difference in the result depending on what wave (sine or cosine) you chose.

For $x=A\cos\omega t$:
$\quad \ \,v=-\omega\sqrt{A^2-x^2}$
For $x=A\sin\omega t$:
$\quad \ \,v=\omega\sqrt{A^2-x^2}$

Can anyone explain to me why the difference is there and what it means, since both equation are basically the same with only a phase difference?
 A: It is just related to two different initial conditions for the system.
Assume the system is a mass attached to a spring.
If $$x=A\cos(\omega t)$$ then this represents holding the mass with the spring extended in the +x direction at t=0.  When you let go, the velocity is in the negative x direction.
This agrees with the calculated velocity you get by taking the derivative of the above expression:  $$v=-\omega A\sin(\omega t)$$
The second expression represents the mass passing through x = 0 at t=0 and moving in the +x direction (as time increases, x grows positive), which is what the calculated velocity tells you also:  $$v=\omega A\cos(\omega t)$$
A: Neither of those expressions are right.  If $x(t)=A\cos(\omega t)$, then $v(t) = -A\omega \sin(\omega t)$.  You wrote
$$v(t) = -\omega \sqrt{A^2-x^2}=-A\omega \big|\sin(\omega t)\big|$$
If we write $x(t) = A\cos(\omega t - \delta)$, then your two examples correspond to $\delta = 0$ and $\delta = \pi/2$.  In the general case,
$$v(t) = -A\omega \sin(\omega t- \delta)= A\omega \cos(\omega t - \delta -\pi/2)$$
so we see that in general, the velocity function is related to the position function by a $\pi/2$ phase shift and scaling by $\omega$.
A: Both expressions are for speed and not velocity, so the sign is irrelevant.
The reason this is the case is because during the derivation, there will be a step like:
$$v = w\cos(wt) = w\sqrt{\cos^2(wt)}$$
As soon as you write $\cos\theta$ as $\sqrt{\cos^2\theta}$, you instantly lose its sign - this is the definition of the "modulus" function.
Therefore your expressions are equivalent.
