Variable-mass system
In mechanics, a variable-mass system is a collection of matter whose mass varies with time. It can be confusing to try to apply Newton's second law of motion directly to such a system. Instead, the time dependence of the mass m can be calculated by rearranging Newton's second law and adding a term to account for the momentum carried by mass entering or leaving the system. The general equation of variable-mass motion is written as

where Fext is the net external force on the body, vrel is the relative velocity of the escaping or incoming mass with respect to the center of mass of the body, and v is the velocity of the body.  In astrodynamics, which deals with the mechanics of rockets, the term vrel is often called the effective exhaust velocity and denoted ve.

Derivation 
There are different derivations for the variable-mass system motion equation, depending on whether the mass is entering or leaving a body (in other words, whether the moving body's mass is increasing or decreasing, respectively).  To simplify calculations, all bodies are considered as particles. It is also assumed that the mass is unable to apply external forces on the body outside of accretion/ablation events.

Mass accretion 

The following derivation is for a body that is gaining mass (accretion).  A body of time-varying mass m moves at a velocity v at an initial time t. In the same instant, a particle of mass dm moves with velocity u with respect to ground.  The initial momentum can be written as

Now at a time t + dt, let both the main body and the particle accrete into a body of velocity v + dv.  Thus the new momentum of the system can be written as

Since dmdv is the product of two small values, it can be ignored, meaning during dt the momentum of the system varies for

Therefore, by Newton's second law

Noting that u - v is the velocity of dm relative to m, symbolized as vrel, this final equation can be arranged as

Mass ablation/ejection 

In a system where mass is being ejected or ablated from a main body, the derivation is slightly different.  At time t, let a mass m travel at a velocity v, meaning the initial momentum of the system is

Assuming u to be the velocity of the ablated mass dm with respect to the ground, at a time t + dt the momentum of the system becomes

where u is the velocity of the ejected mass with respect to ground, and is negative because the ablated mass moves in opposite direction to the mass. Thus during dt the momentum of the system varies for

Relative velocity vrel of the ablated mass with respect to the mass m is written as

Therefore, change in momentum can be written as

Therefore, by Newton's second law

Therefore, the final equation can be arranged as

Forms 

By the definition of acceleration, a = dv/dt, so the variable-mass system motion equation can be written as

In bodies that are not treated as particles a must be replaced by acm, the acceleration of the center of mass of the system, meaning

Often the force due to thrust is defined as  so that

This form shows that a body can have acceleration due to thrust even if no external forces act on it (Fext = 0).  Note finally that if one lets Fnet be the sum of Fext and Fthrust then the equation regains the usual form of Newton's second law:

Ideal rocket equation 

The ideal rocket equation, or the Tsiolkovsky rocket equation, can be used to study the motion of vehicles that behave like a rocket (where a body accelerates itself by ejecting part of its mass, a propellant, with high speed). It can be derived from the general equation of motion for variable-mass systems as follows: when no external forces act on a body (Fext = 0) the variable-mass system motion equation reduces to

If the velocity of the ejected propellant, vrel, is assumed have the opposite direction as the rocket's acceleration, dv/dt, the scalar equivalent of this equation can be written as
 

from which dt can be canceled out to give

Integration by separation of variables gives

By rearranging and letting Δv = v1 - v0, one arrives at the standard form of the ideal rocket equation:

where m0 is the initial total mass, including propellant, m1 is the final total mass, vrel is the effective exhaust velocity (often denoted as ve), and Δv is the maximum change of speed of the vehicle (when no external forces are acting).

References 

Classical mechanics
Mechanics