Why do vertical and horizontal springs with the same masses attached oscillate with the same period and the same speeds at matching positions? Assume that the horizontal surface is frictionless and that the springs are identical. The vertical spring has changing gravitational potential energy and the horizontal one does not. The vertical one is affected by gravity and the horizontal one isn't. But for some reason it makes no difference? Why?
2 Answers
The equilibrium position for the vertical spring is different from the horizontal spring. The vertical spring is stretched by the weight of the mass.
The elastic potential energy in the spring depends on its displacement from its unstretched length, not from the equilibrium position. The elastic potential energy is proportional the square of the displacement. So for the same amplitude of oscillation, the elastic PE in the vertical spring changes more than in the horizontal spring, but the gravitational PE exactly cancels out the bigger change in elastic PE.
Doing the math, when the horizontal spring is displaced by $x$ from its equilibrium position, the elastic PE is= $kx^2/2$.
When the vertical spring is at its equilibrium position, it is stretched by an amount $x_0 = mg/k$.
When the vertical spring is displaced by $x$ from its equilibrium position, its elastic PE is $$\begin{align} & k(x+x_0)^2/2\\ =\ & kx^2/2 + kxx_0 + kx_0^2/2\\ =\ &kx^2/2 + k(x + x_0/2) x_0 \\ =\ &kx^2/2 + k(x + x_0/2) mg/k \\ =\ &kx^2/2 + mgx + mgx_0/2 \end{align} $$ and the gravitational PE is $-mgx$.
So the total PE of the vertical spring is $$\begin{align} & kx^2/2 + mgx + mgx_0/2 - mgx\\ =\ & kx^2/2 + mgx_0/2 \end{align}$$
The interesting quantity for the oscillations is the change in total PE from the equilibrium position $x = 0$, which is $(kx^2/2 + mgx_0/2) - (0 + mgx_0/2) = kx^2/2$.
So, for the same displacement $x$ from equilibrium, the change in PE of the horizontal and vertical springs is the same, and the periods of oscillation are the same.
In any harmonic oscillator, the period, acceleration and speed depend on the restoring force.
In the vertical mass-on-a-spring, the restoring force is the net force on the mass, which is the difference between the tension in the spring and the force of gravity. The latter is constant, it does not vary with displacement, so the net force depends only on the spring constant, the same as when the spring is horizontal.
Contrast the simple pendulum, in which the restoring force is the tangential component of the gravity force. Although the gravity force is constant, the tangential component varies with displacement. So in this case the acceleration and period do depend on gravity.