Potential energy of a spring

I'm puzzled about the potential energy of a spring. A spring is a conservative system. So the potential energy should be defined only up to a constant -- can be defined to be 0 anywhere. However, one cannot escape needing the un-stretched length of the spring.

For example, the difference in gravitational potential energy between two heights $h_1$ and $h_2$ is: $$\Delta U = mg(h_2 - h_1)$$

However, the difference in potential energy between two points of extension is as follows:

Let one end of the spring be at $x=0$. Let the other end of the un-stretched spring be at $x_0$. Now find the difference in spring potential energy between two other points of extension $x_1$ and $x_2$. Let $k=2$ in some units of force.

$$\Delta U = (x_2 - x_0)^2 - (x_1 - x_0)^2 = (x_2-x_1 )\cdot(x_2 + x_1 - 2x_0)$$

Which is not a function only of $x_2-x_1$

Of course, this also agrees with the work integral.

What am I missing? ( I have a PhD in physics, so I should know better ;) )

• You should know better :) The energy is the integral of $Fdx$. Your gravitational example is only good at short range where you can assume $mg$ is constant. Over a longer range it is not constant, and spring force is not constant either. – Mike Dunlavey Jan 23 '13 at 15:17
• I don't see the problem. The potential energy is defined up to a constant, but why does that mean that potential energy differences should be a function of only $x_2-x_1$? – Joe Jan 23 '13 at 15:19
• When the gravitational potential cannot be approximated by $mgh$ but must be instead $-\frac{GMm}{r}$ it depends on the location of the origin as well. – Siyuan Ren Jan 24 '13 at 4:19
• I should no better! And C.R. -- DOH! – abalter Jan 24 '13 at 16:26

The potential energy only being defined up to a constant does not imply that potential energy differences only depend on differences in position.

To see this mathematically, assume that a function $U$ has the property that

$U(x_2)-U(x_1) = f(x_2-x_1)$

for some function $f$. Then if we take $x_2 = x+\Delta x$ and $x_1 = x$, and divide both sides by $\Delta x$, then we find

$\frac{U(x+\Delta x) - U(x)}{\Delta x} = \frac{f(0+\Delta x) - f(0)}{\Delta x}$

so that taking the limit $\Delta x \to 0$ gives

$U'(x) = f'(0)$

Primes denote derivatives here, and I assume all functions are sufficiently smooth. We see that the derivative of $U$ is a constant which means that $U$ is linear in $x$! Therefore, the class of conservative potentials for which differences in potential at different points equal some function only of the differences in position are precisely the potentials that are linear (or more properly affine) functions of position.

This is precisely why the gravitational example seems to have the "right" property you wanted, but other nonlinear potentials don't.

Choosing a different $x_0$ is not choosing a different $U_0$ - the force changes. Your $\Delta U$ is a work done by the elastic force. It, of course, depends on the force initial value.