7.4: Applications
7.4.1. Compound Interest
The equation for the growth of an investment with continuous compounding of interest is a first-order differential equation. Let \(S(t)\) be the value of the investment at time \(t\) , and let \(r\) be the annual interest rate compounded after every time interval \(\Delta t\) . We can also include deposits (or withdrawals). Let \(k\) be the annual deposit amount, and suppose that an installment is deposited after every time interval \(\Delta t\) . The value of the investment at the time \(t+\Delta t\) is then given by
\[S(t+\Delta t)=S(t)+(r \Delta t) S(t)+k \Delta t, \nonumber \]
where at the end of the time interval \(\Delta t, r \Delta t S(t)\) is the amount of interest credited and \(k \Delta t\) is the amount of money deposited \((k>0)\) or withdrawn \((k<0)\) . As a numerical example, if the account held \(\$ 10,000\) at time \(t\) , and \(r=6 \%\) per year and \(k=\$ 12,000\) per year, say, and the compounding and deposit period is \(\Delta t=1\) month \(=1 / 12\) year, then the interest awarded after one month is \(r \Delta t S=(0.06 / 12) \times\) \(\$ 10,000=\$ 50\) , and the amount deposited is \(k \Delta t=\$ 1000\) .
Rearranging the terms of Equation \ref{7.14} to exhibit what will soon become a derivative, we have
\[\frac{S(t+\Delta t)-S(t)}{\Delta t}=r S(t)+k \nonumber \]
The equation for continuous compounding of interest and continuous deposits is obtained by taking the limit \(\Delta t \rightarrow 0\) . The resulting differential equation is
\[\frac{d S}{d t}=r S+k \nonumber \]
which can solved with the initial condition \(S(0)=S_{0}\) , where \(S_{0}\) is the initial capital. We can solve either by separating variables or by using an integrating factor; I solve here by separating variables. Integrating from \(t=0\) to a final time \(t\) ,
\[\begin{gathered} \int_{S_{0}}^{S} \frac{d S}{r S+k}=\int_{0}^{t} d t, \\ \frac{1}{r} \ln \left(\frac{r S+k}{r S_{0}+k}\right)=t, \\ r S+k=\left(r S_{0}+k\right) e^{r t}, \\ S=\frac{r S_{0} e^{r t}+k e^{r t}-k}{r}, \\ S=S_{0} e^{r t}+\frac{k}{r} e^{r t}\left(1-e^{-r t}\right), \end{gathered} \nonumber \]
where the first term on the right-hand side of Equation \ref{7.16} comes from the initial invested capital, and the second term comes from the deposits (or withdrawals). Evidently, compounding results in the exponential growth of an investment.
As a practical example, we can analyze a simple retirement plan. It is easiest to assume that all amounts and returns are in real dollars (adjusted for inflation). Suppose a 25 year-old plans to set aside a fixed amount every year of his/her working life, invests at a real return of \(6 \%\) , and retires at age 65 . How much must he/she invest each year to have \(\mathrm{HK} \$ 8,000,000\) at retirement? (Note: \(1 \mathrm{US} \$ 8 \mathrm{HK}\) .) We need to solve Equation \ref{7.16} for \(k\) using \(t=40\) years, \(S(t)=\$ 8,000,000, S_{0}=0\) , and \(r=0.06\) per year. We have
\[\begin{aligned} k &=\frac{r S(t)}{e^{r t}-1} \\ k &=\frac{0.06 \times 8,000,000}{e^{0.06 \times 40}-1} \\ &=\$ 47,889 \text { year }^{-1} \end{aligned} \nonumber \]
To have saved approximately one million US$ at retirement, the worker would need to save about \(\mathrm{HK} \$ 50,000\) per year over his/her working life. Note that the amount saved over the worker’s life is approximately \(40 \times \$ 50,000=\$ 2,000,000\) , while the amount earned on the investment (at the assumed \(6 \%\) real return) is approximately \(\$ 8,000,000-\$ 2,000,000=\$ 6,000,000\) . The amount earned from the investment is about \(3 \times\) the amount saved, even with the modest real return of \(6 \%\) . Sound investment planning is well worth the effort.
7.4.2. Chemical Reactions
Suppose that two chemicals \(A\) and \(B\) react to form a product \(C\) , which we write as
\[A+B \stackrel{k}{\rightarrow} C, \nonumber \]
where \(k\) is called the rate constant of the reaction. For simplicity, we will use the same symbol \(C\) , say, to refer to both the chemical \(C\) and its concentration. The law of mass action says that \(d C / d t\) is proportional to the product of the concentrations \(A\) and \(B\) , with proportionality constant \(k\) ; that is,
\[\frac{d C}{d t}=k A B . \nonumber \]
Similarly, the law of mass action enables us to write equations for the time-derivatives of the reactant concentrations \(A\) and \(B\) :
\[\frac{d A}{d t}=-k A B, \quad \frac{d B}{d t}=-k A B \nonumber \]
The ode given by Equation \ref{7.17} can be solved analytically using conservation laws. We assume that \(A_{0}\) and \(B_{0}\) are the initial concentrations of the reactants, and that no product is initially present. From Equation \ref{7.17} and Equation \ref{7.18},
\[\begin{aligned} & \frac{d}{d t}(A+C)=0 \quad \Longrightarrow \quad A+C=A_{0}, \\ & \frac{d}{d t}(B+C)=0 \quad \Longrightarrow \quad B+C=B_{0} . \end{aligned} \nonumber \]
Using these conservation laws, Equation \ref{7.17} becomes
\[\frac{d C}{d t}=k\left(A_{0}-C\right)\left(B_{0}-C\right), \quad C(0)=0, \nonumber \]
which is a nonlinear equation that may be integrated by separating variables. Separating and integrating, we obtain
\[\begin{aligned} \int_{0}^{C} \frac{d C}{\left(A_{0}-C\right)\left(B_{0}-C\right)} &=k \int_{0}^{t} d t \\ &=k t \end{aligned} \nonumber \]
The remaining integral can be done using the method of partial fractions. We write
\[\frac{1}{\left(A_{0}-C\right)\left(B_{0}-C\right)}=\frac{a}{A_{0}-C}+\frac{b}{B_{0}-C} . \nonumber \]
The cover-up method is the simplest method to determine the unknown coefficients \(a\) and \(b\) . To determine \(a\) , we multiply both sides of \(Equation \ref{7.20}\) by \(A_{0}-C\) and set \(C=A_{0}\) to find
\[a=\frac{1}{B_{0}-A_{0}} . \nonumber \]
Similarly, to determine \(b\) , we multiply both sides of \(Equation \ref{7.20}\) by \(B_{0}-C\) and set \(C=B_{0}\) to find
\[b=\frac{1}{A_{0}-B_{0}} . \nonumber \]
Therefore,
\[\frac{1}{\left(A_{0}-C\right)\left(B_{0}-C\right)}=\frac{1}{B_{0}-A_{0}}\left(\frac{1}{A_{0}-C}-\frac{1}{B_{0}-C}\right) \nonumber \]
and the remaining integral of Equation \ref{7.19} becomes (using \(C<A_{0}, B_{0}\) )
\[\begin{aligned} \int_{0}^{C} \frac{d C}{\left(A_{0}-C\right)\left(B_{0}-C\right)} &=\frac{1}{B_{0}-A_{0}}\left(\int_{0}^{C} \frac{d C}{A_{0}-C}-\int_{0}^{C} \frac{d C}{B_{0}-C}\right) \\ &=\frac{1}{B_{0}-A_{0}}\left(-\ln \left(\frac{A_{0}-C}{A_{0}}\right)+\ln \left(\frac{B_{0}-C}{B_{0}}\right)\right) \\ &=\frac{1}{B_{0}-A_{0}} \ln \left(\frac{A_{0}\left(B_{0}-C\right)}{B_{0}\left(A_{0}-C\right)}\right) \end{aligned} \nonumber \]
Using this integral in Equation \ref{7.19}, multiplying by \(\left(B_{0}-A_{0}\right)\) and exponentiating, we obtain
\[\frac{A_{0}\left(B_{0}-C\right)}{B_{0}\left(A_{0}-C\right)}=e^{\left(B_{0}-A_{0}\right) k t} \nonumber \]
Solving for \(C\) , we finally obtain
\[C(t)=A_{0} B_{0} \frac{e^{\left(B_{0}-A_{0}\right) k t}-1}{B_{0} e^{\left(B_{0}-A_{0}\right) k t}-A_{0}}, \nonumber \]
which appears to be a complicated expression, but has the simple limits
\[\begin{aligned} \lim _{t \rightarrow \infty} C(t) &= \begin{cases}A_{0}, & \text { if } A_{0}<B_{0}, \\ B_{0}, & \text { if } B_{0}<A_{0}\end{cases} \\ &=\min \left(A_{0}, B_{0}\right) . \end{aligned} \nonumber \]
As one would expect, the reaction stops after one of the reactants is depleted; and the final concentration of product is equal to the initial concentration of the depleted reactant.
7.4.3. Terminal velocity
Using Newton’s law, we model a mass \(m\) free falling under gravity but with air resistance. We assume that the force of air resistance is proportional to the speed of the mass and opposes the direction of motion. We define the \(x\) -axis to point in the upward direction, opposite the force of gravity. Near the surface of the Earth, the force of gravity is approximately constant and is given by \(-m g\) , with \(g=9.8 \mathrm{~m} / \mathrm{s}^{2}\) the usual gravitational acceleration. The force of air resistance is modeled by \(-k v\) , where \(v\) is the vertical velocity of the mass and \(k\) is a positive constant. When the mass is falling, \(v<0\) and the force of air resistance is positive, pointing upward and opposing the motion. The total force on the mass is therefore given by \(F=-m g-k v\) . With \(F=m a\) and \(a=d v / d t\) , we obtain the differential equation
\[m \frac{d v}{d t}=-m g-k v . \nonumber \]
The terminal velocity \(v_{\infty}\) of the mass is defined as the asymptotic velocity after air resistance balances the gravitational force. When the mass is at terminal velocity, \(d v / d t=0\) so that
\[v_{\infty}=-\frac{m g}{k} . \nonumber \]
The approach to the terminal velocity of a mass initially at rest is obtained by solving \(Equation \ref{7.21}\) with initial condition \(v(0)=0\) . The equation is both linear and separable, and I solve by separating variables:
\[\begin{gathered} m \int_{0}^{v} \frac{d v}{m g+k v}=-\int_{0}^{t} d t \\ \frac{m}{k} \ln \left(\frac{m g+k v}{m g}\right)=-t \\ 1+\frac{k v}{m g}=e^{-k t / m} \\ v=-\frac{m g}{k}\left(1-e^{-k t / m}\right) \end{gathered} \nonumber \]
Therefore, \(v=v_{\infty}\left(1-e^{-k t / m}\right)\) , and \(v\) approaches \(v_{\infty}\) as the exponential term decays to zero.
As an example, a skydiver of mass \(m=100 \mathrm{~kg}\) with his parachute closed may have a terminal velocity of \(200 \mathrm{~km} / \mathrm{hr}\) . With
\[g=\left(9.8 \mathrm{~m} / \mathrm{s}^{2}\right)\left(10^{-3} \mathrm{~km} / \mathrm{m}\right)(60 \mathrm{~s} / \mathrm{min})^{2}(60 \mathrm{~min} / \mathrm{hr})^{2}=127,008 \mathrm{~km} / \mathrm{hr}^{2} \nonumber \]
one obtains from \(Equation \ref{7.22}, k=63,504 \mathrm{~kg} / \mathrm{hr}\) . One-half of the terminal velocity for freefall \((100 \mathrm{~km} / \mathrm{hr})\) is therefore attained when \(\left(1-e^{-k t / m}\right)=1 / 2\) , or \(t=m \ln 2 / k \approx\) \(4 \mathrm{sec}\) . Approximately \(95 \%\) of the terminal velocity \((190 \mathrm{~km} / \mathrm{hr})\) is attained after \(17 \mathrm{sec}\) .
7.4.4. Escape velocity
An interesting physical problem is to find the smallest initial velocity for a mass on the Earth’s surface to escape from the Earth’s gravitational field, the so-called escape velocity. Newton’s law of universal gravitation asserts that gravitational force between two massive bodies is proportional to the product of the two masses and inversely proportional to the square of the distance between them. For a mass \(m\) a position \(x\) above the surface of the Earth, the force on the mass is given by
\[F=-G \frac{M m}{(R+x)^{2}}, \nonumber \]
where \(M\) and \(R\) are the mass and radius of the Earth and \(G\) is the gravitational constant. The minus sign means the force on the mass \(m\) points in the direction of decreasing \(x\) . The approximately constant acceleration \(g\) on the Earth’s surface corresponds to the absolute value of \(F / m\) when \(x=0\) :
\[g=\frac{G M}{R^{2}} \nonumber \]
and \(g \approx 9.8 \mathrm{~m} / \mathrm{s}^{2}\) . Newton’s law \(F=m a\) for the mass \(m\) is thus given by
\[\begin{aligned} \frac{d^{2} x}{d t^{2}} &=-\frac{G M}{(R+x)^{2}} \\ &=-\frac{g}{(1+x / R)^{2}} \end{aligned} \nonumber \]
where the radius of the Earth is known to be \(R \approx 6350 \mathrm{~km}\) .
A useful trick allows us to solve this second-order differential equation as a first-order equation. First, note that \(d^{2} x / d t^{2}=d v / d t\) . If we write \(v(t)=v(x(t))\) considering the velocity of the mass \(m\) to be a function of its distance above the Earth-we have using the chain rule
\[\begin{aligned} \frac{d v}{d t} &=\frac{d v}{d x} \frac{d x}{d t} \\ &=v \frac{d v}{d x} \end{aligned} \nonumber \]
where we have used \(v=d x / d t\) . Therefore, Equation \ref{7.23} becomes the first-order ode
\[v \frac{d v}{d x}=-\frac{g}{(1+x / R)^{2}} \nonumber \]
which may be solved assuming an initial velocity \(v(x=0)=v_{0}\) when the mass is shot vertically from the Earth’s surface. Separating variables and integrating, we obtain
\[\int_{v_{0}}^{v} v d v=-g \int_{0}^{x} \frac{d x}{(1+x / R)^{2}} . \nonumber \]
The left integral is \(\frac{1}{2}\left(v^{2}-v_{0}^{2}\right)\) , and the right integral can be performed using the substitution \(u=1+x / R, d u=d x / R\) :
\[\begin{aligned} \int_{0}^{x} \frac{d x}{(1+x / R)^{2}} &=R \int_{1}^{1+x / R} \frac{d u}{u^{2}} \\ &\left.=-\frac{R}{u}\right]_{1}^{1+x / R} \\ &=R-\frac{R^{2}}{x+R} \\ &=\frac{R x}{x+R} \end{aligned} \nonumber \]
Therefore,
\[\frac{1}{2}\left(v^{2}-v_{0}^{2}\right)=-\frac{g R x}{x+R} \nonumber \]
which when multiplied by \(m\) is an expression of the conservation of energy (the change of the kinetic energy of the mass is equal to the change in the potential energy). Solving for \(v^{2}\) ,
\[v^{2}=v_{0}^{2}-\frac{2 g R x}{x+R} . \nonumber \]
The escape velocity is defined as the minimum initial velocity \(v_{0}\) such that the mass can escape to infinity. Therefore, \(v_0 = v_{\text{escape}}\) when \(v \rightarrow 0\) as \(x \rightarrow \infty\). Taking this limit, we have
\[\begin{aligned} v_{\text {escape }}^{2} &=\lim _{x \rightarrow \infty} \frac{2 g R x}{x+R} \\ &=2 g R \end{aligned} \nonumber \]
With \(R \approx 6350 \mathrm{~km}\) and \(g=127008 \mathrm{~km} / \mathrm{hr}^{2}\) , we determine \(v_{\text {escape }}=\sqrt{2 g R} \approx 40000\) \(\mathrm{km} / \mathrm{hr}\) . In comparison, the muzzle velocity of a modern high-performance rifle is \(4300 \mathrm{~km} / \mathrm{hr}\) , almost an order of magnitude too slow for a bullet, shot into the sky, to escape the Earth’s gravity.
7.4.5. RC circuit
Consider a resister \(R\) and a capacitor \(C\) connected in series as shown in Fig. 7.4. A battery providing an electromotive force, or emf \(\mathcal{E}\) , connects to this circuit by a switch. Initially, there is no charge on the capacitor. When the switch is thrown to \(a\) , the battery connects and the capacitor charges. When the switch is thrown to \(b\) , the battery disconnects and the capacitor discharges, with energy dissipated in the resister. Here, we determine the voltage drop across the capacitor during charging and discharging.
The equations for the voltage drops across a capacitor and a resister are given by
\[V_{C}=q / C, \quad V_{R}=i R, \nonumber \]
where \(C\) is the capacitance and \(R\) is the resistance. The charge \(q\) and the current \(i\) are related by
\[i=\frac{d q}{d t} . \nonumber \]
Kirchhoff’s voltage law states that the emf \(\mathcal{E}\) in any closed loop is equal to the sum of the voltage drops in that loop. Applying Kirchhoff’s voltage law when the switch is thrown to \(a\) results in
\[V_{R}+V_{C}=\mathcal{E} . \nonumber \]
Using Equation \ref{7.24} and Equation \ref{7.25}, the voltage drop across the resister can be written in terms of the voltage drop across the capacitor as
\[V_{R}=R C \frac{d V_{C}}{d t}, \nonumber \]
and Equation \ref{7.26} can be rewritten to yield the linear first-order differential equation for \(V_{C}\) given by
\[\frac{d V_{C}}{d t}+V_{C} / R C=\mathcal{E} / R C \nonumber \]
with initial condition \(V_{C}(0)=0\) .
The integrating factor for this equation is
\[\mu(t)=e^{t / R C}, \nonumber \]
and Equation \ref{7.27} integrates to
\[V_{C}(t)=e^{-t / R C} \int_{0}^{t}(\mathcal{E} / R C) e^{t / R C} d t \nonumber \]
with solution
\[V_{C}(t)=\mathcal{E}\left(1-e^{-t / R C}\right) \nonumber \]
The voltage starts at zero and rises exponentially to \(\mathcal{E}\) , with characteristic time scale given by \(R C\) .
When the switch is thrown to \(b\) , application of Kirchhoff’s voltage law results in
\[V_{R}+V_{C}=0, \nonumber \]
with corresponding differential equation
\[\frac{d V_{C}}{d t}+V_{C} / R C=0 \nonumber \]
Here, we assume that the capacitance is initially fully charged so that \(V_{C}(0)=\mathcal{E}\) . The solution, then, during the discharge phase is given by
\[V_{C}(t)=\mathcal{E} e^{-t / R C} . \nonumber \]
The voltage starts at \(\mathcal{E}\) and decays exponentially to zero, again with characteristic time scale given by \(R C\) .
7.4.6. The logistic equation
Let \(N(t)\) be the number of individuals in a population at time \(t\) , and let \(b\) and \(d\) be the average per capita birth rate and death rate, respectively. In a short time \(\Delta t\) , the number of births in the population is \(b \Delta t N\) , and the number of deaths is \(d \Delta t N\) . An equation for \(N\) at time \(t+\Delta t\) is then determined to be
\[N(t+\Delta t)=N(t)+b \Delta t N(t)-d \Delta t N(t), \nonumber \]
which can be rearranged to
\[\frac{N(t+\Delta t)-N(t)}{\Delta t}=(b-d) N(t) \nonumber \]
and as \(\Delta t \rightarrow 0\) , and with \(r=b-d\) , we have
\[\frac{d N}{d t}=r N . \nonumber \]
This is the Malthusian growth model (Thomas Malthus, 1766-1834), and is the same equation as our compound interest model.
Under a Malthusian growth model, the population size grows exponentially like
\[N(t)=N_{0} e^{r t}, \nonumber \]
where \(N_{0}\) is the initial population size. However, when the population growth is constrained by limited resources, a heuristic modification to the Malthusian growth model results in the Verhulst equation,
\[\frac{d N}{d t}=r N\left(1-\frac{N}{K}\right), \nonumber \]
where \(K\) is called the carrying capacity of the environment. Making Equation \ref{7.28} dimensionless using \(\tau=r t\) and \(x=N / K\) leads to the logistic equation,
\[\frac{d x}{d \tau}=x(1-x), \nonumber \]
where we may assume the initial condition \(x(0)=x_{0}>0\) . Separating variables and integrating
\[\int_{x_{0}}^{x} \frac{d x}{x(1-x)}=\int_{0}^{\tau} d \tau \nonumber \]
The integral on the left-hand-side can be done using the method of partial fractions:
\[\frac{1}{x(1-x)}=\frac{a}{x}+\frac{b}{1-x} \nonumber \]
and the cover-up method yields \(a=b=1\) . Therefore,
\[\begin{aligned} \int_{x_{0}}^{x} \frac{d x}{x(1-x)} &=\int_{x_{0}}^{x} \frac{d x}{x}+\int_{x_{0}}^{x} \frac{d x}{(1-x)} \\ &=\ln \frac{x}{x_{0}}-\ln \frac{1-x}{1-x_{0}} \\ &=\ln \frac{x\left(1-x_{0}\right)}{x_{0}(1-x)} \\ &=\tau \end{aligned} \nonumber \]
Solving for \(x\) , we first exponentiate both sides and then isolate \(x\) :
\[\begin{gathered} \frac{x\left(1-x_{0}\right)}{x_{0}(1-x)}=e^{\tau}, \\ x\left(1-x_{0}\right)=x_{0} e^{\tau}-x x_{0} e^{\tau}, \\ x\left(1-x_{0}+x_{0} e^{\tau}\right)=x_{0} e^{\tau}, \\ x=\frac{x_{0}}{x_{0}+\left(1-x_{0}\right) e^{-\tau}} . \end{gathered} \nonumber \]
We observe that for \(x_{0}>0\) , we have \(\lim _{\tau \rightarrow \infty} x(\tau)=1\) , corresponding to
\[\lim _{t \rightarrow \infty} N(t)=K \text {. } \nonumber \]
The population, therefore, grows in size until it reaches the carrying capacity of its environment.