At time \(t=0\) a tank contains one unit of water. Water flows out of the tank at a rate proportional to the amount of water in the tank. The amount of water in the tank at time \(t\) is \(y\). Show that there is a constant \(b < 1\) such that \(y=b^{t}.\)
Suppose instead that the tank contains one unit of water at time \(t=0,\) but that in addition to water flowing out as described, water is added at a steady rate \(a>0.\) Show that
\[
\frac{\mathrm{d}y}{\mathrm{d}t}-y\ln b=a,
\]
and hence find \(y\) in terms of \(a,b\) and \(t\).
Solution:
Since water flows out a rate proportional to the water in the tank we must have \(\dot{y} = -ky\), ie \(y = Ae^{-k t}\). Since \(t = 0, y = 1\) we have \(y = e^{-kt} = (e^{-k})^t\), so call \(b = e^{-k}\) and we have the result. (Since \(k > 0 \Rightarrow b < 1\)
Notice that
\begin{align*}
&& \dot{y} &= -\underbrace{ky}_{\text{flow out}} + \underbrace{a}_{\text{flow in}} \\
&&&= y\ln b + a \\
\Rightarrow && \dot{y} - y \ln b &= a \\
\\
\text{CF}: && y &= Ae^{\ln b t} = Ab^t\\
\text{PI}: && y &= -\frac{a}{\ln b} \\
t = 0, y = 1: && 1 &= A-\frac{a}{\ln b} \\
\Rightarrow && y &= \frac{a}{\ln b} \left ( b^t - 1 \right)+b^t
\end{align*}