According to Wikipedia the only force working on a simple harmonic oscillator when it is extended from its position of rest the force of the oscillator itself. However if we consider the Newtonic axiom
then its for suppose the $y$ Axis $m.a_y = - mg + D(x_0 - x_1) $ however in books and internet pages it is often to be seen that the gravitational force is completely ignored, sadly no explination or reasoning for why this is done.
I asked my tutor and he said it is because the gravitational force only change the position of rest. However I would like to have a nice mathematical view of why I can write 0 there.
I found a video explaining this.