# Work in moving reference frames

If we have a train driving at a constant 1 m/s on the train is a 1kg ball and a piston facing in the direction of motion and at rest on the train. The piston activates causing the ball to roll along the train at 1 m/s. How much work did the piston exert on the ball?

The problem comes from solving using both reference frames. Using the frame of the train the initial energy of the ball is 0 and the final energy is 1/2*1kg*(1m/s)^2 resulting in a difference of .5 j. In the frame of the ground the initial energy is .5 as found above and the final energy is 1/2*1kg*(2m/s)^2 resulting in a difference of 1.5j. I have done research and understand that total kinetic energy is different in different frames but I was wondering how that would work with work (no pun intended). Assuming the piston was electric we could measure the electricity used in J. Assuming it is 100% efficient it would use some amount of energy. If the energy was relative to its frame of reference I could build a perpetual motion machine as follows: 1) Accelerate piston of negligible mass and a ball of mass 1kg to 1m/s (use .5j) 2) piston accelerates ball by 1m/s (uses .5 j) 3) decelerate ball while on ground (gain 2 j) If every step were perfectly efficient I just gained 1j. To me this simple thought experiment means the piston can not Possibly use energy based on its own frame. However if energy was relative to a stationary frame that would obviously violate frame equivalence.

To summarize my question I don’t understand how kinetic energy can be converted to other forms (like electric potential) that must stay the same while changing frames of reference without violating frame equality. I have taken AP mechanical physics in high school and know quite a bit of calculus.

You accelerate the ball to be $2ms^{-1 }$ so $KE=2J$ and note that you spend $2J$ on acceleration. Then, it stops, ending up with $KE=0J$. You would also spend $2J$ in stopping it.Then, the balance would be $E=-2J$ that you spent on acceleration.