0
$\begingroup$

Using the chain rule I am led to believe that the following can be differentiated nicely using the chain rule:

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

It has been 3 years since I have used calculus though. If someone could show me how it's done and what $u$ and $v$ are then I would really appreciate it.

Thanks very much.

  • 0
    there is no $x$ in your expression. I assumed your $z$ is meant to be an $x$ in my solution.2011-04-07
  • 0
    Sorry guys, f(x) was meant to be f(z) so I want to differentiate wrt z.. not x! Sorry for confusion2011-04-07
  • 0
    If you write $\frac{1}{1+e^{-x}} = (1+e^{-x})^{-1} = u^{-1}$ then you can apply the chain rule.2011-04-07
  • 0
    No it's not complex, it's real. Changing to x not to stop that confusion... Thanks.2011-04-07
  • 0
    guy Yes, I realised it must have been real after I wrote that comment and deleted it afterwards. I hope the answer I gave below helped.2011-04-07

2 Answers 2

3

guy. You can calculate the derivative as follows:

Let $u = 1+e^{-x}$. Note that $u'(x) = -e^{-x}$. Then $f(x) = 1/u(x)$ and $$ f'(x) = -\frac{1}{u^2(x)}\cdot u'(x) = -\frac{1}{(1+e^{-x})^2}\cdot(-e^{−x}) = \frac{e^{−x}}{(1+e^{-x})^2}. $$ Note that $$ f'(x) = \frac{e^{−x}}{(1+e^{-x})^2} = f(x)\frac{e^{−x}}{(1+e^{-x})} = f(x)\frac{1+e^{−x}-1}{(1+e^{-x})} = f(x)\Big(1-\frac{1}{(1+e^{-x})}\Big), $$ so $$ f'(x) = f(x)(1-f(x)). $$ I hope that helps.

  • 0
    Hi Glen, I remember doing something like that in the past, thanks. However, the answer I was hoping someone would get is $f(x)(1-f(x))$ because I have been working on something an it says that $f(x)$ differentiates nicely to $f(x)(1-f(x))$. Any ideas how? I can't see it yet :S.2011-04-07
  • 0
    By the way.. LaTeX in this comment isn't viewing properly with Chrome (is with Firefox) so hopefully you can read it.2011-04-07
  • 0
    @computing-guy sure, it is a rearrangement. I'll edit the answer.2011-04-07
  • 0
    @Glen.. fantastic. Thank you so much. Sorry if it was a trivial question. I've been in computing for a few years now so I'm a but rusty with some of the mathematics!2011-04-07
  • 0
    @vivid-colours Absolutely no problem.2011-04-07
1

Let $u(z)=1+e^{-z}$. Then, $f(u)=1/u$

  • 0
    Hey picakhu, I made a mistake in my post. Please see edit.2011-04-07