\documentclass[12pt,twoside]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amscd}
\usepackage{bbm}
\usepackage[hmarginratio=1:1]{geometry}
\usepackage{titlesec}
\usepackage{mathrsfs}
\usepackage{enumerate}
\usepackage{graphicx}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Modified Title
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\makehwtitle}[4]{
\begin{center}
\Large
\textbf{#1 \,-- \:#2}
\\
#3 \\
#4
\normalsize
\end{center}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem Headings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcounter{ProblemNumber}
\newcounter{SubProblemNumber}[ProblemNumber]
\renewcommand{\theProblemNumber}{\arabic{ProblemNumber}}
\renewcommand{\theSubProblemNumber}{\alph{SubProblemNumber}}
\newcommand{\problem}[1]{
\stepcounter{ProblemNumber}
\subsection*{#1}
\hrulefill
\vspace{12pt}
}
\newcommand{\nproblem}{
\problem{Problem \theProblemNumber}
}
\newcommand{\soln}[1]{\subsection*{#1}}
\newcommand{\solution}{\soln{Solution}}
\renewcommand{\part}{
\stepcounter{SubProblemNumber}
\soln{Part (\theSubProblemNumber)}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% New Commands
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\newcommand{\deriv}[3][]{\ensuremath{\frac{\textrm{d}^{#1}#2}{\textrm{d}{#3}^{#1}}}}
\newcommand{\pderiv}[3][]{\ensuremath{\frac{\partial^{#1}#2}{\partial{#3}^{#1}}}}
\renewcommand{\d}{\ensuremath{\,\textrm{d}}}
\newcommand{\qed}{\ensuremath{\Box}}
\newcommand{\absval}[1]{\ensuremath{\left|#1\right|}}
\begin{document}
\begin{center}
\huge\textbf{Homework 5} \normalsize \\ Due Friday, August 4 2017
\end{center}
\problem{Problem 1 (10 points)}
Suppose that we have a species whose population $N(t)$ is governed by a simple linear birth-death process. That is, in a small interval of time $\Delta t$, the probability that any one individual gives birth is approximately $\beta\Delta t$ and the probability that any one individual dies is $\delta\Delta t$.
\begin{equation} \label{eq:simple-bd}
\deriv{P_n}{t} = \beta(n - 1)P_{n-1} - (\beta + \delta)nP_{n} + \delta(n + 1)P_{n+1},
\end{equation}
where
\begin{equation}
P_n(t) = \textrm{Pr}\left[N(t) = n \:\vert\: N(0) = N_0\right]
\end{equation}
is the probability that $N(t) = n$ given the initial population $N_0$. We will always assume that $P_{-1} = 0$.
In class, we solved this problem using a probability generating function and then used that function to find the expected value
\begin{equation} \label{eq:exval}
\langle N(t) \rangle = \sum_{n=0}^{\infty}nP_n(t).
\end{equation}
If all we need is the expected value, then there is a much simpler way to find it.
\begin{enumerate}[(a)]
\item Use equation \eqref{eq:simple-bd} to show that
\begin{equation} \label{eq:exp-growth}
\deriv{\langle N(t) \rangle}{t} = (\beta - \delta)\langle N(t) \rangle.
\end{equation}
\item Solve equation \eqref{eq:exp-growth} for $\langle N(t) \rangle$. (You should not have any arbitrary constants of integration in your solution.)
\end{enumerate}
\problem{Problem 2 (10 points)}
To incorporate density dependence into birth-death processes, we let the birth and death rates depend on the population $N$. That is, we replace the constant values $\beta$ and $\delta$ with $\beta_n$ and $\delta_n$, which vary with $n$. One particularly simple version of density dependence arises if we assume that $\beta_n$ decreases linearly with $n$, while $\delta_n$ is constant. That is, let
\begin{equation}
\beta_n = \beta - \frac{n}{K} \:\textrm{ and }\: \delta_n = \delta,
\end{equation}
where $\beta$ and $\delta$ are constants and $K$ is a constant positive integer.
The governing equations are otherwise identical to those of problem 1, so we find that
\begin{equation} \label{eq:log-bd}
\deriv{P_n}{t} = \beta_{n-1}(n - 1)P_{n-1} - (\beta_n + \delta_n)nP_n + \delta_{n+1}(n+1)P_{n+1},
\end{equation}
where
\begin{equation}
P_n(t) = \textrm{Pr}\left[N(t) = n \:\vert\: N(0) = N_0\right]
\end{equation}
for all $n \geq 0$ and $P_{-1}(t) = 0$.
\begin{enumerate}[(a)]
\item Using a similar technique to that in problem 1, show that
\begin{equation}
\deriv{\langle N(t)\rangle}{t} = \left(\beta - \delta\right)\langle N(t) \rangle - \frac{\langle N(t)^2\rangle}{K}.
\end{equation}
\item Using the fact that the variance of $N(t)$ is
\begin{equation}
\textrm{Var}\left[N(t)\right] = \langle N(t)^2 \rangle - \langle N(t) \rangle^2,
\end{equation}
show that
\begin{equation} \label{eq:log-ode}
\deriv{\langle N(t) \rangle}{t} = \left(\beta - \delta\right)\langle N(t) \rangle - \frac{\langle N(t) \rangle^2}{K} - \frac{\textrm{Var}\left[N(t)\right]}{K}.
\end{equation}
\item If this were a deterministic problem, then $\textrm{Var}\left[N(t)\right]$ would be zero. Find the two equilibria of \eqref{eq:log-ode} assuming that $\textrm{Var}\left[N(t)\right] = 0$. (You may assume that $\beta > \delta > 0$.)
\item Since this really isn't a deterministic problem, we should not expect the variance to be zero. Instead, we will assume that $\textrm{Var}\left[N(t)\right] \approx \sigma^2$ is a small positive constant. Find the two equilibria of \eqref{eq:log-ode} under this assumption. (You may still assume that $\beta > \delta > 0$.)
\end{enumerate}
\problem{Problem 3 (10 points)}
Suppose that we have a birth-death process governed by
\begin{equation} \label{eq:nonlin-bd}
\deriv{P_n}{t} = \beta_{n-1}(n - 1)P_{n-1} - (\beta_n + \delta_n)nP_n + \delta_{n+1}(n+1)P_{n+1},
\end{equation}
where
\begin{equation}
P_n(t) = \textrm{Pr}\left[N(t) = n \:\vert\: N(0) = N_0\right]
\end{equation}
for all $n\geq 0$ and $P_{-1}(t) = 0$. Instead of the formulas for $\beta_n$ and $\delta_n$ from problem 2, suppose that $\beta_n$ and $\delta_n$ are arbitrary functions of $n$ with $\delta_n \neq 0$ for all $n \geq 0$.
Remember that $\pi = \left(\pi_0, \pi_1, \pi_2, \dotsc\right)$ is a stationary state if the constant functions $P_n(t) = \pi_n$ are solutions of \eqref{eq:nonlin-bd}. (Note, in particular, that $\sum_{n=0}^{\infty}\pi_n = 1$.)
Show that the only stationary solution to \eqref{eq:nonlin-bd} is given by $\pi_0 = 1$ and $\pi_n = 0$ for all $n > 0$. This means that the only stationary state of any birth-death process corresponds to extinction.
\problem{Problem 4 (10 points)}
The result of problem 3 suggests that stationary states are probably too restrictive a notion for birth-death processes. The problem is that $N(t) = 0$ is an absorbing state, and so the only two long term possibilities are that the population dies out or grows to infinity. Many populations, however, seem to reach ``stable'' levels for a very long time before eventually succumbing to extinction.
To make this new idea of stability rigorous, we will define the conditional probability
\begin{equation} \label{eq:qn}
q_n(t) = \textrm{Pr}\left[N(t) = n \:\vert\: N(0) = N_0 \textrm{ and } N(t) \neq 0\right] = \frac{P_n(t)}{1 - P_0(t)},
\end{equation}
for all $n > 0$. This is the probability that $N(t) = n$ under the assumption that it has not yet gone extinct. Use equations \eqref{eq:nonlin-bd} and \eqref{eq:qn} to show that
\begin{equation} \label{eq:q-ode}
\deriv{q_n}{t} = \beta_{n-1}(n - 1)q_{n - 1} - (\beta_n + \delta_n)nq_n + \delta_{n+1}(n + 1)q_{n+1} + \delta_1 q_1q_n,
\end{equation}
for all $n > 0$. (We are assuming that $q_0 = 0$.)
\textbf{Extra credit} (5 points): Equation \eqref{eq:q-ode} often does have constant solutions. If $q_n(t) = \pi_n$ is constant for every $n > 0$, then we call $\pi$ a \emph{quasistationary state} of the birth-death process. Unfortunately, \eqref{eq:q-ode} is nonlinear, so it is generally very difficult to solve for $\pi$ explicitly. However, there are several ways to approximate the quasistationary state numerically. For instance, you can
\begin{enumerate}
\item Guess a nonzero value for $\pi_1$.
\item Calculate $\pi_2$, $\pi_3$, $\pi_4$, etc. by repeatedly using \eqref{eq:q-ode} with $\d q_n/\d t = 0$. Stop at $\pi_N$, where $N$ is chosen so that $\pi_N$ is sufficiently small.
\item Find $Q = \sum_{n=1}^{N}\pi_n$ and replace each $\pi_n$ with $\pi_n/Q$ so that they all sum to 1.
\item If the new value of $\pi_1$ is substantially different from your previous guess, start again using the new $\pi_1$ as your starting guess.
\end{enumerate}
For extra credit, implement this algorithm to find the quasistationary state of the birth-death process from problem 2 with $\beta = 0.1$, $\delta = 0.02$ and $K = 100$. Make a plot of $\pi_n$ versus $n$. How does the peak of this plot compare to your solutions from parts c and d of problem 2? How big do you think the variance is?
\end{document}