# Where does the integral come from in this Spring formula describing displacement at a certain point?

I'm in the process of trying to combine some equations for a simulation.

One describes the position at a point along a hanging slinky using...

$$y(d) = (l_1 + {mg\over k})d - {mg\over 2k}d^2$$ (source: http://large.stanford.edu/courses/2007/ph210/kolkowitz1/)

where...

• $d$ is a point between [0-1] along the spring's mass. ie .5 is the midway point, and the mass up until that point is total mass/2
• $l_1$ is the length of the slinky without any external force. Since a slinky is a 'pretensioned' spring, at rest its coils are touching. This is the 'minimum' length, and the slinky is displaced from here
• $mg\over k$ denotes the total spring displacement when hanging due to the force of gravity. This is derived from Hooke's law and Newton's 2nd law
• $k$ is the spring constant

Part 1 I understand: $$(l_1 + {mg\over k})d$$ This just means the (minimum length + displacement) * fraction of mass. Since the mass is directly proportional to displacement, this should give us the displacement at point $d$ along the slinky spring

Part 2 I don't understand: $$-{mg\over 2k}d^2$$

This is obviously (I think) the integral of ${mg\over k}d$. But why? ${mg\over k}d$ is not a rate, such as velocity, but it is a distance. And why do we subtract it from Part 1?

-
This is likely a second Taylor approximation of the distance $y(d)$, centered at $d_0=l_1$. We obtain it by finding the second Taylor approximation of $F(d)$, centered at $y_1$. The $2$ in the denominator is probably $2!$ from the Taylor expansion; $d^2$ also comes from the Taylor expansion, and the minus sign comes because $F(d)=-ky(d)$, so dividing out $-k$ for $y(d)$ on both sides puts the minus there. – Gyu Eun Lee Dec 12 '12 at 4:13