logabs:true;

de: 'diff(P,t) = r*(M-P)*P;

ode2(de,P,t);

%*r*M, %c=log(C)/(r*M), logcontract;

gsol: map(exp,%);

solve(gsol,P);

assume(P>0);

assume(M>P); solve(gsol,P); forget(M>P)$

assume(P>M); solve(gsol,P); forget(P>M)$

sde: de, r=1, M=2;

load("drawdf");

wxdrawdf(rhs(sde), [t,0,4], [P,0,5], show_field=false, tstep=0.05, color=black,
apply(solns_at, makelist([0,p], p, [0.1,0.5,1,2,3,4,5])))$