1
$\begingroup$

How to solve the following equation?

$$\frac{\mathrm{d}\, f }{\mathrm{d}x} = f(x) \left(1-f(x)\right)$$

(I've studied differential equations as an undergraduate some years ago but right now I don't know where to start with this equation.)

EDIT 1: equation corrected.

Solution:

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

$\endgroup$
  • $\begingroup$ What is the RHS? A number? A primitive? $\endgroup$ – Did May 19 '14 at 17:17
  • $\begingroup$ It's a Bernoulli equation. $\endgroup$ – Git Gud May 19 '14 at 17:29
  • $\begingroup$ This has been asked many times before. Search this site for "logistic equation". (By the way, you can also try setting $y(x)=1/f(x)$.) $\endgroup$ – Hans Lundmark May 20 '14 at 6:30
2
$\begingroup$

Try separation of variables;

$$\int\frac{dy}{y(1-y)}dy = \int dx$$

$$ln(y) - ln(1-y) = x + const$$

$$y = \frac{e^x}{C+e^x}$$

$\endgroup$
  • 2
    $\begingroup$ That, and $y=0$. $\endgroup$ – Did May 19 '14 at 20:04
  • 1
    $\begingroup$ To do this right, one should be a bit more careful. What if $y<0$ or $y>1$? $\endgroup$ – Hans Lundmark May 20 '14 at 6:32
  • $\begingroup$ Yes -- these are good points. This is an autonomous nonlinear ODE. The constant solution $y = 0$ is an unstable critical point. The asymptotic behavior depends on the initial condition, with solutions attracted to $y = 1$, if $y(0) > 0$, and blowing up if $y(0) < 0$. $\endgroup$ – RRL May 20 '14 at 13:45
2
$\begingroup$

It is a separable equation that one can write:

$$ \frac{f'(x)}{f(x)(1-f(x))}=1\\ f'(x)\left(\frac{1}{f(x)}+\frac{1}{1-f(x)}\right)=1 $$

The left hand side is a derivative w.r.t. $x$:

$$((\ln(f(x))-\ln(1-f(x)))'=1\\ \left(\ln\left(\frac{f(x)}{1-f(x)}\right)\right)'=1$$

Integrate both sides.

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