# What is the formula for displacement in simple harmonic motion?

I am studying SHM in my physics class right now and I often get confused with the formula for displacement.

Sometimes I see the formula written as $$x=A\sin(\omega t)$$ and sometimes I see it written as $$x = A\cos(\omega t)$$. So my question what exactly is the formula for displacement in Simple Harmonic Motion?

## 1 Answer

Simple harmonic motion response is sinusoidal with a frequency of $$\omega$$, so the general case is expressed as $$x=A\sin(\omega t+\phi)=A\cos(\omega t-\pi/2+\phi)$$ or $$x=B\sin(\omega t)+C\cos(\omega t),$$

where $$A$$ is the amplitude, $$\phi$$ is the so-called phase angle (whose negative, $$-\phi$$, is called the phase delay), and $$B$$ and $$C$$ are constants related to the amplitude and phase angle through

$$A^2=B^2+C^2$$ and $$B=\cos\phi\qquad C=\sin\phi\qquad\phi=\tan^{-1}(C/B)$$ (where the arctangent is limited between $$-\pi/2$$ and $$\pi/2$$). You can find these constants from the boundary conditions. If $$x=0$$ at $$t=0$$ (i.e., the displacement is zero at time zero), for example, then we have simply $$x=A\sin(\omega t)$$. If instead $$\dot x=dx/dt=0$$ at $$t=0$$ (i.e., the speed is zero at time zero), then $$x=A\cos(\omega t)$$. Does this make sense?

• You're saying "If 𝑥=0 at 𝑡=0, for example, then we have simply 𝑥=𝐴sin(𝜔𝑡). If instead 𝑥˙=0 at 𝑡=0, then 𝑥=𝐴cos(𝜔𝑡)." I don't quite understand. You gave 2 values for x in the same condition? – Harsh Darji Jan 20 at 19:25
• I've edited the answer to provide more detail. – Chemomechanics Jan 20 at 19:36