0
$\begingroup$

I tried to use the quotient rule at first and then I got

$$D\left(\frac1{1+e^{-x}}\right)=\frac{ 1\cdot D(1+e^{-x})-(1+e^{-x})\cdot D(1)}{ (1+e^{-x})^2 }.$$

We know that with linearity of differentiation the numerator becomes

$D(e^{-x})+D(1)= -e^{-x}.$

So we should get

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

but that is a sign error of according to wolfram alpha.

$\endgroup$
1
  • 2
    $\begingroup$ oops I think i applied quotient rule wrong way Im checking it now $\endgroup$
    – Late347
    Feb 12 '19 at 1:47
1
$\begingroup$

You are quoting the quotient rule incorrectly. It says $$D\left(\frac {f(x)}{g(x)}\right)=\frac {f'(x)g(x)-g'(x)f(x)}{(g(x))^2}$$ You should have $$\frac{ (1+e^{-x})*D(1) -1*D(1+e^{-x})}{ (1+e^{-x})^2 }$$ which is just the negative of your expression and explains the sign error.

$\endgroup$
1
  • $\begingroup$ does the answer remain the same if you expand the original expression with (e^x) I was wondering about that because I just recognized that the original f(x) = sigmoid function and it is sometimes given in the form of f(x) = e^x/ (1+e^x) $\endgroup$
    – Late347
    Feb 12 '19 at 2:16
1
$\begingroup$

Recall that $\left(\dfrac{u}v\right)'=\dfrac{vu'-uv'}{v^2}.$

So applying quotient rule will give you $$D\left(\frac1{1+e^{-x}}\right)=\frac{ (1+e^{-x})\cdot D(1)-1\cdot D(1+e^{-x}) }{ (1+e^{-x})^2 }=\frac{0-1\cdot (-e^{-x}) }{ (1+e^{-x})^2 }=\frac{e^{-x}}{ (1+e^{-x})^2 }.$$

$\endgroup$
1
$\begingroup$

How about using the power rule and the chain rule?

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

$\endgroup$
1
$\begingroup$

Yes, so as they said you have two different formulas. You have: $\left(\dfrac{u}v\right)'=\dfrac{vu'-uv'}{v^2}.$

and: $$D\left(\frac {f(x)}{g(x)}\right)=\frac {f'(x)g(x)-g'(x)f(x)}{(g(x))^2}$$

From this, you will get: $$\frac{ (1+e^{-x})\cdot D(1)-1\cdot D(1+e^{-x}) }{ (1+e^{-x})^2 }=\frac{0-1\cdot (-e^{-x}) }{ (1+e^{-x})^2 }=\frac{e^{-x}}{ (1+e^{-x})^2 }.$$

Just remember those two different ways to write it and figure out which one you like more. From there it's just those simple steps! Also make sure you understand the way to get this answer. Really once you put everything together, it's fairly simple to compute the rest of it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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