If we change from one iframe to another, the momentum of the system changes as well. If frame K' moves with velocity |u> wrt another frame K, then the velocities of the a particles in the two frames are related by |vₐ> = |v'ₐ> + |V>. We are using capital letters for quantities referred to a whole system.
Then, the total momentum in each frame is |p'> and |p>, and they are related by
|P> = ∑mₐ|vₐ> = ∑mₐ|v'ₐ> + |V>∑mₐ,
where ∑mₐ= μ, the total mass. Then, |P> = |P'> + μ|V>.
If we choose K' so that |v'> = |0>, then |P> = μ|V>, and then
|V> = ∑mₐ|vₐ> / ∑mₐ
is the velocity of the K system as a whole.
If the total momentum of a system in a frame is |0>, we say that this system is at rest wrt that frame. The particles of the system can move as much as you like, but the total momentum must be |0>, and then we consider the system at rest, globally speaking.
The concepts of velocity and momentum "as a whole" for a system are not trivial by any means. And they are extremely useful, since they allow us to consider a system as if it were a single particle.
Since ∑mₐ|vₐ> = μ|V>, it is clear that both vectors deal with the system as if it were a single particle of total mass μ.
Since we have μ|V> = ∑mₐ|vₐ> we can integrate wrt time the whole expression to get
μ|V> = ∑mₐ|vₐ> => μ|R> = ∑mₐ|rₐ>,
where |R> is the vector position of the *centre of mass*. The vector |V> is the velocity of the system as a whole, as we have said before. If we imagine the whole system focused at a point, |V> would be its velocity. In a similar way, |R> is the position of the system as a whole. If we consider the whole system focused at a point, |R> would be the position of that point. These properties are of maximum importance in physics. In fact, every time you talk about the velocity of an aeroplane, you are using |V>, and every time you specify the position of a rock, you are using |R>. Both the aeroplane and the rock are systems of particles and you are dealing with them as idealised points. Even for a particle like a proton and a neutron, you are using this concept!
In summary, for each system we can define a centre of mass with position |R> and velocity |V>.
Once we are familiar with the concept of centre of mass, we can formulate the law of conservation of momentum by saying that for a closed system, its centre of mass moves uniformly along a straight line. If you have an asteroid moving in a straight line with constant velocity, and then it explodes (due to internal forces), the centre of mass will continue the same straight line as before, with the same velocity.
This is another way to consider the law of inertia for a whole closed system. Unless external forces act upon it, it will continue its uniform motion, no matter how crazy is the motion or interaction of its constituent particles. An extreme case would be a box full with a gas. The motion of the atoms in the gas is incredibly complex, but as a whole, the box will behave as a single particle.
When dealing with system, it is convenient to consider the reference frame for which its centre of mass is at rest. This can be interesting to separate between global motion as a whole and motion about the centre of mass. By going to that frame, we can eliminate the global motion. For a box moving across space, filled with gas, if we go to the frame for which we see the centre of mass of the box (+gas) at rest, we will still see a lot of motion of the gas, but their global |V> will be |0> and we can focus on motion about the centre of mass.
What about the energy of that box? In the frame at which we see its centre of mass at rest, the energy that we observe is called the *internal energy* Eᵢ of the system. As a whole, the box appears having no kinetic energy, but its constituents have a lot of internal kinetic energy. The total internal energy contains the kinetic energy of its constituents but also the potential energy between them. So if we go to another frame in which we see the box moving with uniform velocity |V, and having total mass μ, then its total energy is the sum of the kinetic energy as a whole, (1/2)·μ·V² plus the internal energy,
E = μ/2·V² + Eᵢ.
We can explicitly calculate the law of transformation of energy from one frame to another. Consider E the energy in a frame K and E' the energy in a frame K'. Consider that in frame K we observe velocities |vₐ> and in frame K' we observe velocities |vₐ> = |v'ₐ> + |V>. This means that K' moves with |V> wrt K.
In K, E = ∑(mₐ/2)vₐ² + U = ∑(mₐ/2)(|v'ₐ>+|V>)² + U. Now we develop the square, so
E = ∑(mₐ/2)(v'ₐ² + V² + 2<v'ₐ|V>) + U = = (μ/2)V² + ∑(mₐ/2)v'ₐ² + <V|∑mₐ|v'ₐ> + U.
We identify ∑(mₐ/2)v'ₐ² as μV² and ∑mₐ|vₐ> as |P'>. Then,
E = (μ/2)V² + U + <V|P'> + (μ/2)V².
But E' = T' + U with T' = ∑(mₐ/2)v'ₐ², so we conclude with
E = E' + <V|P'> + (μ/2)V²,
where, for the particular case in which the system K' is for the centre of mass at rest, then |P'>=|0'> and E'=Eᵢ. This expression allows to convert energy between different inertial frames. The last term, (μ/2)V², seems intuitive, but it is not, since V is the speed of K' wrt to K, and not the speed of the moving system (the box, for example) as a whole. Only when the box moves with the same velocity as the frame K', so that K' sees the box at rest, we can think of the term (μ/2)V² as intuitive, since then it is the kinetic energy of the whole. But if the box is not moving exactly like frame K', so that we don't see it at rest from K', then the kinetic energy of the system as a whole is (μ/2)V² + <V|P'>, which is not trivial at all!
Why don't we consider U as changing? U is a function of |rₐ>, and since |vₐ> = |v'ₐ> + |V>, |rₐ> = |r'ₐ> + t|V>. We could have written U(|rₐ>) = U(|r'ₐ> + t|V>).
So why don't we substitute this in U? The reason is that in U, only relative positions of particles are meaningful, or in other words, distances between them are the only relevant quantities. And they will not change with a change of frame. Why can't the potential energy depend on absolute positions? This would be equivalent to assume that space is not homogeneous, since changing the position of the system to another by a global translation should leave the Lagrangian invariant.
Find the law of transformation of S from one inertial frame K' to another K.
For the Lagrangian, L=T-U, the process is exactly the same as for the energy. We only change +U by -U. Then,
L = L' + <V|P'> + (μ/2)V².
And since S=∫Ldt, we get
S = S' + <V|μ|R'> + (μ/2)V²t.