0
$\begingroup$
D[1/(1 + Exp[-x]), x]
% /. {1/(1 + Exp[-x]) -> p}

Suppose I know that the rule can be applied, but Mathematics just won't do it straight away as the expression is not explicitly given.

So how would I ask it to simplify to get p(1-p)?

Just as a check that it can be simplified:

(p*(1 - p) /. {p -> 1/(1 + Exp[-x])}) - D[1/(1 + Exp[-x]), x] // FullSimplify
$\endgroup$
2
$\begingroup$

The expression $1/(1+e^{-x})$ does not appear in the initial result. Try to map $e^{-x}$ instead.

D[1/(1 + Exp[-x]), x]
% /. {(Exp[-x]) -> p^-1 - 1} // Simplify
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.