Let x= a cos (3t+b), say
Differentiate to get velocity
V= -3a sin (3t+b)
now its given that at t=0, x=5 and v=0
Sub this information into both equations. You get:
5= a cos (b) ..... (1)
0= - 3a sin (b) ..... (2)
Solving simulatiously, you get: a=5 b=0
Therefore, x= 5cos...