Question: How to do two substiutions in succession?

I have some expressions like the follwoing:

k := n*(phi+ln(-1/(-exp(phi)+exp(phi)*p-p)))/phi;

Moreover for some groups of expressions, I have a definition for mu and (sigma)^(2).


mu = n*p

(sigma)^(2) = n*p*(1-p)


Now I´d like to display k in terms of mu and (sigma)^(2), or sigma as efficiently as possible, i.e. if possible without p or n showing up.

Therefore I have two questions:

1. Is there a way to ask Maple, if there is any function of mu and (sigma)^(2), which eliminates the parameters n and p in k completely?

2. If it is not possible to eliminate the parameters n and p completely, which will be the case most of the time, how may I display k in terms of mu and (sigma)^(2), i.e. do two substitutions in succession?

Please Wait...