The derivative of the logistic function

3.8k Views Asked by At

The logistic function is $\frac{1}{1+e^{-x}}$, and its derivative is $f(x)*(1-f(x))$. In the following page on Wikipedia, it shows the following equation:

$$f(x) = \frac{1}{1+e^{-x}} = \frac{e^x}{1+e^x}$$

which means $$f'(x) = e^x (1+e^x) - e^x \frac{e^x}{(1+e^x)^2} = \frac{e^x}{(1+e^x)^2}$$

I understand it so far, which uses the quotient rule $$\left(\frac{g(x)}{h(x)}\right)' = \frac{g'(x)h(x) - g(x)h'(x)}{h(x)^2}.$$

However, why is it then transformed into $f(x) * (1-f(x))$?

1

There are 1 best solutions below

6
On

Just start from the answer and work backwards. $$\begin{aligned} f(x)(1-f(x)) &= \frac{e^x}{1+e^x} \left( 1 - \frac{e^x}{1+e^x} \right)\\ &= \frac{e^x}{1+e^x} \left( \frac{1+e^x}{1+e^x} - \frac{e^x}{1+e^x} \right)\\ &= \frac{e^x}{1+e^x} \left( \frac{1}{1+e^x} \right) = \frac{e^x}{(1+e^x)^2} = f'(x) \end{aligned}$$