What should the signs of $r$ and $s$ be if the countries have substantial grievances against each other?
```{mcq}
#| label: osr06-1
#| show_hints: true
1. positive [ correct hint: Correct ]
2. negative
3. zero
```
Chap 43 Exercises
\[ \newcommand{\dnorm}{\text{dnorm}} \newcommand{\pnorm}{\text{pnorm}} \newcommand{\recip}{\text{recip}} \]
Exercise 1 Lewis Fry Richardson (1881-1953) was an English scientist who worked in many areas, including weather prediction. (See Block 1.) This problem concerns a model Richardson built to account for arms races between countries.
In the model, \(x\) and \(y\) respectively refer to the size of the military of the two countries. The equations model how the size of the militaries change in time:
\[\left[\begin{eqnarray*} \dot{x} & = & a y - m x & + r\\ \dot{y} & = & b x - n y & + s\\ \end{eqnarray*}\right]\]
The terms \(r\) and \(s\) represent the basic grievances between the two countries.
The parameters \(a\) and \(b\) represent “fear,” that is, the extent to which one country feels the need to build up arms in response to the other country’s arms.
The parameters \(m\) and \(n\) are about the internal dynamics of the country: its ability/desire to sustain a large military.
What should be the signs of $a$ and $b$, given that they represent
"fear?"
```{mcq}
#| label: osr06-2
#| show_hints: true
1. positive [ correct hint: You're right ]
2. negative
3. zero
```
What should be the signs of $m$ and $n$, in a country which, on its own, would not like to build a large military? Note the sign preceeding these terms.
```{mcq}
#| label: osr06-3
#| show_hints: true
1. positive [ correct hint: Yes ]
2. negative
3. zero
```
Depending on the values of the parameters \(a\), \(b\), \(m\), \(n\), \(r\), and \(s\), the Richardson dynamics can produce different outcomes. Two of the previous three plots show Richardson Arms Race dynamics for two mutually fearful countries with mutual grievances, Freedonia and Jockavia. The third plot does not; the signs of one of the coefficients has been reversed and so the dynamics don’t make sense for modeling an arms race.
- In each of the three plots, start from initial point \(x=2,y=1\), that is, a situation where Freedonia is more armed than Jackavia, and trace out the trajectory over time.
- For each of the three plots, find any equilibrium point and say whether it is stable or unstable. If there is no equilibrium, move on.
- Identify which of the three plots is NOT the Richardson dynamics.
- In the non-Richardson flow, which coefficient has been reversed: it is one of \(a\), \(b\), \(m\), \(n\), \(r\), or \(s\).
Which of the previous plots are Not the Richardson Dynamics?
```{mcq}
#| label: osr06-4
#| show_hints: true
1. Flow Field A [ correct hint: right-o ]
2. Flow Field B
3. Flow Field C
```
In this plot which if the parameters is reversed?
```{mcq}
#| label: osr06-5
#| show_hints: true
1. a [ correct hint: Yes ]
2. b
3. m
4. n
5. r
6. s
```
Exercise 2 Lanchester’s model of combat is \[\partial_t R = - b B\\ \partial_t B = -r R\] with both parameters \(r\) and \(b\) taken to be positive.
Obviously, the state variables \(R\) and \(B\) are to be thought of as functions of time.
Locate the fixed point of the model of combat.
Is it stable? In answering this question, consider two different state spaces and explain why your answer is different in the two spaces:
- All four quadrants of the \((R, B)\) plane.
- Only the first quadrant—that is, \(0 \leq R, 0 \leq B\)—of the \((R, B)\) pane.
At a stable fixed point the state quantities—\(R\) and \(B\) here—do not change. But sometimes there are other functions of the state variables that do not change even when the state is off of any fixed point. These are called conserved quantities. Conserved quantities such as momentum and energy are important in physics.
The text introduced this conserved quantity for Lanchester’s model: \[Q(R, B) \equiv rR^2 - b B^2\ .\] Let’s explore whether the components of the quantity are conserved individually.
3. Calculate $\partial_t r R^2$. Which of these is right? (Hint: Use the chain rule of differentiation and Lanchester's equations to simplify more.)
```{mcq}
#| label: ptp47-3
#| show_hints: true
1. $-2 rb RB$ [ correct hint: Excellent! ]
2. $2rR$
3. $-2r\dot{R}$
4. $2r\dot{R} B$
```
4. Perform the similar calculation $\partial_t b B^2$. Using your result and the result from question (3), is it the case that $\partial_t r R^2 = \partial_t b B^2$?
```{mcq}
#| label: ptp47-4
#| show_hints: true
1. Yes [ correct hint: right-o ]
2. No
3. Depends on $b$ and $r$.
4. Depends on $B$ and $R$.
```
Here are two more candidates for conserved quantities:
- \(rR - bB\)
- \(rB - bR\)
Take the derivative with respect to time of each of them to determine if they are conserved.
5. Which of (a) and (b) are conserved?
```{mcq}
#| label: ptp47-5
#| show_hints: true
1. Just (a).
2. Just (b).
3. Both (a) and (b).
4. Neither (a) nor (b). [ correct hint: right-o ]
```
Exercise 3
Which of the three flows below corresponds to Lanchester's Law?
```{mcq}
#| label: hbs25-1
#| show_hints: true
1. A [ correct hint: You're right ]
2. B
3. C
```
Which of these sentences best describes the dynamics of Lanchester's Law?
```{mcq}
#| label: hbs25-2
#| show_hints: true
1. Both forces battle to complete annihilation.
2. The stronger force wipes out the weaker force. [ correct hint: Right ]
3. The weaker force holds off the stronger force.
```
Exercise 4 Here are three different first-order differential equations with fixed points at \(x^\star = 0\) and \(x^\star=1\).
- \(\partial_t x = g_1(x) \equiv x (1-x)\)
- \(\partial_t x = g_2(x) \equiv 0.25 \sin(2\pi x)\)
- \[\partial_t x = g_3(x) \equiv \left\{\begin{array}{ll} x & x < 0.18\\ 0.18 & 0.18 \leq x \leq 0.82\\ 1 -x & 0.82 < x \end{array}\right.\] The \(g_i()\) functions are graphed below.
A. For each of the equations, match the number (i, ii, iii) to the color (magenta, blue, black). Comment on the differences in shape among them.
B. Integrate each of the differential equations from initial condition \(x_0 = 0.01\). Compare the time series plots. Do the dynamics of \(g_3()\) product a similar or radically different time series than \(g_1()\) and \(g_2()\)?
Solution containing functions x(t).
Solution containing functions x(t).
Solution containing functions x(t).
Comment: Usually, many different mathematical functions can be used to model a given phenomenon. The different functions will have similar shapes, but do not need to be identical.
Exercise 5
This needs re-organization. The 2-dimensional state space is awkward. There needs also to be a withdrawal policy that makes sense.
There are two basic forms of retirement plan: a pension and an individual retirement account (IRA). The dynamics are the same for both: \[\partial_t V = r V + M\ .\] The major differences are who makes the contribution and what will be the monthly payout.
In an individual retirement account, the retiree withdraws money from the account at whatever rate seems appropriate. Sensible people make a plan for withdrawals so that their savings will last them for the rest of their life. A rule of thumb is to withdraw a fraction of the principal equal to their age divided by 1000. Thus, a 70-year old would withdraw about \(70/1000 = 0.07 = 7\%\) per year. Sensible people also keep their savings invested in some secure way such as government bonds. As of the start of 2022, 10-year US treasury bonds pay about 1.8% per year, although at the start of 2021 the rate was 1% per year.
Let \(S(\text{age})\) stand for the amount of savings at a given age, then the dynamics are \[\partial_{\text{age}} S = - \underbrace{\frac{\text{age}}{1000} S}_{\text{rate of withdrawal}} + \underbrace{0.018 S}_{\text{investment gains}}\ .\] If the age at retirement were 65, initial condition is \(S(65) =\)accumulated retirements savings.
Notice that the dynamical function, involves two inputs: the amount of savings \(S\) and the age of the retiree. This means that the dynamical state has two components: \(S\) and age. So we will write the dynamics as two differential equations, one for each component of the state.
\[\partial_{\text{age}} S = -\frac{\text{age}}{1000} S +0.018 S\\ \ \\ \partial_{\text{age}} \text{age} = 1\]
The second equation is so simple that it hardly needs to be given explicitly, but solving differential equations is a matter of careful book-keeping and we need to keep track of the retiree’s age at any point in time.
A solution to this dynamical system can be calculated by integrateODE()
. The initial condition on age is, say, 65. As the initial condition on \(S\), We will take an amount from the example in the book: $\928,000.
<- integrateODE(dage ~ 1, dS ~ - pmin(((age-10)/1000)*S, 45000) + 0.018*S,
Soln S = 928000, age=65,
bounds(t=0:50))
Solution containing functions age(t), S(t).
<- makeFun(Soln$S(age - 65) ~ 65)
Assets
slice_plot(Assets(age) ~ age, bounds(age=65:110))
slice_plot(pmin((age-10)/1000 * Assets(age), 45000) ~ age, bounds(age=65:110))
Exercise 6 In the description of the SIR model, we pointed out how a model of recovery \(\partial_t I = -\alpha I\) differs from the usual “recover after 7 days” style of description. (See MC_xref("fig-recovery-pattern")
.)
Find a value of \(\alpha\) such that the expectation value of the time to recovery is 7 days. To do this:
- Find a formula for the function \(I(t)\) from the differential equation.
- Guess an appropriate value for \(\alpha\).
- Construct the appropriate integral using \(I(t)\) to find the expectation value of \(t\). (See Chapter XREF not implemented yet.)
- Modify your guess for \(\alpha\) until the expectation value comes out to 7.
Loading required namespace: cubature
Exercise 7 The Susceptible-Infective-Recovered (SIR) model has only two parameters, \(\alpha\) and \(\beta\).
\[\partial_t S = -\beta S I\\ \partial_t I = \beta S I - \alpha I\]
The \(\alpha\) parameter controls how long it takes for an infective to recover. If we are considering only recovery, and not the introduction of new infectives from the susceptible population, the relevant differential equation is simply \[\partial_t I = \alpha I\ .\] 1. Set \(\alpha\) so that the half-life for infectiveness is 5 days.
Using \(\beta = 0.5\) and \(\alpha\) as in (1), set up a numerical integration of the SIR model. Integrate out to \(t=100\) from an initial condition of \(S=0.999\) and \(I=0.001\), corresponding to 0.1% of the population being infected. Plot out the time series \(S(t)\). From the time series, what fraction of the population eventually get the disease?
One sort of government tactic to keep small the spread of disease is to close borders, with the idea that there will be fewer infectives at the start of the epidemic which will keep the epidemic smaller. Public health professionals are skeptical of this common-sense tactic. Follow the same procedure in (2), but set the initial condition to \(S=0.99999\) and \(I=0.00001\). Does common sense hold?
Another strategy is “social distancing” and isolating infectives. To model this, reduce \(\beta\), the rate at which susceptibles interact with infectives. Keeping \(\alpha\) at the value you determined in (1), set \(\beta\) that only about half the susceptibles are ever infected.
Exercise 8 In the rabbit/fox system, the quantity \[Q(R, F) = \delta R - \gamma \ln(R) + \beta F - \alpha \ln(F)\] is conserved.
This means that each of the level curves (contours) in the contour plot of \(Q(R, F)\) is follows the path of a trajectory.
Make a contour plot of \(Q(R, F)\) over the domain \(0.1 \leq R \leq 3\), \(0 \leq F \leq 2\) for \(\alpha=.66, \beta = 1.33, \gamma=1, \delta = 1\).
From the graph you made in (1), choose an appropriate initial condition that falls on one of the contours.
Using
integrateODE()
, find the trajectory from from the initial condition in (1) for \(0 \leq t \leq 10\). Add a layer to the graphic in (1) showing the trajectory to confirm that the conserved quantities are indeed conserved.Symbolically, calculate \(\partial_t Q(R, V)\). You will need to use the chain rule, which will leave you with terms \(\partial_t R\) and \(\partial_t F\). Plug in the values for these from the differential equations and show that \(\partial_t Q(R, V) = 0\).
Exercise 9 Newton’s Law of Cooling is about how a hot (or cold) object comes into equilibrium with the ambient temperature. For instance, you might have a cup of coffee at \(200^\circ\)F in a room at \(70^\circ\)F. Unless you drink it, the coffee will cool with time until it reaches the room’s temperature. In this setting, \(x_\text{fixed} = 70^\circ\)F. The value of \(a\) depends on how insulated the cup is (and details of evaporation, etc.). But if the coffee reaches very near to room temperature in 60 minutes, \(a \approx 0.5\) with units 1/minute.
What are the units of the output of $x(t)$?
```{mcq}
#| label: bbb03-a
#| show_hints: true
1. degrees F per minute
2. degrees F [ correct hint: You're right ]
3. 1/minute
4. 1/degrees F
```
What are the units of $\dot{x}$?
```{mcq}
#| label: bbb03-b
#| show_hints: true
1. degrees F per minute [ correct hint: Right ]
2. degrees F
3. 1/minute
4. 1/degrees F
```
What is $x$?
```{mcq}
#| label: bbb03-c
#| show_hints: true
1. the room temperature
2. the initial temperature of the coffee
3. the instantaneous coffee temperature as a function of time [ correct hint: Correct ]
4. the fixed rate at which the coffee cools
5. the instantaneous rate at which the coffee cools as a function of time
```
What is $\dot{x}$?
```{mcq}
#| label: bbb03-d
#| show_hints: true
1. the room temperature
2. the initial temperature of the coffee
3. the instantaneous coffee temperature as a function of time
4. the instantaneous rate at which the coffee cools as a function of time [ correct hint: You're right ]
```
Exercise 10 Our generic model for limited growth is
\[\partial_t x = r x (1-x/k)\ ,\] which you can see as a modification of the proportional-growth model \[\partial_t x = r x\ .\]
The proportional-growth model will lead to \(x(t)\) increasing without limit. Sometimes that is a good model over short times, before \(x(t)\) has a chance to get unrealistically big. But over long periods of time, something’s gotta give.
The limited growth model involves a carrying capacity \(k\). For \(t\) when \(x(t)\) is very small, the population growth is well approximated by the usual proportion-growth model. For intermediate \(t\), the population has grown to a large enough size that it is consuming a substantial fraction of the available resources and population growth slows. When the population reaches the carrying capacity the growth stops (e.g. birth rate = death rate).
If the units of $x(t)$ is, say, rabbits, what is the units of $k$?
```{mcq}
#| label: rsk65-a
#| show_hints: true
1. rabbits [ correct hint: You're right ]
2. rabbits per day
3. rabbits per week
4. rabbits per year
```
Suppose the units of $\dot{x}$ is, rabbits per month, what is the units of $r$?
```{mcq}
#| label: rsk65-b
#| show_hints: true
1. 1/month [ correct hint: right-o ]
2. rabbits per month
3. months per rabbit
4. rabbits per month-squared
```
Even without finding the full solution $x(t)$ to the differential equation, you can figure out how big the population will be when growth falls to zero. How big?
```{mcq}
#| label: rsk65-c
#| show_hints: true
1. $k$ [ correct hint: Good job! ]
2. $k/r$
3. $r/k$
4. $1/r$
```