# a mistake related to variable mass system

I'm having a problem with finding my mistake when trying to find the derivative of the momentum when mass is being ejected in a constant rate.

The problem is this - a body in space is burning fuel while the created gas are pushing it forward. The initial mass of the system is $M$ while fuel is being burnt at a rate of $K$ kg/s. gas is being ejected at speed of $-u$ relative to the body.

So at time $t$, the momentum of the body is $P_1 = M(t)v(t)$, the speed of the gas is $v(t) - u$, and therefore it's momentum is $P_2 = kt(v(t) - u)$, summing it all together:

$$P = m(t) v(t) + k t (v(t)-u)$$

taking the derivative will give

$$dp = dm(t) v(t) + dv(t) m(t) + d(kt)(v(t)-u) + d(v(t)-u) kt$$

this results in :

\begin{align} dp &= -k v(t) + a(t) m(t) + k v(t) - ku + a(t) kt \\ &= a(t)(m(t)-kt) -ku \end{align}

which is obviously not the solution shown in here, $$dp=m\,dv-(u-v)dm$$

What have I done wrong?

The momentum is not $P_2 = kt(v(t) - u)$. Imagine a time interval $\Delta t$ small enough that the velocity isn't changing very much, then $K\Delta t$ is how much mass is ejected in that time interval, use the relative velocity to find out the momentum of the gas ejected, that will be equal and opposite to the change in the momentum of the rocket in that time interval $\Delta t$. Then solve.