# A SURPRISING APPEARANCE OF THE IRRATIONAL NUMBER $\,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 $\,e\,$ can show up in unexpected places!
Here's a real-life problem where the number $\,e\,$ makes a surprising appearance.
The appearance of $\,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:

• Is it better to add a lot of water (e.g., fill the tank) and then drain?
Or, should we add just a little and then drain, over and over?
• What will the toxicity concentration be after each iteration of ‘add clean water, drain’?

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

• $\,x = \text{volume of toxic liquid in the tank}\,$
This is the initial volume of toxic liquid.
It is the volume that can't easily be drained from the tank.
It is the volume that remains after each draining.
• $\,y = \text{volume of clean (non-toxic) liquid added at each iteration for dilution}\,$
On each iteration, this same volume is added.

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

• The volume of toxic liquid in the tank is $\,x\,$.
• Add volume $\,y\,$ of clean liquid.
• Before draining, there is now $\,x + y\,$ (perfectly mixed solution) in the tank.
• What fraction of this diluted volume, $\,x + y\,$, is toxic?   Answer:   $\displaystyle\,\frac{\text{toxic volume}}{\text{total volume}} = \frac{x}{x + y}$
This ratio has no units; the units cancel out.
For example, unit analysis shows that $\frac{\text{gal}}{\text{gal} + \text{gal}} = \frac{\text{gal}}{\text{gal}} = \text{unitless}\,$.

Thus, $\,\displaystyle\frac{x}{x+y} = \left( \frac{x}{x+y}\right)^1\,$ is the toxicity after 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, $\displaystyle\,\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

• At the end of the first iteration, the toxicity is $\displaystyle\,\frac{x}{x+y}\,$.
This is the fraction of the total volume ($\,x\,$) that is toxic.
• Therefore, the volume of toxic liquid in the tank at the beginning of the second iteration is $\displaystyle\,\left(\frac{x}{x+y}\right)\cdot x\,$.
(There's also a clean portion, but it isn't needed for our computation.)
• Add volume $\,y\,$ of clean liquid.
• Before draining, the total volume is always $\,x + y\,$.
• What fraction of the diluted volume, $\,x + y\,$, is toxic?   Answer:   $\displaystyle\, \frac{\text{toxic volume}}{\text{total volume}} = \frac{\left(\frac{x}{x+y}\right)\cdot x}{x+y} = \left(\frac{x}{x+y}\right)\cdot \left(\frac{x}{x+y}\right) = \left( \frac{x}{x+y}\right)^2$
Thus, $\displaystyle\,\left( \frac{x}{x+y}\right)^2\,$ is the toxicity after the second iteration.
We'll look at just one more iteration, to ensure that the emerging pattern is crystal clear.

## The Third Iteration

• At the end of the second iteration, the toxicity is $\displaystyle\,\left( \frac{x}{x+y}\right)^2\,$. This is the fraction of the total volume ($\,x\,$) that is toxic.
• The volume of toxic liquid in the tank at the beginning of the third iteration is $\displaystyle\,\left( \frac{x}{x+y}\right)^2\cdot x\,$.
• Add volume $\,y\,$ of clean liquid, bringing the total volume to (as always) $\,x + y\,$.
• What fraction of the diluted volume, $\,x + y\,$, is toxic?   Answer:   $\displaystyle\, \frac{\text{toxic volume}}{\text{total volume}} = \frac{\left(\frac{x}{x+y}\right)^2\cdot x}{x+y} = \left(\frac{x}{x+y}\right)^2\cdot \left(\frac{x}{x+y}\right) = \left( \frac{x}{x+y}\right)^3$
Thus, $\displaystyle\,\left( \frac{x}{x+y}\right)^3\,$ is the toxicity after the third iteration.

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

iteration toxicity
after iteration $\,i\,$
volume of TOXIC solution
at end of iteration
initial state initial toxicity:   $\displaystyle \frac{x}{x} = 1 = 100\%$ $x$
$1$ $\displaystyle\frac{x}{x+y}$ $\displaystyle\left(\frac{x}{x+y}\right)\cdot x$
$2$ $\displaystyle\frac{\left(\frac{x}{x+y}\right)\cdot x}{x+y} = \left(\frac{x}{x+y}\right)\cdot \left(\frac{x}{x+y}\right) = \left( \frac{x}{x+y}\right)^2$ $\displaystyle\left(\frac{x}{x+y}\right)^2\cdot x$
$3$ $\displaystyle\frac{\left(\frac{x}{x+y}\right)^2\cdot x}{x+y} = \left(\frac{x}{x+y}\right)^2\cdot \left(\frac{x}{x+y}\right) = \left( \frac{x}{x+y}\right)^3$ $\displaystyle\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, $\displaystyle\,\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\,$, $\displaystyle\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:

• $\,x = 0.5\,$
• $\,y = 16-0.5 = 15.5\,$
• $\,n = 3\,$
The resulting toxicity is: $$\left(\frac{x}{x+y}\right)^3 = \left(\frac{0.5}{0.5+15.5}\right)^3 = \frac{1}{32{,}768}$$ 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, $\displaystyle\,y = \frac{T}{n}\,$ is added at each iteration.

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

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!

Master the ideas from this section