# Energy transferring question

If I have a spring being compressed by two bodies, A and B, with different masses, how much energy would be transferred to each one when they are released and the spring expanded?

-

In the final state the total energy is a sum of kinetic energies of the bodies: $$E=\frac{M_A V_A ^2}{2}+\frac{M_B V_B ^2}{2}\quad (1)$$
The momentum conservation reads (in absolute values): $M_A V_A = M_B V_B$. Thus $V_B=\frac{M_A}{M_B}V_A$. Hence the second body kinetic energy is expressed via the first body kinetic energy like this: $$\frac{M_B V_B ^2}{2}=\frac{M_A}{M_B}\frac{M_A V_A ^2}{2}\quad (2)$$ The energy equation reads now: $$E=\frac{M_A V_A ^2}{2}\left(1+\frac{M_A}{M_B}\right)=E_{initial}\quad (3)$$ This equation suffices to find numerically the kinetic energies via the initial potential energy. As to their fractions, the second body energy is the first body energy times $M_A/M_B$ (formula (2)).
Equal and opposite force, starting from rest, acceleration/velocity/distance will be inversely proportional to mass. Integral of force times distance (gained energy) therefore inversely proportional to mass. Hence, the product $m\cdot E$ is the same for both bodies (mass-independent): $m_{A}\cdot E_{A} = m_{B}\cdot E_{B}$. Then, of course, the energy conservation law should be applied to find energies in numbers: $E_{A}+E_{B} = 0.5 k X^2$, where $k$ is spring constant and $X$ compression.