Example \(\PageIndex{2}\)

Let us discuss a common simple application of linear equations. This type of problem is used often in real life. For example, linear equations are used in figuring out the concentration of chemicals in bodies of water (rivers and lakes).

Figure \(\PageIndex{1}\)

A \(100\) liter tank contains \(10\) kilograms of salt dissolved in \(60\) liters of water. Solution of water and salt (brine) with concentration of \(0.1\) kilograms per liter is flowing in at the rate of \(5\) liters a minute. The solution in the tank is well stirred and flows out at a rate of \(3\) liters a minute. How much salt is in the tank when the tank is full?

**Solution**

Let us come up with the equation. Let \(x\) denote the kilograms of salt in the tank, let \(t\) denote the time in minutes. For a small change \( \Delta t\) in time, the change in \(x\) (denoted \( \Delta x\)) is approximately

\[ \Delta x \approx \text{(rate in x concentration in)}\Delta t - \text{(rate out x concentration out)}\Delta t.\]

Dividing through by \(\Delta t\) and taking the limit \(\Delta t \rightarrow 0\) we see that

\[\frac{dx}{dt} = \text{(rate in x concentration in)} - \text{(rate out x concentration out)}\]

In our example, we have

\[\begin{align}\begin{aligned} \text{rate in} &= 5, \\ \text{concentration in} &= 0.1, \\ \text{rate out} &= 3, \\ \text{concentration out} &= \frac{x}{\text{volume}} = \frac{x}{60 + (5 - 3)t} .\end{aligned}\end{align}\]

Our equation is, therefore,

\[\frac{dx}{dt} = \text{(5 x 0.1)} - \left ( 3 \frac{x}{60 + 2t} \right)\]

Or in the form \(\eqref{eq:1}\)

\[\frac{dx}{dt} + \frac{3}{60 + 2t}x = 0.5\]

Let us solve. The integrating factor is

\[r(t) = \text{exp} \left ( \int \frac{3}{60 + 2t} dt \right ) = \text{exp} \left ( \frac{3}{2} \ln (60 + 2t) \right ) = {(60 + 2t)}^{3/2}\]

We multiply both sides of the equation to get

\[\begin{align}\begin{aligned} (60 + 2t)^{3/2} \frac{dx}{dt} + (60 + 2t)^{3/2} \frac{3}{60 + 2t}x &= 0.5(60 + 2t)^{3/2}, \\ \frac{d}{dt} \left [ (60 +2t)^{3/2}x \right ] &= 0.5(60 + 2t)^{3/2}, \\ (60 + 2t)^{3/2} x&= \int 0.5(60 + 2t)^{3/2}dt + C, \\ x &= (60 + 2t)^{-3/2} \int \frac {(60 + 2t)^{3/2}}{2}dt + C(60 + 2t)^{-3/2} , \\ x &= (60 + 2t)^{-3/2} \frac{1}{10} (60 + 2t)^{5/2} + C(60 + 2t)^{-3/2}, \\ x &= \frac {(60 + 2t)}{10} + C(60 + 2t)^{-3/2}.\end{aligned}\end{align}\]

We need to find \(C\). We know that at \(t = 0\), \(x = 10\). So

\[10 = x(0) = \frac {60}{10} + C{(60)}^{-3/2} = 6 + C{(60)}^{-3/2}\]

or

\[C = 4({60}^{3/2}) \approx 1859.03.\]

We are interested in \(x\) when the tank is full. So we note that the tank is full when \(60 + 2t = 100\), or when \(t = 20\). So

\[\begin{align}\begin{aligned} x(20) &= \frac{60 + 40}{10} + C{(60 + 40)}^{-3/2}\\ & \approx 10 + 1859.03{(100)}^{-3/2} \approx 11.86.\end{aligned}\end{align}\]

See Figure \(\PageIndex{2}\) for the graph of \(x\) over \(t\).

Figure \(\PageIndex{2}\): Graph of the solution \(x\) kilograms of salt in the tank at time \(t\).

The concentration at the end is approximately \(0.1186\) ^{kg}/_{liter} and we started with \(\frac{1}{6}\) or \(0.167\) ^{kg}/_{liter}.