u_U = var('u') #number of unique species divided by max possible num of
species
t = var('t') #total branch length of tree
k = var('k') #determines how much weight 't' is given
S(u_U,t,k) = (u_U) - exp(-k/t) #define score for subtrees, k is the parameter
#the amount of influence total branch length has over the subtree rankings is determined by dS/dt
#the higher the rate of change of the score with respect to 't', the more variation(with respect to total branch length) will be #observed between subtree scores
dS_dt = abs(derivative(S,t))
#example
u_U_ = 1
t_ = .5
plot(dS_dt(u_U_,t_,k), (k,0,t_ + 5))