# The time derivative term in the continuity equation

The integral form of the continuity equation is written as:

$$\frac{dq}{dt} + \oint_{S} \textbf{j} . d\textbf{S} = \Sigma$$

where $$q$$ is the amount of quantity in a certain volume $$V$$, $$t$$ is the time, $$j$$ is the flux of $$q$$ per unit surface and per unit area, $$S$$ is the surface, $$\oint_{S}$$ is the closed intergral over the surface of the volume $$V$$, and $$\Sigma$$ is the sources/sinks of $$q$$.

Now an example was given from the same source, to give an intuitive explanation, which included the surface integral along with sinks and sources, but it didn't include time derivative, so I'm curious to know how would the quantity (number of people) in the case of the following example would change with respect to time alone; the example is:

In a simple example, V could be a building, and q could be the number of people in the building. The surface S would consist of the walls, doors, roof, and foundation of the building. Then the continuity equation states that the number of people in the building increases when people enter the building (an inward flux through the surface), decreases when people exit the building (an outward flux through the surface), increases when someone in the building gives birth (a source, Σ > 0), and decreases when someone in the building dies (a sink, Σ < 0).

The example does include the time derivative term. When they say that "the number of people in the building increases" they are saying that $$dq/dt > 0$$, for example.

Maybe it becomes more clear if you first consider the source-free ($$\Sigma = 0$$) case,

$$\frac{dq}{dt} = - \oint \mathbf j \cdot d \mathbf S.$$

Then "people enter the building" corresponds to the integral being negative1, so that $$dq/dt > 0$$, which in turn means that "the number of people in the building increases" with time. Similarly the integral being positive means "people exit the building", and we get $$dq/dt < 0$$, or "the number of people in the building decreases" over time.

You can make sense of the source term $$\Sigma$$ in a similar way. Just note that the sources and sinks must be enclosed by the surface $$S$$ (i.e. within the building) in order to count.

1 The integration surface is oriented such that outwards flux is positive. This is clear from context, even if it isn't explicitly stated.

Time wasn't mentioned in the example, but it was still implicitly assumed. E.g., in the line

Then the continuity equation states that the number of people in the building increases when people enter the building (an inward flux through the surface)

the example assumes that this increase happens over a time period $$dt$$ over which the inward flux of people is $$j$$. Since the example has its focus on $$q$$ (the number of people), therefore the time interval has been integrated over.