Preface
In classic physics the potential energy of a compressed (or stretched) spring is
$E_{\rm sp} = (\frac{1}{2})k_{\rm sp}(\Delta l)^2$
where $\Delta l$ is the length that the spring is compressed by, $k_{\rm sp}$ is spring constant.
Also in classic physics the potential energy of two charged particles is
$E_{\rm el} = k_{\rm el}\frac{q_1q_2}{r}$
where $q_1$ is charge of particle 1, $q_2$ is charge of particle 2, $r$ – distance between the particles, $k_{\rm el}$ – Coulomb constant.
The main part
Now, suppose we have 2 observers: one is at rest with the spring and the two charged particles (lets call this observer Ralf); and the other is moving relative to these objects with a speed close to speed of light (lets call this observer Maria).
For Maria the formulas above will be different due to length contraction:
$l’=\frac{l}{\gamma} $
where $l$ – proper length, $\gamma$ – Lorentz factor.
As I understand, for Maria the potential energies of the spring and the two particles will be $\gamma$ times the potential energies measured by Ralf, that is
$E_{\rm sp}' = \gamma E_{\rm sp}$
$E_{\rm el}' =\gamma E_{\rm el}$
where $E_{\rm el}'$, $E_{\rm sp}'$ - energies measured by Maria, $E_{\rm el}$, $E_{\rm sp}$ – by Ralf.
Here I have two questions.
If we try to calculate potential energy by lengths or distances, then potential energy turns out to be frame dependent. I can barely believe that, because I always thought that any type of internal energy (including potential one) is invariant both in classic physic and in special relativity. Is this true? If it is, then Ralf and Maria should get the same values for potential energies.
If potential energy is frame dependent, then how can energy conservation law hold in special relativity? Examine a situation of a cart at the base of a hill and it is being pushed up to the hill by a compressed spring. Let cart start its motion with a smallest possible speed just sufficient to pass the peak of the hill. All the observers (let them move horizontally) must agree on that the cart succeeds in passing the peak of the hill. This event requires that spring gives some energy ($E=mgh$, where $h$ – height of the hill) to the cart, otherwise the cart can’t get to the peak.