# How does the math of storing energy in a spring work in a moving frame?

Consider a spring with spring constant $k$ attached at one end to a wall. When an external force stretches it by distance $l$ in the positive direction the force does work $\frac{1}{2}kl^2$ and that energy is stored in the spring as elastic potential energy.

Let the stretching take place uniformly over a time $t$ for definiteness.

If this operation is viewed by an observer moving at velocity $v$ with respect to the lab, the starting and ending position of the stretching operation will appear to be different, say $0$ and $l - vt$, but the average force exerted on the spring would remain $\frac{1}{2}kl$, which seems to make the work done (and energy stored in the spring) $$W = \left(\frac{1}{2}kl\right) \cdot (l - vt) \;.$$

How is this (potentially vast) difference reconciled?

• I know this is a fairly elementary exercise, but it seems to be causing some confusing in the comments of another question. Nov 6, 2016 at 18:12
• @sammygerbil Hmmm ... first the answer where the comments were and then the question itself was deleted. for the record the link (10k rep only) is physics.stackexchange.com/q/290723. Nov 7, 2016 at 18:14

In the moving frame the "fixed" end of the spring moves over a distance $$-vt$$, always exerting the same magnitude force as that applied, but in the negative direction so the work \begin{align*} W_\text{fixed} &= \left(-\frac{1}{2} kl\right) \cdot (-vt) \\ &= +\frac{1}{2} klvt \;. \end{align*}

That makes the net work done to the spring $$W_\text{net} = \left(\frac{1}{2}kl(l - vt)\right) + \left(\frac{1}{2} klvt\right) = \frac{1}{2} kl^2 \;,$$ just as before.

• I think there is a sign mistake in the last step.
– user131786
Nov 6, 2016 at 19:05
• @S007 Uhm. Yep. We have to add the works. Nov 6, 2016 at 19:06
• Thanks for editing. I have a doubt. Can we just directly take the final length of spring and initial length of spring to find the net elongation seen by the moving observer ? After that just use $W= \frac{1}{2}kx^2$... where $x$ is the elongation. In any constant velocity frame the extension in the spring will be same...
– user131786
Nov 6, 2016 at 19:09
• @S007 Sure, you can just work the problem in the lab frame. The point of the question, however, is that the infrastructure gives you the correct answer in a moving frame as well, even though the computations of the work contributions give potentially very large answers. Nov 6, 2016 at 19:11
• I don't think the rules allow changing a sign just to make the answer come out right 8>) Nov 6, 2016 at 19:18