Derivative of $$$\frac{1}{1 + e^{- x}}$$$

The calculator will find the derivative of $$$\frac{1}{1 + e^{- x}}$$$, with steps shown.

Related calculators: Logarithmic Differentiation Calculator, Implicit Differentiation Calculator with Steps

Leave empty for autodetection.
Leave empty, if you don't need the derivative at a specific point.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Your Input

Find $$$\frac{d}{dx} \left(\frac{1}{1 + e^{- x}}\right)$$$.

Solution

The function $$$\frac{1}{1 + e^{- x}}$$$ is the composition $$$f{\left(g{\left(x \right)} \right)}$$$ of two functions $$$f{\left(u \right)} = \frac{1}{u}$$$ and $$$g{\left(x \right)} = 1 + e^{- x}$$$.

Apply the chain rule $$$\frac{d}{dx} \left(f{\left(g{\left(x \right)} \right)}\right) = \frac{d}{du} \left(f{\left(u \right)}\right) \frac{d}{dx} \left(g{\left(x \right)}\right)$$$:

$${\color{red}\left(\frac{d}{dx} \left(\frac{1}{1 + e^{- x}}\right)\right)} = {\color{red}\left(\frac{d}{du} \left(\frac{1}{u}\right) \frac{d}{dx} \left(1 + e^{- x}\right)\right)}$$

Apply the power rule $$$\frac{d}{du} \left(u^{n}\right) = n u^{n - 1}$$$ with $$$n = -1$$$:

$${\color{red}\left(\frac{d}{du} \left(\frac{1}{u}\right)\right)} \frac{d}{dx} \left(1 + e^{- x}\right) = {\color{red}\left(- \frac{1}{u^{2}}\right)} \frac{d}{dx} \left(1 + e^{- x}\right)$$

Return to the old variable:

$$- \frac{\frac{d}{dx} \left(1 + e^{- x}\right)}{{\color{red}\left(u\right)}^{2}} = - \frac{\frac{d}{dx} \left(1 + e^{- x}\right)}{{\color{red}\left(1 + e^{- x}\right)}^{2}}$$

The derivative of a sum/difference is the sum/difference of derivatives:

$$- \frac{{\color{red}\left(\frac{d}{dx} \left(1 + e^{- x}\right)\right)}}{\left(1 + e^{- x}\right)^{2}} = - \frac{{\color{red}\left(\frac{d}{dx} \left(1\right) + \frac{d}{dx} \left(e^{- x}\right)\right)}}{\left(1 + e^{- x}\right)^{2}}$$

The function $$$e^{- x}$$$ is the composition $$$f{\left(g{\left(x \right)} \right)}$$$ of two functions $$$f{\left(u \right)} = e^{u}$$$ and $$$g{\left(x \right)} = - x$$$.

Apply the chain rule $$$\frac{d}{dx} \left(f{\left(g{\left(x \right)} \right)}\right) = \frac{d}{du} \left(f{\left(u \right)}\right) \frac{d}{dx} \left(g{\left(x \right)}\right)$$$:

$$- \frac{{\color{red}\left(\frac{d}{dx} \left(e^{- x}\right)\right)} + \frac{d}{dx} \left(1\right)}{\left(1 + e^{- x}\right)^{2}} = - \frac{{\color{red}\left(\frac{d}{du} \left(e^{u}\right) \frac{d}{dx} \left(- x\right)\right)} + \frac{d}{dx} \left(1\right)}{\left(1 + e^{- x}\right)^{2}}$$

The derivative of the exponential is $$$\frac{d}{du} \left(e^{u}\right) = e^{u}$$$:

$$- \frac{{\color{red}\left(\frac{d}{du} \left(e^{u}\right)\right)} \frac{d}{dx} \left(- x\right) + \frac{d}{dx} \left(1\right)}{\left(1 + e^{- x}\right)^{2}} = - \frac{{\color{red}\left(e^{u}\right)} \frac{d}{dx} \left(- x\right) + \frac{d}{dx} \left(1\right)}{\left(1 + e^{- x}\right)^{2}}$$

Return to the old variable:

$$- \frac{e^{{\color{red}\left(u\right)}} \frac{d}{dx} \left(- x\right) + \frac{d}{dx} \left(1\right)}{\left(1 + e^{- x}\right)^{2}} = - \frac{e^{{\color{red}\left(- x\right)}} \frac{d}{dx} \left(- x\right) + \frac{d}{dx} \left(1\right)}{\left(1 + e^{- x}\right)^{2}}$$

Apply the constant multiple rule $$$\frac{d}{dx} \left(c f{\left(x \right)}\right) = c \frac{d}{dx} \left(f{\left(x \right)}\right)$$$ with $$$c = -1$$$ and $$$f{\left(x \right)} = x$$$:

$$- \frac{\frac{d}{dx} \left(1\right) + e^{- x} {\color{red}\left(\frac{d}{dx} \left(- x\right)\right)}}{\left(1 + e^{- x}\right)^{2}} = - \frac{\frac{d}{dx} \left(1\right) + e^{- x} {\color{red}\left(- \frac{d}{dx} \left(x\right)\right)}}{\left(1 + e^{- x}\right)^{2}}$$

Apply the power rule $$$\frac{d}{dx} \left(x^{n}\right) = n x^{n - 1}$$$ with $$$n = 1$$$, in other words, $$$\frac{d}{dx} \left(x\right) = 1$$$:

$$- \frac{\frac{d}{dx} \left(1\right) - e^{- x} {\color{red}\left(\frac{d}{dx} \left(x\right)\right)}}{\left(1 + e^{- x}\right)^{2}} = - \frac{\frac{d}{dx} \left(1\right) - e^{- x} {\color{red}\left(1\right)}}{\left(1 + e^{- x}\right)^{2}}$$

The derivative of a constant is $$$0$$$:

$$- \frac{{\color{red}\left(\frac{d}{dx} \left(1\right)\right)} - e^{- x}}{\left(1 + e^{- x}\right)^{2}} = - \frac{{\color{red}\left(0\right)} - e^{- x}}{\left(1 + e^{- x}\right)^{2}}$$

Simplify:

$$\frac{e^{- x}}{\left(1 + e^{- x}\right)^{2}} = \frac{1}{4 \cosh^{2}{\left(\frac{x}{2} \right)}}$$

Thus, $$$\frac{d}{dx} \left(\frac{1}{1 + e^{- x}}\right) = \frac{1}{4 \cosh^{2}{\left(\frac{x}{2} \right)}}$$$.

Answer

$$$\frac{d}{dx} \left(\frac{1}{1 + e^{- x}}\right) = \frac{1}{4 \cosh^{2}{\left(\frac{x}{2} \right)}}$$$A