Differentiation of logistic function The logistic function is $g(x) = \frac{1}{1+e^{-x}}$, and it's derivative is $g'(x) = (1-g(x))g(x)$.
Now if the argument of my logistic function is say $x+2x^2+ab$, with $a,b$ being constants, and I derive with respect to x: $(\frac{1}{1+e^{-x+2x^2+ab}})'$, is the derivative still $(1-g(x))g(x)$?

Suppose $g(x) = (1+\exp(-h(x))^{-1}$
then \begin{align}g'(x)&=-(1+\exp(-h(x))^{-2}\exp(-h(x))(-h'(x))\\
&=g(h(x))\frac{\exp(-h(x))}{1+\exp(-h(x))}h'(x)\\
&=g(h(x))\frac{1+\exp(-h(x))-1}{1+\exp(-h(x))}h'(x) \\
&=g(h(x))(1-g(h(x)))h'(x)\end{align}
In this case $h(x)=x+2x^2+ab$, then $h'(x)=4x+1$.
