Derivatives of position in SHM

The velocity $\dot x$ is $\pi/2$ phase ahead of $x$: $$ \dot x(t) = -\omega a_0\sin(\omega t + \phi) = \omega a_0\cos\big(\omega t+\phi+\frac\pi2\big) $$ and the acceleration is $\pi$ phase ahead: $$ \ddot x(t) = -\omega^2 a_0\cos(\omega t + \phi) = \omega^2 a_0\cos(\omega t+\phi+\pi) $$