Exercise 1: survival -- fecundity trade-off

Clear["Global`*"];

Invasion fitness of mutant

w=smax y+(1-smax x)((f[y])/(f[x]))

S = D[w,y] /.y->x

S /. f-> Function[z,fmax (1-(z^2))] //FullSimplify
Solve[% == 0,x]

Plot[((1-(Sqrt[1-(smax^2)]))/smax),{smax,0,1}]

J=D[S,x];
J/. f-> Function[z,fmax (1-(z^2))] //FullSimplify  ;
% /.x->  ((1-(Sqrt[1-(smax^2)]))/smax) //FullSimplify

H  = D[w,y,y] /.y->x ;
H /. f-> Function[z,fmax (1-(z^2))] //FullSimplify  ;
% /.x->  ((1-(Sqrt[1-(smax^2)]))/smax) //FullSimplify

General branching condition

Solve[S == 0,f'[x]]

D[w,y,x] /.y->x /. f'[x]->((smax f[x])/(-1+smax x)) //Simplify

Hence branching is impossible.

J /. f'[x]->((smax f[x])/(-1+smax x))  //FullSimplify 
H /. f'[x]->((smax f[x])/(-1+smax x))  //FullSimplify

Exercise 2: the evolution of aggressivity

Expected payoff of a mutant y in a resident pop x

Clear["Global`*"];

Payoff = y x ((v/2)-c)+ y (1-x)v + (1-y)x *0 + (1-y)(1-x)(v/2) ;

(* resident payoff *)
PayoffRes =  Payoff /. y-> x ;

w= ((1+δ Payoff)/(1+δ PayoffRes))  ;
w = Normal[Series[w,{δ,0,1}]] ;
w =w /.δ->1

S = D[w,y] /.y->x //Simplify

equi = Flatten@Solve[S == 0,x]

J=D[S,x]/.   equi //Simplify

Reduce[J< 0&& v> 0&&c> 0]

H  = D[w,y,y] /.y->x /.   equi //Simplify

With cost to flexibility

Clear["Global`*"];

Payoff = y x ((v/2)-c)+ y (1-x)v + (1-y)x *0 + (1-y)(1-x)(v/2)  -cf  y(1-y) ;

(* resident payoff *)
PayoffRes =  Payoff /. y-> x ;

w= ((1+δ Payoff)/(1+δ PayoffRes))  ;
w = Normal[Series[w,{δ,0,1}]] ;
w =w/. δ->1

S = D[w,y] /.y->x //Simplify

equi = Flatten@Solve[S == 0,x]

J=D[S,x]/.   equi //Simplify

H  = D[w,y,y] /.y->x /.   equi //Simplify

Reduce[J< 0&& H> 0&& v> 0&&c> 0 && cf>0 && 0<((-2 cf+v)/(2 (c-2 cf)))<1]