# Second derivative of $\frac{1}{1 + e^{- x}}$

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

Related calculators: Derivative Calculator, Logarithmic Differentiation Calculator

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.

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

### Find the first derivative $\frac{d}{dx} \left(\frac{1}{1 + e^{- x}}\right)$

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)$$

$$- \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}}$$

$$- \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}}$$

The derivative of a constant is $0$:

$$- \frac{{\color{red}\left(\frac{d}{dx} \left(1\right)\right)} + e^{- x} \frac{d}{dx} \left(- x\right)}{\left(1 + e^{- x}\right)^{2}} = - \frac{{\color{red}\left(0\right)} + e^{- x} \frac{d}{dx} \left(- x\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{e^{- x} {\color{red}\left(\frac{d}{dx} \left(- x\right)\right)}}{\left(1 + e^{- x}\right)^{2}} = - \frac{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{e^{- x} {\color{red}\left(\frac{d}{dx} \left(x\right)\right)}}{\left(1 + e^{- x}\right)^{2}} = \frac{e^{- x} {\color{red}\left(1\right)}}{\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)}}$.

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

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 = \frac{1}{4}$ and $f{\left(x \right)} = \frac{1}{\cosh^{2}{\left(\frac{x}{2} \right)}}$:

$${\color{red}\left(\frac{d}{dx} \left(\frac{1}{4 \cosh^{2}{\left(\frac{x}{2} \right)}}\right)\right)} = {\color{red}\left(\frac{\frac{d}{dx} \left(\frac{1}{\cosh^{2}{\left(\frac{x}{2} \right)}}\right)}{4}\right)}$$

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

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(\frac{1}{\cosh^{2}{\left(\frac{x}{2} \right)}}\right)\right)}}{4} = \frac{{\color{red}\left(\frac{d}{du} \left(\frac{1}{u^{2}}\right) \frac{d}{dx} \left(\cosh{\left(\frac{x}{2} \right)}\right)\right)}}{4}$$

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

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

$$- \frac{\frac{d}{dx} \left(\cosh{\left(\frac{x}{2} \right)}\right)}{2 {\color{red}\left(u\right)}^{3}} = - \frac{\frac{d}{dx} \left(\cosh{\left(\frac{x}{2} \right)}\right)}{2 {\color{red}\left(\cosh{\left(\frac{x}{2} \right)}\right)}^{3}}$$

The function $\cosh{\left(\frac{x}{2} \right)}$ is the composition $f{\left(g{\left(x \right)} \right)}$ of two functions $f{\left(u \right)} = \cosh{\left(u \right)}$ and $g{\left(x \right)} = \frac{x}{2}$.

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(\cosh{\left(\frac{x}{2} \right)}\right)\right)}}{2 \cosh^{3}{\left(\frac{x}{2} \right)}} = - \frac{{\color{red}\left(\frac{d}{du} \left(\cosh{\left(u \right)}\right) \frac{d}{dx} \left(\frac{x}{2}\right)\right)}}{2 \cosh^{3}{\left(\frac{x}{2} \right)}}$$

The derivative of the hyperbolic cosine is $\frac{d}{du} \left(\cosh{\left(u \right)}\right) = \sinh{\left(u \right)}$:

$$- \frac{{\color{red}\left(\frac{d}{du} \left(\cosh{\left(u \right)}\right)\right)} \frac{d}{dx} \left(\frac{x}{2}\right)}{2 \cosh^{3}{\left(\frac{x}{2} \right)}} = - \frac{{\color{red}\left(\sinh{\left(u \right)}\right)} \frac{d}{dx} \left(\frac{x}{2}\right)}{2 \cosh^{3}{\left(\frac{x}{2} \right)}}$$

$$- \frac{\sinh{\left({\color{red}\left(u\right)} \right)} \frac{d}{dx} \left(\frac{x}{2}\right)}{2 \cosh^{3}{\left(\frac{x}{2} \right)}} = - \frac{\sinh{\left({\color{red}\left(\frac{x}{2}\right)} \right)} \frac{d}{dx} \left(\frac{x}{2}\right)}{2 \cosh^{3}{\left(\frac{x}{2} \right)}}$$

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 = \frac{1}{2}$ and $f{\left(x \right)} = x$:

$$- \frac{\sinh{\left(\frac{x}{2} \right)} {\color{red}\left(\frac{d}{dx} \left(\frac{x}{2}\right)\right)}}{2 \cosh^{3}{\left(\frac{x}{2} \right)}} = - \frac{\sinh{\left(\frac{x}{2} \right)} {\color{red}\left(\frac{\frac{d}{dx} \left(x\right)}{2}\right)}}{2 \cosh^{3}{\left(\frac{x}{2} \right)}}$$

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{\sinh{\left(\frac{x}{2} \right)} {\color{red}\left(\frac{d}{dx} \left(x\right)\right)}}{4 \cosh^{3}{\left(\frac{x}{2} \right)}} = - \frac{\sinh{\left(\frac{x}{2} \right)} {\color{red}\left(1\right)}}{4 \cosh^{3}{\left(\frac{x}{2} \right)}}$$

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

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

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