Population Models

Comparing Logistic and Gompertz Direction Fields

Here we have the direction fields for both the Logistic and Gompertz models

k=0.5;
K=8;
logistic=VectorPlot[{1,k*P*(1-P/K)},{t,0,15},{P,0,15},VectorScale->{Small,Small,None},VectorStyle->Red];

gompertz=VectorPlot[{1,k*P*Log[K/P]},{t,0,15},{P,0,15},VectorScale->{Small,Small,None},VectorStyle->Blue];

Show[logistic,gompertz,BaseStyle->20,FrameLabel->{"t","P(t)"}]

Notice the basic direction of the arrows is the same for both models, except when P(t)=0 which is unphysical since the P(t) are populations, so we only care about P(t)>0.

Both models have the same carrying capacity.

The basic difference is the Gompertz (blue) has a steeper slope than Logistic (red) when P(t)  is small.

You might think that you could just change the k value and make Gompertz look like Logistic, but you see if you reduce the value of k in Gompertz to get a match to Logistic slope when P(t) is small, then the direction fields disagree when P(t) is large!

Each model is useful, and used in different situations.

k=0.5;
K=8;
logistic=VectorPlot[{1,k*P*(1-P/K)},{t,0,15},{P,0,15},VectorScale->{Small,Small,None},VectorStyle->Red];

k=0.24;
K=8;
gompertz=VectorPlot[{1,k*P*Log[K/P]},{t,0,15},{P,0,15},VectorScale->{Small,Small,None},VectorStyle->Blue];

Show[logistic,gompertz,BaseStyle->20,FrameLabel->{"t","P(t)"}]

The Doomsday Model 
Wait! Don’t Look Yet! Avert Your Eyes! We have to look at it in class first.
Zombie Apocalypse Warning!

Most of the Mathematica here is just to create a pretty picture.

Clear[k,t0,y0,w]
k=1/2;
t0=0;
y0=2;
y[t_,w_]:=Piecewise[{{((((1/(-k w(t-t0)+(y0^(-w))))))^(1/w)),w≠0},{y0*Exp[k*t],w==0}}];
Td[w_]=Piecewise[{{((y0^(-w))/(k*w))+t0,w≠0},{∞,w==0}}];

Manipulate[
Plot[{y0*Exp[k*t],y[t,w]},{t,0,15},PlotStyle->{Blue,Purple},PlotRange->{{0,15},{0,20}},Ticks->{{{Td[w],"(Subscript[T, d])"}},Automatic},GridLines->{{Td[w]},None},GridLinesStyle->Directive[Purple,Dashed,Thick],AxesLabel->{"t","y"},BaseStyle->20,PlotLegends->{"Exponential","Doomsday"}],{w,-5,2,(10^(-1))}]

The integration we performed for the doomsday model is not valid when w=0. In this case, the growth is exponential growth.

Notice that the doomsday time (when the population is infinite) (Subscript[T, d]) is less than (Subscript[t, 0])=0 for w<0. In these cases, there is no doomsday since the population does not become infinite in finite time. In these cases the growth is less than exponential growth, so it still takes an infinite amount of time to get to an infinite population.

Plot[Td[w],{w,-5,2},AxesLabel->{"w","(Subscript[T, d])"},BaseStyle->20]

Summary of Doomsday Model

For w<0, the model is valid for t ∈[(Subscript[t, 0]),∞) since (Subscript[T, d])<(Subscript[t, 0]):

Clear[k,w,t0,y0]
Limit[((((1/(-k w(t-t0)+(y0^(-w))))))^(1/w)),t->t0,Assumptions->w<0]
Limit[((((1/(-k w(t-t0)+(y0^(-w))))))^(1/w)),t->∞,Assumptions->w<0]

For w>0, the model is valid for t ∈[(Subscript[t, 0]),(Subscript[T, d])) since (Subscript[T, d])>(Subscript[t, 0]):

Clear[k,w,t0,y0]
Limit[((((1/(-k w(t-t0)+(y0^(-w))))))^(1/w)),t->t0,Assumptions->w>0]
Limit[((((1/(-k w(t-t0)+(y0^(-w))))))^(1/w)),t->((y0^(-w))/(k*w))+t0,Assumptions->w>0]