The equation that describe simple harmonic equation can either be sine and cosine depending on the particle's location at t = 0 s. If the particle starts at the equilibrium location x = 0 , the equation is x = xo sin wt.
If the particle starts at the amplitude location ( the extreme locations) , the equation is x = xo coswt.
After writing the equation check the equation by substituiting t = 0 and check the displacement x to verify the starting location.