Solution:
x = a cos (ωt + θ)------------(i)
And v = dxdt = -aω sin(ωt+θ)--------(ii)
Given at t = 0, x = 1 cm and v = π and ω = π
Putting these values in equation (i) and (ii), we will get
sin θ = -1a and cos θ = 1A
⇒ sin2θ + cos2θ = (-1a)2+(1a)2 ⇒ a = √2 cm