Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
Public worksheets for UCLA's Mathematics for Life Scientists course
Project: LS 30 Materials
Path: Public worksheets/UCLA LS 30 / Exponential growth and decay, in continuous time and discrete time.sagews
Views: 10255Exponential growth and decay
in continuous-time (ODE) models and discrete-time models
Continuous time
(We covered this in LS 30A, around week 5 or 6.)
General form of the differential equation:
General form of the solution to this:
The parameter is the growth/decay rate. In particular, this model yields the following behaviors:
Exponential growth if
Exponential decay if
Example 1:
A population , starting with individuals, growing at a constant per-capita rate of per year:
$$ \begin{align*}
\end{align*} $$
Example 2:
A drug concentration in the bloodstream, , that starts at mg/L, and is being metabolized and/or excreted at a (per-mass) rate of per hour:
$$ \begin{align*}
\end{align*} $$
Discrete time
(We covered this in LS 30B, beginning of week 4.)
General form of the discrete-time model (difference equation):
General form of the solution to this:
The parameter is the factor by which grows/decays at each time step, but note that this is not the same as the growth/decay rate in the continuous-time case. For example, if a population is growing at per year, you would use , and if it's declining at per year, you would use . This is the reason that I have used lowercase in the continuous-time setting, but uppercase in the discrete-time setting. In simple cases, the relationship between these two is just
That should explain the examples given in this paragraph: growing at per year means , so . Declining at per year means , so .
In particular, this model yields the following behaviors:
Exponential growth if
Exponential decay if
Example 3:
A population , starting with individuals, growing at a constant per-capita rate of per year, in discrete time (so ):
$$ \begin{align*}
\end{align*} $$
Example 4:
Once every hour, one of your roommates opens the fridge to find your leftover birthday cake, and eats one quarter of whatever is remaining. Let be the fraction of the cake that's remaining, which starts at . (That is, of the cake is in the fridge initially.)
$$ \begin{align*}
\end{align*} $$
NOTE: A new type of behavior can happen in the discrete-time case, that can't happen in the continuous-time case:
Suppose is negative. Then the state variable will alternate back and forth between positive and negative values. However, the overall behavior is still growth/decay of the magnitude (size) of the state variable.
Example 5:
, starting with an initial value of :
$$ \begin{align*}
This will have exponential growth, since .
Here is the same graph, but with green exponential growth curves to show how the positive and negative values are all growing away from zero.
Example 6:
, starting with an initial value of :
$$ \begin{align*}
This will have exponential decay, since .
Here is the same graph, but with green exponential decay curves to show how the positive and negative values are all decaying toward zero.
These last two examples demonstrate the reason for the absolute value on the in the explanation of the discrete-time case above. Again, that conclusion is the following: in the discrete-time model , the behavior is
Exponential growth if
Exponential decay if