7
$\begingroup$

The sigmoid function $f(x) = \frac{1}{1+e^{-x}}$ has the property that $$f'(x) = f(x)(1-f(x))~~~ and ~~~f(0) = \frac 12$$

My question: is $f$ the unique function from $\mathbb R$ to $(0,1)$, perhaps up to some kind of scaling, that satisfies $f' = f(1-f)$?

I don't have much experience with differential equations so a nonlinear one like this is beyond anything I've done before.

In case it helps, my motivation for this is that this property makes the log likelihood a lot easier in a logistic regression, and I'm wondering if assuming that the inverse link function satisfies this property is equivalent to just taking it to be $f$.

$\endgroup$
  • 1
    $\begingroup$ Consider looking up three Picard-Lindelof theorem. $\endgroup$ – Michael McGovern Feb 2 '18 at 20:12
  • 1
    $\begingroup$ It's Bernoulli's equation. The general solution is $\frac{1}{1+C e^{-x}}$ for some constant $C$ $\endgroup$ – Yuriy S Feb 2 '18 at 20:13
  • 1
    $\begingroup$ You can find plenty of information about this if you search for “logistic equation”. Here, for example: math.stackexchange.com/questions/78560/… $\endgroup$ – Hans Lundmark Feb 3 '18 at 8:45
  • $\begingroup$ @HansLundmark thanks for the link, that's very helpful. I now remember learning that years ago but didn't recognize it here $\endgroup$ – alfalfa Feb 5 '18 at 14:42
4
$\begingroup$

Note that since $f(0)=1/2$ then, $f\not\equiv 1$ and , $f\not\equiv 0$ hence a solution cannot an equilibrium $$f'=f(1-f)\Longleftrightarrow\frac{f'}{f} +\frac{f'}{1-f} =1\Longleftrightarrow \ln (|f|)- \ln(|1-f|) =x+c$$

But, $f(x)\in (0,1)$ we obtain $$ \ln (f)- \ln(1-f) =x+c\Longleftrightarrow \frac{f}{1-f} =ke^x \Longleftrightarrow f(x) =1-\frac{1}{1+ ke^x}$$

I am sure you can the $k$ by yourself.

$\endgroup$
  • 1
    $\begingroup$ There's also the exceptional solution $f \equiv 1$ which isn't covered by this (also $f \equiv 0$ doesn't work with the formal calculation but it happens to match the solution where $k = 0$). $\endgroup$ – Daniel Schepler Feb 2 '18 at 21:50
  • $\begingroup$ @DanielSchepler Yes I understand you meant the equilibria right? but they don't satisfy the initial condition $f(0)= 1/2$ $\endgroup$ – Guy Fsone Feb 2 '18 at 21:52
  • $\begingroup$ Another way to put the first line is that the conclusion can only be inferred on intervals where $f \neq 0$ and $f \neq 1$. (and note of the domain contained two disjoint intervals, the constant $c$ could be different on each interval!) The given problem is that the entire real line is such an interval; but in general this type of argument has to continue on to analyze the transitions between such intervals. $\endgroup$ – user14972 Feb 2 '18 at 22:03
  • $\begingroup$ @GuyFsone: Consider breaking up the chain of implications across multiple lines (e.g. using an align environment). When it's too long like that you run the risk of line breaks being inserted in unfortunate places. For example, on my screen, your second chain of reasoning ends with the conclusion "$f(x) = 1$". $\endgroup$ – user14972 Feb 2 '18 at 22:06
  • $\begingroup$ @Hurkyl I know that synthax of breaking up the lines nut I just want to give quick answer. you edit it I will accept your edit if you want $\endgroup$ – Guy Fsone Feb 2 '18 at 22:13
4
$\begingroup$

writing your equation in the form $$-\frac{\frac{df(x)}{dx}}{(f(x)-1)(f(x)}=1$$ and by integrating $$-\int \frac{\frac{df(x)}{dx}}{(f(x)-1)f(x)}dx=\int 1dx$$ doing this we obtain $$-\log(-f(x)+1)+\log(f(x))=x+C$$

$\endgroup$
  • $\begingroup$ It's worth explicitly noting that this argument is making use of the $f(x) \in (0,1)$ hypothesis, since it implicitly relies on the fact that the first equation is valid for all $x$. $\endgroup$ – user14972 Feb 2 '18 at 22:00

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.