Draw a diagram to illustrate the problem as shown below.
m = mass of the object
x = displacement
k = spring constant
g = acceleration due to gravity.
The driving force of mg (weight) is opposed by the spring restoring force
of -kx.
The equation of motion is
mg - kx = m x''
or
x'' + (k/m) = g
For oscillatory motion, the homogeneous solution of the ODE yields
ω² = 2π/T = k/m
where
T = period of oscillation
ω = circular frequency
The period is T = 2π√(m/k)
Answer:
Th period is independent of g, therefore the period will be the same on earth and the moon.