\documentclass[11pt,twoside,letterpaper,fleqn,leqno]{article}
\usepackage{amssymb,amsthm,amsmath}
\pagestyle{empty}

\newcommand{\derivF}[2]{ \frac{\mathrm{d}#1}{\mathrm{d}#2} }
\newcommand{\derivL}[2]{ \mathrm{d}#1 / \mathrm{d}#2 }

\begin{document}

\section*{PopBio Help}
This document briefly describes the equations used by each of the simulations in the PopBio program.  A more detailed application manual is planned for a future release.  In the mean time, if you have a question about the PopBio program that is not answered here please contact Ethan Benatan at benatan@reed.edu.
\newpage

\section*{Population growth}
\subsection*{Variables}
\begin{itemize}
\item $x = \textrm{[population]}$
\item $x_0 = \textrm{[initial population]}$
\item $r = \textrm{[rate of increase]}$
\item $K = \textrm{[carrying capacity]}$
\item $L = \textrm{[growth time lag]}$
\end{itemize}

\subsection*{Equations}
\subsubsection*{Exponential growth}
The basic assumption of population growth modeling is that the rate of population growth is proportional to the current population -- that is,
\begin{align} \label{exponential growth derivative}
\derivF{x}{t} = r x
\end{align}
The solution to (\ref{exponential growth derivative}) is
\begin{align} \label{exponential growth exact}
x(t) =x_0 e^{rt}
\end{align}
Equation (\ref{exponential growth exact}) is used for computing $x(t)$ deterministically; the stochastic mode uses equation (\ref{exponential growth derivative}), recalculating the value of $r$ at each time step.

\subsubsection*{Logistic growth}
To incorporate the carrying capacity, we add a term to $\derivL{x}{t}$:
\begin{align} \label{logistic growth derivative}
\derivF{x}{t} = r x \left(1 - {x \over K} \right)
\end{align}
The solution to this equation is
\begin{align} \label{logistic growth exact}
x(t) = \frac{K x_0 e^{r t}}{K + x_0 \left( e^{r t} - 1\right)}
\end{align}
As with exponential growth, the deterministic mode uses the second equation, while the stochastic mode uses the first, recalculating $K$ and $r$ at every time step. If the growth lag in a stochastic calculation is non-zero, then for $t \geq L$, $x(t-L)$ is used in place of $x$ in equation (\ref{logistic growth derivative}).
\newpage

\section*{Predator-Prey}
\subsection*{Variables}
\begin{itemize}
\item $N = \textrm{[prey population]}$
\item $P = \textrm{[predator population]}$
\item $a = \textrm{[prey birth rate]}$
\item $b = \textrm{[prey capture probability]}$
\item $c = \textrm{[predator energy efficiency]} \cdot b$
\item $d = \textrm{[predator death rate]}$
\item $K = \textrm{[prey carrying capacity]}$
\item $e = \textrm{[prey critical density]}$
\item $m = \textrm{[maximum predator attack rate]}$
\item $W = \textrm{[1/2 attack rate population]}$
\item $w = \textrm{[1/2 attack rate density]}$
\end{itemize}
\subsection*{Lotka-Volterra model}
\begin{align*}
\derivL{N}{t} &= a N - b N P \\
\derivL{P}{t} &= c N P - d P \\
\end{align*}
\vspace{-13mm}
\subsection*{Leslie model}
\begin{align*}
\derivL{N}{t} &= a N (1 - N / K) - b N P \\
\derivL{P}{t} &= c P (1 - e P/N) \\
\end{align*}
\vspace{-13mm}
\subsection*{Holling models}
\begin{align*}
&\derivL{N}{t} = a N (1 - N / K) - b(N,P) P \\
&\derivL{P}{t} = c \, b(N,P) P - d P \\
&b(N,P) = m N / (W + N) &\textrm{(Holling I functional response)} \\
&b(N,P) = m N / (w P + N) &\textrm{(Holling II functional response)} \\
\end{align*}
\newpage

\section*{Population Genetics}
\subsection*{Variables}
\begin{itemize}
\item $p = \textrm{[A allele frequency]}$
\item $S = \textrm{[Population size]}$
\item $w_{11} = \textrm{[Genotype AA fitness]}$
\item $w_{12} = \textrm{[Genotype Aa fitness]}$
\item $w_{22} = \textrm{[Genotype aa fitness]}$
\end{itemize}
\subsection*{Equations}
Given $p_b$ (with $q_n \equiv 1 - p_n$), compute $p_{n+1}$ using the following equation:
\begin{align*}
p_{n+1} = p_n q_n {{(w_{11} - w_{12}) p_n + (w_{12} - w_{22}) q_n} \over {w_{11} \, p_n^2 + 2 w_{12} \, p_n q_n + w_{22} \, q_n^2}} + r_n \sqrt{{{3 p_n q_n} \over {2 N}}}
\end{align*}
If genetic drift is enabled, then for each $n$, $r_n$ is a random number in the range $(-1, 1)$; otherwise, $r_n = 0$ for all $n$.
\newpage

\section*{Life Table}
\subsection*{Variables}
\begin{itemize}
\item $N= \textrm{[number of age groups]}$
\item $x = \textrm{[age group index between zero and $N-1$ inclusive]}$
\item $n_x = \textrm{[initial population of age group x]}$
\item $P_x = \textrm{[probability of an individual surviving to age group x]}$
\item $m_x = \textrm{[fecundity of age group x]}$
\end{itemize}

\subsection*{Equations}
The columns of the Life Table output matrix are computed using the following equations.
\begin{align*}
p_x &= P_{x+1}/P_x\\
q_x &= 1 - \frac{p_{x+1}}{p_x}\\
d_x &= P_x - P_{x+1}\\
e_x &= P^{-1}_x\sum_{j=x+1}^{j<N}{P_j}\\
\end{align*}
The Age Structure animation is computed in the following way.  At every time interval the population in age group $x$ advances into age group $x+1$ and size of the advancing population is given by
\begin{align*}
n_{{x+1}_{t+1}} = n_{x_t}p_{x_t}
\end{align*}
After each age group has been advanced, the first age group is populated according to the equation
\begin{align*}
n_{0_{t+1}} = \sum_{j=0}^{j<N}{n_{x_t}m_x}
\end{align*}
The survivorship curve visualizes the probability that individuals will survive into each age group and the  total population curve shows $\sum{n_x}$ over time.
\newpage

\section*{Competition}
\subsection*{Variables}
\begin{itemize}
\item $x = \textrm{[species population]}$
\item $r = \textrm{[rate of increase]}$
\item $K = \textrm{[carrying capacity]}$
\item $\alpha_{12} = \textrm{[species 1 competition coefficient]}$
\item $\alpha_{21} = \textrm{[species 2 competition coefficient]}$
\end{itemize}
\subsection*{Equations}
\begin{align*}
\derivF{x_1}{t} &= r_1x_1\left(1-{x_1+\alpha_{12}x_2 \over K_1}\right) \\
\derivF{x_2}{t} &= r_2x_2\left(1-{x_2+\alpha_{21}x_1 \over K_2}\right) \\
\end{align*}

\end{document}
