A tank has $1000 m^3$ of salt solution. The salt concentration is $10\frac{kg}{m^3}$. At time zero, salt-free water starts to flow into the tank at a rate of $10\frac{m^3}{min}$. Simultaneously salt solution flows out of the tank at $10\frac{m^3}{min}$, so that the volume of the solution in the tank is always $1000 m^3$. A mixer in the tank keeps the concentration of of salt in the entire tank constant; the concentration in the effluent is the same at the concentration in the tank. What is the concentration in the effluent as a function of time?
[Math] Salt concentration as a function of time
ordinary differential equations
Related Solutions
You can add a fourth line to your matrix, representing "tank 4" which is really the outside world. Why are the values in your matrix so small instead of being the single digit whole numbers of the problem?
Added: OK, I see that. So presumably you start with pure water in the tanks and are trying to calculate the salt concentration as a function of time. Now the matrix multiply is making sense-let $x_1,x_2,x_3$ be kg of salt in each tank. One equation would be $x_1'=1.5-0.07x_1+0.02x_2+0.02x_3$ so putting the outflows on the diagonal is correct. You should just add a column vector which is the input from the outside world, getting $$\begin {bmatrix} x_1'\\x_2'\\x_3'\end {bmatrix}= \begin {bmatrix}-.07&.02&.02\\ .04&-.04&0\\ .03&.02&-.05\end {bmatrix}\begin {bmatrix}x1\\ x2\\ x3\end {bmatrix}+\begin {bmatrix}1.5\\ 0\\ 0\end {bmatrix}$$
(NOTE: My first answer was wrong. This is a corrected answer.)
Concentration is the amount of solute (salt in this case) divided by the volume of the solution (brine in this case). So assuming that the unit of $x$, the amount of salt, is pounds, the concentration of the brine in the tank at the start is
$$\frac x{100}\frac{\text{lb}}{\text{gal}}$$
However, the volume in the tank does not remain at $100$ gallons. The inflow of liquid has the rate $3\frac{\text{lb}}{\text{gal}}$ while the outflow has the rate $2 \frac{\text{lb}}{\text{gal}}$, so the net inflow is $1 \frac{\text{lb}}{\text{gal}}$. So the volume of the tank at time $t$ is not $100$ but rather $100+t$.
Therefore the concentration of salt in the tank at time $t$ is
$$\frac x{100+t}\frac{\text{lb}}{\text{gal}}$$
Because of that, your differential equation is correct. The rate of flow of salt into the tank is $2 \frac{\text{lb}}{\text{gal}}\cdot 3\frac{ \text{gal}}{ \text{min}}=6\frac{\text{lb}}{\text{min}}$. The rate of flow of salt out of the tank is the concentration of the brine times the rate of flow out, namely $\frac{x}{100+t}\cdot 2\frac{ \text{lb}}{ \text{min}}$. Therefore, your equation is
$$\frac{dx}{dt}=6-\frac{2x}{100+t}$$
with the initial value
$$x(0)=100\cdot 0.5$$
How did you get the correct equation without understanding the concentration? Anyway, the meaning of $\frac{dx}{dt}$ is the rate of change of the mass of salt in the tank, not the concentration.
Best Answer
Suppose the concentration at time $t$ is $c(t)$ so $c(0)=10 \; kg/m^3$.
You have $$c'(t) = - \frac{10 \;m^3/min}{1000 \; m^3} c(t)$$
so $c(t) = k \exp(-t/100)$ for some constant $k$ and from the starting condition $k = 10 \; kg/m^3$ so
$$c(t) = 10 \, \exp\left(\frac{-t}{100}\right) \; kg/m^3.$$