Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sigmoid function is defined as $$\frac{1}{1+e^{-x}}$$ I tried to calculate the derivative and got $$\frac{e^{-x}}{(e^{-x}+1)^2}$$ Wolfram|Alpha however give me the same function but with exponents on $e$ changed of sign

Someone could explain this to me?

share|cite|improve this question
up vote 4 down vote accepted

Multiply both numerator and denominator by $e^{2x}$ and you will get Wolfram|Alpha result.

share|cite|improve this answer

Using the fact $$e^{-x}=\frac{1}{e^x}$$ we have that $$\frac{e^{-x}}{(1+e^{-x})^2}=\dfrac{\dfrac{1}{e^x}}{(1+\dfrac{1}{e^x})^2}=\dfrac{\dfrac{1}{e^x}}{(\dfrac{e^x+1}{e^x})^2}=$$ $$=\frac{\dfrac{1}{e^x}}{\dfrac{(e^x+1)^2}{e^x\cdot e^x}}=\frac{1}{\dfrac{(e^x+1)^2}{e^x}}=\frac{e^x}{(1+e^x)^2}$$

share|cite|improve this answer

Use the formula: $\left(\frac{1}{f(x)}\right)'=-\frac{f'(x)}{f^2(x)}$ and we have:

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

share|cite|improve this answer
Yes that's what I did – mattecapu Apr 15 '14 at 8:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.