How long does it take until the tank contains the same amount of both liquid A and liquid B

mathematical modelingordinary differential equations

A tank initially contains 400 litres of liquid A. Liquid B is pumped
into the tank at the rate of 20 litres per minute. The contents of the
tank is pumped out at the same rate of 20 litres per minute. The
mixture is stirred continuously and the tank is kept full at 400
litres at all times. Let X (t) denote the amount (in litres) of liquid
A in the tank after t minutes.

How long does it take until the tank contains the same amount of both liquid A and liquid B?

This is a problem I've seen and solved a few times in different forms and while I understand how to solve it mechanically I don't know why certain choices are made.

I determine that:

$ X(t) = 400(1 – e^{-t/20})$

I know from here to answer the above question I would need to solve for $t$ in the below equation:

$200 = 400(1 – e^{-t/20})$

As I understand it $X(t)$ is the mixture of $A$ and $B$ at a point in time. So if $X(t)$ makes up 200L of the 400L then the tank would be 50% $A$ and 50% ($A$,$B$)

Why have we chosen 200 for $X(t)$?

For how much of this problem is my understanding incorrect?

Best Answer

Let $x(t)$ be the volume of liquid A in the tank. The concentration (a.k.a the fraction) of liquid A in the tank is $\rho(t)=\frac{x(t)}{V}$ where $V$ represents the volume of the tank.

At $t+\Delta t$, the amount of liquid A leaves the tank is $\rho(t)\times q\times \Delta t$ where $q$ represents the rate of liquid leaving the tank.

The amount of liquid A in the tank at $t+\Delta t$ is $x(t+\Delta t)$. \begin{align} x(t+\Delta t) &=x(t)- \rho(t) \times q \times \Delta t\\ &=x(t)- \frac{x(t)}{V} \times q\times \Delta t\\ \frac{x(t+\Delta t)-x(t)}{\Delta t} &= -\frac{q}{V}x(t) \end{align}

Taking $\Delta t \to 0$, we have \begin{align} x'(t)&=-\frac{20}{400}x(t)\\ x(t)&=C e^{-t/20}\\ &= 400 e^{-t/20} \end{align}

At $t=T$ minutes, the amount of liquid A equals to the amount of liquid B.

\begin{align} x(T)&= 400 e^{-T/20}\\ 200 &= 400 e^{-T/20}\\ T&= 20 \ln 2\\ &\approx 13.9 \end{align}

Edit

At the end of the world, the amount of liquid A in the tank must be zero. Let's check.

\begin{align} \lim_{x\to \infty} x(t) &= \lim_{x\to \infty} 400 e^{-t/20}\\ &= 0 \end{align}

I strongly believe that your equation $x(t)=400\big(1-e^{-t/20}\big)$ is not correct.

Related Question