Derivation of Tsiolkovsky rocket equation My textbook derives the rocket equation from conservation of momentum like so:
$$\begin{align}p_i&=p_f \tag{1}\\
mv&={(m-dm_g)}{(v+dv)}+dm_g(v-u)\\
mv&=mv+m\,dv-dm_g\,v-dm_g\,dv+dm_g\,v-dm_g\,u\\
m\,dv &=dm_g\,dv+dm_g\,u\end{align}$$
Here $dm_g$ is the instantaneous change in the amount of fuel expelled, and therefore $dm_g= -dm$, the change in the rocket's mass. The textbook says to discard the $dm_g dv$ term, so we have 
$$m\,dv = - u\,dm \tag{2}$$
Taking $m$ as a a function of time, we can then solve for $\Delta v$:
$$\begin{align}
\int_{v_0}^{v_1} dv &= -u \int_{m_0}^{m_1} \frac{dm}{m} \\
v_1 - v_0 = \Delta v &= u \ln\left(\frac{m_0}{m_1}\right)
\end{align}$$
where $m_1$ is the final mass of the rocket after expelling $-\Delta m$ units of fuel.
My question has to do with the connection between (1) and (2). On the left side of (2), we have $m\, dv$, which derives from the expression $(m-dm_g)(v+dv)$ in (1). In this expression, $m$ represents the initial mass of the rocket-fuel system (hence we subtract $dm_g$ to get the instantaneous mass). Likewise, in (2) it seems to me like $m$ should refer to the rocket's initial mass $m_0$, not its changing mass as a function of time. 
Then (2) instead reads
$$m_0\,dv = - u\,dm \tag{2}$$
and simply
$$\Delta v = -u \left(\frac{m_1 - m_0}{m_0}\right)$$
What's wrong here?
I'd prefer answers that clarify the proof in question, rather than providing alternative proofs from Newton's law.
 A: Since your main confusion is around mass as a function of time, let's explicitly add the label of time from the beginning to be clear as to what we are talking about explicitly. 
You have $p_i=p_f$. What this really refers to is $p_t=p_{t+dt}$. Carrying these labels of time, let's redo the calculation that your textbook does. 
$$\begin{align}
m_tv_t&={(m_t-dm_{g,t})}{(v_t+dv_t)}+dm_{g,t}(v_t-u)\tag{1}\\
\end{align}$$
Notice that I have eliminated any and all use of $t+dt$ from the labeling and expressed everything with a label of $t$. This is justified and necessary: The $dm_g$ is the mass ejected at time $t$ which causes the mass of the rocket at time $t+dt$ to be $m_{t+dt}=m_t-dm_{g,t}$. Similarly, the increase in speed $dv$ is at time $t$, leading to the new speed $v_{t+dt}=v_t+dv_t$. 
Granted, talking about "increase at time $t$" is a loose way of speaking, but if I want to be properly rigorous, I'd need to start talking in terms of time-derivatives and this would amount to simply using Newton's law which you have forbidden me from doing :) But I hope the intuitive meaning of my labeling makes sense. 
Let's carry out the rest of the calculation in this labeling. However, we don't really need to do that explicitly because all the symbols have the same label $t$ and so we can just add this label to the end result which we know from the calculation in your textbook. You can explicitly perform the calculations with the labels starting from Equation $\text{(1)}$ and confirm that it leads to
$$\begin{align}
m_t\,dv_t &=dm_{g,t}\,dv_t+dm_{g,t}\,u\\
\implies m_t\,dv_t&=-dm_t\,u \tag{2}
\end{align}$$
Here, it is explicitly clear that $m_t$ is the mass at time $t$. But let's understand this better. The answer doesn't lie in the trick I did with the $t$ labels, that just magnifies the point but doesn't create it. The point is that when you write $m\,dv=-dm\,u$, you're right that $m$ doesn't represent the final mass, it represents the initial mass, but that's not an issue, in fact, it is desired. You have to see this relation as an equation for $dm$ and $dv$. In other words, it tells you that if you start with a mass $m$ then the differential change in the mass and the differential change in the velocity are related by the formula $m\,dv=-dm\,u$ where $m$ is the mass before the differential change. Now, you again start with the mass $m+dm$ and do the same process, ad infinitum. Or, you can do the integration. 

A Comment Regarding OP's Answer
The term $dm_g\,dv$ has to be ignored because it is a second-order differential term. Furthermore, if you keep the term then what you obtain is actually $$m_{t+dt}dv_t=-dm_tu$$which cannot be straightforwardly integrated because of the fact that all terms don't represent quantities at the same time $t$.  
A: I believe the textbook's instruction to disregard the $dm_g\,dv $ term is in error. 
If we leave it in, and let $m_0$ denote the initial mass and $dm = -dm_g$ the change in mass, (1) reduces to 
$$\begin{align}
m_0\,dv - dm_g dv &= u\,dm_g \\
(m_0 - dm_g) dv &= u\,dm_g  \\
m \,dv &= -u\,dm
\end{align}$$
where $m$ refers properly to the mass as a function of time. Is this correct?
