In my special relativity book, there is a derivation of the velocity of a rocket. Let the rocket have rest mass $m$ (which decreases over time) and velocity $v$ in an inertial frame, and let the exhaust have speed $u$ in the accelerating frame of the rocket.
My book states that $$ \frac{d(mv\gamma)}{dv}=\left(\frac{v-u}{1-\frac{vu}{c^2}}\right)\frac{d(m\gamma)}{dv} $$ without any explanation, so I have to prove this myself. The left-hand side is easy. It is the change of the rocket's momentum. I can also understand that$\left(\frac{v-u}{1-\frac{vu}{c^2}}\right)$ is the speed of exhaust in inertial frame. The problem is the last one: $\frac{d(m\gamma)}{dv}$. It is the change in relativistic mass of the rocket. The basic idea of this equation is $$ \text{change in the momentum of rocket}=\text{change in the momentum of the exhausts} $$ so the RHS should be the momentum of the exhaust. However, I don't understand why $\frac{d(m\gamma)}{dv}$ is the mass of exhaust ejected; the rocket have lost $\frac{d(m\gamma)}{dv}$ kilograms of mass, but it doesn't mean that's the mass of the exhaust ejected, because exhaust have different velocity from the rocket, and mass depends on velocity. So I feel that it is not valid to assume $$ \text{mass loss of the rocket}=\text{mass of propellant ejected}. $$
So, is the equation in my book correct? Have I understood anything wrong?