A dilution problem (example $4$, Tom Apostol's Calculus vol $1$, section $8.6$) The problem setup (from page $316$ in Tom Apostol's Calculus Vol $1$ book) is as follows. A tank contains $V = 100$ gallons of brine, whose concentration is $\rho(0) = 2.5$ pounds of salt per gallon. Brine containing $\rho_i = 2$ pounds of salt per gallon runs into the tank at speed $v_i = 5$ gallons per minute. The concentration of salt is kept uniform by steering, and the brine runs out at the same speed of $v_o = 5$ gallons per minute. What is the amount of salt in the tank at every instant in time.
The solution says that there are 2 components which change the amount of salt in the tank:

*

*The incoming brine at 2 pounds per gallon, at speed 5 gallons per minute.

*The running out brine at 5 gallons per minute.

From $1$, the rate of the salt amount change is $dy/dt = 10 \frac{lb}{min}$. From 2, the rate of salt amount change is $dy/dt = -y/20 \frac{lb}{min}$. From that the equation follows:
$y' = 10 - \frac{y}{20}$
But I am not sure how to go deeper into the derivation.
The concentration is defined as $\rho(t) = \frac{m(t)}{v(t)}$, instead of $\rho = \frac{dm}{dt}$ (link), but I don't know how to look at the outgoing mass.
I would start like this:

*

*Incoming mass: $m_i(t) = \rho_i v_i t$. The rate of change: $\frac{dm_i}{dt} = \rho_i v_i = 10$

*Outgoing mass: $m_o(t) = \rho(t) v_o t = \frac{m(t)}{V} v_o t$. The rate of change: $\frac{dm_o}{dt} = \frac{v_o}{V} (m'(t) t + m(t)) = \frac{y' t}{20} - \frac{y}{20}$
Then the equation would be:
$y' = 10 - \frac{y' t}{20} - \frac{y}{20}$
Which is incorrect. I understand that the outgoing rate change should be $\rho(t) v_o = \frac{m(t) v_o}{V}$ (link), but I'm not sure how to derive that.
Any suggestions?
 A: It becomes too long for comments.
To write correct expression for $m_o'(t)$ one needs to have some basic formula.
Let use basic formula $m_o=\rho v_o t$. There is problem with direct using of this formula because this formula is incorrect for $\rho$ changing with time: at $\rho=2.5$ lb/gal system loses (hereafter we didn't considering income of salt) $\rho v_o=12.5$ lb/min of salt and at $\rho=2$ lb/gal system loses $\rho v_o=10$ lb/min of salt, then time moments are not equivalent and $m_o$ is not proportional to $t$.
Then we need somehow modify basic formula to get working for $\rho$ changing with time. Let consider infinitesimal time interval when $\rho$ can be considered as constant. Then we use the fact that basic formula works for constant $\rho$ and assume that basic formula works for almost constant $\rho(t)$, then during this infinitesimal time interval of duration $dt$ system will lose $dm_o=\rho(t) v_o dt$ of salt. Then there are two options: combine infinitesimal intervals from 0 to $t$ and get total $m_o$ as sum of infinitesimal increases $dm_o$, which is integral; or just divide both parts by $dt$ to get ratio of infinitesimal increases of function $dm_o$ and independent variable $dt$, which is derivative. Resulting formulae are
$$m_o(t)=m_o(0)+\int_0^t \rho(t) v_o \, dt$$
$$m_o'(t)=\rho(t) v_o$$
Another option for getting the same result is physical analysis of problem. If we assume that $m_o'(t)$ depend only on $\rho(t)$ and $v_o$, then we can write $m_o'(t)=f(\rho(t),v_o)$. Then we can use this equation for case of constant $\rho$, when we assume basic formula is working. Considering this case we can get $f(\rho,v_o)=\rho v_o$, then in general case $m_o'(t)=\rho(t) v_o$.
From pure mathematical point of view there is possibility that $m_o'(t)$ depend on something except $\rho(t)$ and $v_o$, for example $m_o'(t)=f(\rho(t),v_o,\rho'(t))$. In this case we cannot solve the problem, because given information is not enough to recover $f$. That's why obtaining formula $m_o'(t)=\rho(t) v_o$ is out of pure mathematics. We need to use some additional assumptions outside from mathematics. These assumptions are bold-fonted above.
