Why can the first derivative of the sigmoid function can be simplified as shown below

63 Views Asked by At

Can you explain how the formula$$\dfrac{\mathrm{e}^{-x}}{\left(\mathrm{e}^{-x}+1\right)^2}$$

which is the first derivative of the sigmoid function can be simplified into

$$\dfrac{\mathrm{e}^{x}}{\left(\mathrm{e}^{x}+1\right)^2}$$

4

There are 4 best solutions below

0
On

Expand it out, and then multiply by $\frac{e^{2x}}{e^{2x}}$: $$ \frac{e^{-x}}{(e^{-x}+1)^2}=\frac{e^{2x}}{e^{2x}}\cdot\frac{e^{-x}}{e^{-2x}+2e^{-x}+1}=\frac{e^{x}}{1+2e^{x}+e^{2x}}=\frac{e^{x}}{(e^{x}+1)^2} $$

0
On

Multiply expression by $\frac{ e^{2x} }{e^{2x} }$

The numerator clearly becomes $e^{2x-x} = e^x $ and the denominator

$$ (e^{-x}+1)^2 \cdot (e^{x})^2 = ( (e^{-x}+1) e^x )^2 = (1 + e^x)^2 $$

0
On

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

0
On

Since you mention this is the first derivative of $$\sigma(x):=\frac{1}{1+e^{-x}}=1-\frac{e^{-x}}{1+e^{-x}}=1-\frac{1}{1+e^x}=1-\sigma(-x)$$(where the penultimate $=$ multiplies numerator and denominator by $e^x$),$$\sigma'(x)=\frac{d}{dx}(1-\sigma(-x))=\sigma'(-x)$$is an even function, which gives the desired result.