# Momentum of the exhaust of a rocket

I was set out to derive the equation of motion of a rocket under the influence of a uniform gravitational field. The equation is as follows $$m\frac{dv}{dt}=-v'\frac{dm}{dt}-mg$$ where $$v$$ is the velocity of the rocket as seen from the ground and $$v'$$ is the velocity of the exhaust gases as seen from the rocket. $$m$$ is the mass of the rocket. I wrote the total momentum of the ensemble at time $$t$$ like this $$p=mv+m_E\,(v'+v).$$ But clearly this is wrong, as differentiating it wrt to time yields $$m\frac{dv}{dt}+v\frac{dm}{dt}-\frac{dm}{dt}(v'+v)+m_E\frac{dv}{dt}$$ (where conservation of mass was used to convert the mass derivative). I also saw in this post that the correct expression for the momentum of the exhaust gasses was $$\int_{t_0}^t(v'+v)\frac{dm}{dt'}dt'$$ So my question is why is my expression wrong and this one right. I understand that this is equivalent to summing the momentum of each infinitesimal chunk of mass expelled but I still don't understand why that is necessary or why my version doesn't work.

$$p=mv+m_E\,(v-v')$$