KBS Course, lecture 01

Single-species population models

Outline
-Parameters, state variables, units, model change (differential equations or difference equations) 
-Single species, density-independent model, continuous time (Exponential)
-Equilibrium and stability
-Mathematica notebook
-Single-species, density-independent, discrete time (Geometric); equilibrium and stability

Model structure

Models: “All models are wrong, but some are useful”- George Box
William of Occam’s razor: simpler explanation is usually better

State variable, or variable: Describes the state of the system. Changing with time. What you care about.
Parameters: constant
Units. Don’t ignore. Sometimes unitless
Change: mechanism of the model. Either continous time differential equations or discrete time (difference equation, map).

Basic Growth Model, continuous time

Talk about intuition behind a differential equation

(dN/dt)≃(Underscript[Lim, t->0])((ΔN)/(Δt))

Think: little changes, or instantaneous change

☺ Have students come up with these basic ways in which a population changes

(dN/dt)=births-deaths+immigration-emigration

Above is the only “law” in ecology
Ignore immigration and emigration for now, i.e. closed population

(dN/dt)=births-deaths

Shortcuts

(dN/dt)=N'[t]=(OverDot[N])
(* ctrl + & to get box over character*)

Exponential Growth

☺ Have students create equations for generic births and deaths terms, use b for births, use m for mortality.

Typical mistake births = b. 1) what about extremes of N = 0, or boundary conditions. 2) what about dependence of births on the size of number of individuals in the population.

(dN/dt)=b N-m N

☺ What are the parameters versus variables?

Combine to: r = instantaneous growth rate

(dN/dt)=(b-m )N
(dN/dt)=r N

What are the units in this model--parameters and variables?
(density/time)= (1/time) x density
Note: units of time and density are then critical

Plot[2.0 n,{n,0,10},PlotRange->{0,10},Frame->True,FrameLabel->{"N","dN/dt"}]

Introduce concept of per capita

(dN/dt)(1/N)=r

Plot[2.0,{n,0,3},PlotRange->{0,3},Frame->True,FrameLabel->{"N","(dN/dt)(1/N)"}]

Solution to differential equation

Review, but as we’ll see, a computer can do all of this.
First, get all of the same kinds on each side, and separate the dN and dt

(dN/dt)(1/N)=r

(1/N)dN=r dt

Integrate both sides

(∫_(t=0)^(t=T))(1/N)\[DifferentialD]N=(∫_(t=0)^(t=T))r\[DifferentialD]t

Do right hand side first

∫r\[DifferentialD]t=r t

r t(Subscript[|, t=0]^(t=T))=r T- r 0=r T

Now, the left hand side

Math Magic:

∫(1/N)\[DifferentialD]N=ln(N)

Walk through next 4 steps and ask calc-competent students to do on own.

ln(N(t))(Subscript[|, t=0]^(t=T))=ln(N(T))-ln((Subscript[N, 0]))

ln(N(T))-ln((Subscript[N, 0]))=r T

ln(((N(T))/(Subscript[N, 0])))=r T

((N(T))/(Subscript[N, 0]))=(e^(r T))

N(T)=(Subscript[N, 0])(e^(r T))

Open Mathematica and learn DSolve. Note, have to use small n because capitol N is a function in Mathematica.

(*indefinite integral*)
Integrate[1/n,n]

Note, in Mathematica Log[] is natural log

DSolve[{n'[t]==r n[t],n[0]==n0},n,t]

Later will use a template in a notebook.

Graphically examine solution

N(t)=(Subscript[N, 0])(e^(r t))

And there you have it, "NERT"

In Mathematica, learn Plot[]

Plot[3 Exp[2.0 t],{t,0,2}]

In Mathematica, learn Manipulate

Manipulate[Plot[3 Exp[r t],{t,0,2}],{r,-5,5}]

Manipulate[Plot[n0 Exp[r t],{t,0,2},PlotRange->{0,20}],{n0,0.1,10},{r,-5,5}]

Play in Mathematica:
1) What happens if r<0, r=0, r>0
2) Look at log scale

☺ So, what does a bigger and smaller r do?

Analytically examine solution

First, find equilibria

(dN/dt)=N r
(dN/dt)=0
0=N r
N=0

Second, find stability of equilibria, i.e. what happens if close to equilibrium but a little bit off. Does it increase or decrease. In other words, is the slope positive or negative. The derivative extracts the slope.

Note, this approach of taking the derivative becomes even more important in more complex models.

f(N)=N r
(df/dN)=r

Point out, this is the slope of dN/dt vs N graph. In other words, total population change with a change in the population. 
☺ What does it mean if this is positive? What does it mean if this is negative? Explain in regular words.

So stable if

(df/dN)<0
r<0

Graphics[{Disk[{0,0},0.1],Line[{{0,0},{1,0}}]}]

But if r is positive, grows to infinity

Graphics[{Circle[{0,0},0.1],Line[{{0,0},{1,0}}]}]

Look at GeneralDiffEq Notebook

Geometric

If discrete-time ,non-overlapping generations.

(Subscript[N, t+1])=f((Subscript[N, t]))
(Subscript[N, t+1])=λ (Subscript[N, t])

What are the units in this model?
density = dimensionless density
Note, definition of time step is still critical to lambda

f[n_]:=2 n;
NestList[f,4,3]

ListLinePlot[NestList[f,4,3]]

Include one-to-one line

p1=Plot[{2 n,n},{n,0,20},Frame->True,FrameLabel->{"(Subscript[N, t])","(Subscript[N, t + 1])"},PlotStyle->{Purple,Dashed}]

Draw cobweb diagram one segment at a time.

Show[p1,ListLinePlot[{{4,0},{4,8},{8,8},{8,16},{16,16},{16,32}},PlotStyle->Green]]

CobWeb[f_,n0_,steps_]:=Module[{temps=n0,res},
res:={{n0,0},{n0,f[n0]}};Do[res=Join[res,{{temps,f[temps]},{f[temps],f[temps]}}];temps=f[temps],{steps}];
Return[ListLinePlot[res,DisplayFunction->Identity]];
]

Show[p1,CobWeb[f,4,3]]

Problem Set

1) Doubling Time

How long will it take for a population to double in size given continuous time, density-independent growth?

2(Subscript[N, 0])=(Subscript[N, 0])(e^(r t))

2=(e^(r t))

ln(2)=r t

t=((ln(2))/r)

2) “Equivalence” between exponential and geometric

A population is growing continuously, but you only observed it once per week. What is the value of lambda that you will observe given the the instantaneous growth rate, r?

N(T)=(Subscript[N, 0])(e^(r T))
0 =t
T = t+1
(Subscript[N, t+1])=(Subscript[N, t])(e^r)
(Subscript[N, t+1])=λ (Subscript[N, t])
λ = (e^r)

3) Convert lambda from years to weeks

For the same population above, one has measured lambda on an annual basis to be 3.8. What is the equivalent lambda on a weekly basis? Hint, use your results from above.