A Surprising Appearance of the Irrational Number $\,\text{e}\,$; Diluting a Toxic Liquid

[Many thanks to my brilliant husband Ray, who formulated this problem and said ‘I think the number $\,\text{e}\,$ is lurking here somewhere’.]

The irrational number $\,\text{e}\,$ can show up in unexpected places! Here's a real-life problem where the number $\,\text{e}\,$ makes a surprising appearance. The appearance of $\,\text{e}\,$ isn't until the very end, so be patient!

We recently suspected that we had a batch of bad (toxic) water in our RV (Recreational Vehicle). It's not easy to completely empty the tank—a little bit is always left in the bottom and gets mixed into the newly-added water. We wanted to flush out the bad stuff, and be certain that the level of toxicity that remained was very, very small.

Of course, we could probably rig up some type of siphon to completely eliminate the toxic liquid. Or, we might tie together strips of rags, insert in the tank, and soak up the bad stuff. Instead, we pulled out the ‘mathematical toolbox’ and went to work.

We started pondering:

Let's formulate the situation mathematically. We'll define an iteration to be:  add clean (non-toxic) liquid; drain. (For us, the ‘clean liquid’ is safe water!) Each time the tank is drained, the same (newly-diluted) amount remains in the tank.

We will assume perfect mixing. That is, every time clean liquid is added, it gets thoroughly mixed with the prior solution.

Let:

At start-up, the liquid in the tank is considered to be $\,100\%\,$ toxic. After each iteration (add clean liquid, drain), the resulting liquid is part toxic and part clean.

The volume units for $\,x\,$ and $\,y\,$ must be the same. Depending upon the tank size, units of gallons, cubic feet, or fluid ounces might be appropriate.

Define toxicity as the fraction of the diluted volume that is toxic. Because of the assumption of perfect mixing, if (say) $\,50\%\,$ is toxic after adding clean liquid, then $\,50\%\,$ is still toxic after draining.

The First Iteration

As an example, suppose that $\,x = y\,.$ That is, you're pouring in the same amount that is left in the tank. Then:

$$\frac{x}{x+y} = \frac{x}{2x} = \frac 12 = 50\%$$

For this example, the toxicity would be $\,50\%\,$ after the first iteration.

The Second Iteration

We'll look at just one more iteration, to ensure that the emerging pattern is crystal clear.

The Third Iteration

Here's a table that summarizes the first few iterations:

Iteration Toxicity after iteration Volume of toxic solution at end of iteration
initial state initial toxicity: $$\frac{x}{x} = 1 = 100\%$$ $$x$$
$$1$$ $$\frac{x}{x+y}$$ $$\left(\frac{x}{x+y}\right)\cdot x$$
$$2$$ $$\left( \frac{x}{x+y}\right)^2$$ $$\left(\frac{x}{x+y}\right)^2\cdot x$$
$$3$$ $$\left( \frac{x}{x+y}\right)^3$$ $$\left(\frac{x}{x+y}\right)^3\cdot x$$

The Toxicity After $\,n\,$ Iterations

A clear pattern is established.

The toxicity at the end of iteration $\,n\,$ is $\displaystyle\,\left(\frac{x}{x+y}\right)^n\,.$

(If desired, proof by induction can be used to verify this formula.)

Minimizing the Toxicity with Unlimited Clean Liquid Available

Note that $\,y\,$ is always strictly positive, since we're always diluting with some clean liquid. Thus, $\,\frac{x}{x+y}\,$ is always less than $\,1\,,$ since the denominator is greater than the numerator.

Multiplication by a number less than $\,1\,$ always results in a smaller number.

Therefore, viewed as a function of $\,n\,,$ $\,\left( \frac{x}{x+y} \right)^n\,$ is a strictly decreasing function. This is not surprising—we expect the toxicity to go down after each iteration of  ‘add clean liquid and drain’.

Also notice that as $\,n\,$ goes to infinity, the toxicity goes to zero.

For a fixed value of $\,n\,$ and an unlimited supply of clean liquid, how can we make the toxicity as small as possible? Make $\,y\,$ as big as possible! That is, fill the tank, drain, and repeat. Again, no surprise here.

Let's look at a specific example. Suppose there are always $\,0.5\,$ gallons left when a $\,16\,$ gallon water tank is drained. (We have a very small trailer!) Let's fill and drain three times. Thus, let:

The resulting toxicity is:

$$ \begin{align} &\left(\frac{x}{x+y}\right)^3\cr\cr &\qquad = \left(\frac{0.5}{0.5+15.5}\right)^3\cr\cr &\qquad = \frac{1}{32{,}768} \end{align} $$

One part in $\,32{,}768\,$ parts. That's pretty dilute!

Minimizing the Toxicity for a Fixed Volume of Clean Liquid

Here's the more interesting situation. Suppose there is only a fixed volume $\,T\,$ of clean liquid available, to be used in $\,n\,$ iterations. Thus, $\,y = \frac{T}{n}\,$ is added at each iteration.

The toxicity after $\,n\,$ iterations is:

$$ \begin{align} &\text{toxicity after $\,n\,$ iterations }\cr\cr &\quad = \left( \frac{x}{x+y}\right)^n\cr &\qquad\ \ \text{(formula for toxicity)} \cr\cr &\quad = \left( \frac{x}{x+\frac{T}{n}}\right)^n\cr &\qquad\ \ \text{(definition of $\,y\,$)} \cr\cr &\quad = \left( \frac{\frac 1x\cdot x}{\frac 1x\bigl(x+\frac{T}{n}\big)}\right)^n\cr &\qquad\ \ \text{(multiply by $\,1\,$ inside the parentheses,}\cr &\qquad \ \ \ \ \text{in the form $\frac{\frac 1x}{\frac 1x}$)} \cr\cr &\quad = \left( \frac{1}{1 + \frac{T/x}{n}}\right)^n\cr &\qquad\ \ \text{(algebra)} \cr\cr &\quad = \frac{1}{\bigl(1 + \frac{T/x}{n}\bigr)^n}\cr &\qquad\ \ \text{(algebra, and $\,1^n = 1\,$ for all $\,n\,$)} \end{align} $$

At this point, we need to borrow a fact from calculus:

$$ \text{as } n\rightarrow\infty,\quad \bigl(1 + \frac {t}{n}\bigr)^n \rightarrow {\text{e}}^t $$

You saw a special case of this result in an earlier section:

$$ \text{as } n\rightarrow\infty,\quad \bigl(1 + \frac {1}{n}\bigr)^n \rightarrow {\text{e}}^1 = \text{e} $$

Thus:

$$ \text{as } n\rightarrow\infty,\quad \left(1 + \frac {T/x}{n}\right)^n \rightarrow {\text{e}}^{T/x} $$

Recall that toxicity is a decreasing function of $\,n\,$:  for each additional iteration, the toxicity gets smaller. With a fixed volume of clean liquid available, more iterations mean that you are pouring in less each time.

In this situation, though, you don't approach a toxicity of zero! Instead:

$$ \text{as } n\rightarrow\infty, \qquad \frac{1}{\bigl(1 + \frac{T/x}{n}\bigr)^n} \rightarrow \frac{1}{{\text{e}}^{T/x}} $$

So, there's the surprising appearance of the irrational number $\,\text{e}\,$! To minimize the toxicity with a fixed amount of clean liquid available, we should pour in a tiny bit, drain, and repeat, repeat, repeat!

Here's a comparison of the toxicity levels achieved for three different ‘flushing’ scenarios. Each assumes we have 10 gallons of clean water available to flush out our 16 gallon tank, which starts out having 0.5 gallons of toxic water at the bottom.

Scenario Values of Variables Toxicity
Use all the clean water at once $$ \begin{gather} x = 0.5\cr y = 10\cr n = 1 \end{gather} $$ $$ \frac{0.5}{0.5+10} = \frac 1{21} $$
Pour in $\,5\,$ gallons, drain, repeat $$ \begin{gather} x = 0.5\cr y = 5\cr n = 2 \end{gather} $$ $$ \left(\frac{0.5}{0.5+5}\right)^2 = \frac 1{121} $$
Use all the water in five equal volume iterations $$ \begin{gather} x = 0.5\cr y = \frac{10}{5} = 2\cr n = 5 \end{gather} $$ $$ \left(\frac{0.5}{0.5+2}\right)^5 = \frac 1{3125} $$

What is the best that we could do (mathematically, not realistically) with this scenario? The limiting value is:

$$ \frac{1}{{\text{e}}^{T/x}} = \frac{1}{{\text{e}}^{10/0.5}} \approx \frac{1}{4.85\times 10^8} $$

That's pretty close to zero!

Concept Practice