Models of parasitic interactions

Nicholson-Bailey model

<<Graphics`MultipleListPlot`

fn1 = R H Exp[-a P];
fn2 = c H (1-Exp[-a P]);
fnList = {fn1,fn2};
varList = {H, P};

Plot[ {1-Exp[-x], 1-Exp[-2 x],1-Exp[-0.5x]},{x,0,5},
	PlotRange->{0,1.2}]

para = {a->0.07, R->2, c->1}
fnListN = fnList/.para

eqmP = Log[R]/a;
eqmH = R Log[R]/a/c/(R-1);
{eqmH, eqmP}/.para//N

next[{Hx_, Px_}]:=fnListN/.{H->Hx, P->Px}
next[{0.1,0.01}]

seq = NestList[next,{20,10},30]

ListPlot[seq,PlotJoined->True,PlotRange->{{0,40},{0,40}},
	AspectRatio->1]

MultipleListPlot[ Transpose[seq],PlotJoined->True, PlotRange->{0,40}]

mat = Outer[D, fnList, varList]

fnList/.{H->R Log[R]/a/c/(R-1), P->Log[R]/a}//Factor

mat2 = mat/.{H->R Log[R]/a/c/(R-1), P->Log[R]/a}

Det[mat2]

fn1 = H Exp[r(1-H/K)] Exp[-a P];
fn2 = c H(1-Exp[-a P]);
fnList = {fn1,fn2}
varList = {H, P}

para = {r->2, K->100, c->1, a->0.07};
fnListN = fnList/.para

next[{Hx_, Px_}]:=fnListN/.{H->Hx, P->Px}
next[{0.1,0.01}]

seq = NestList[next,{40,30},50]

ListPlot[seq,PlotJoined->True, AspectRatio->1,PlotRange->{{0,200},{0,200}}]

MultipleListPlot[Transpose[seq],PlotJoined->True, PlotRange->{0,200}]

Non-random search model

fn1 = R H (1 + a P/k)^(-k);
fn2 = c H (1-(1 + a P/k)^(-k));
fnList = {fn1,fn2};
varList = {H, P};

para = {a->0.07, R->2, c->1, k->0.5}
fnListN = fnList/.para

next[{Hx_, Px_}]:=fnListN/.{H->Hx, P->Px}
next[{0.1,0.01}]

seq = NestList[next,{20,10},30]

ListPlot[seq,PlotJoined->True,PlotRange->{{0,80},{0,80}},
	AspectRatio->1]

MultipleListPlot[ Transpose[seq],PlotJoined->True, PlotRange->{0,80}]

fn1 == H

eqm  =  Solve[{fn1 == H, fn2 == P}, {H, P}]

{eqmH,  eqmP}  =  {H,  P} /. eqm[[2]]

mat = Outer[D, fnList, varList]

fnList - fnList/.{H->eqmH, P->eqmP}//Simplify

mat2 = mat/.{H->eqmH, P->eqmP}//Simplify

MatrixForm[mat2]

Det[mat2]//Simplify

Tr[mat2] // Simplify