Solving the logistic equation $dx/dt=x(1-x)$
In Arnold's Ordinary Differential Equations, Arnold asks the reader to work out the solution to $$ \dot{x} = x(1-x) $$ and Arnold gives the derivation $$ t= \int {dx \over x(1-x)} = \ln(x/1-x), \hbox{ or } x={e^t \over 1+e^t} $$ Trying this out on my own, I take a partial fractions approach: If we assume $$ {1 \over x(1-x)} = {A \over x} + {B \over 1-x} $$ then $$ 1 = A(1-x) + Bx = (B-A)x+A $$ so $A=1$ and $B=1$. Hence $$ {1 \over x(1-x)} = {1 \over x} + {1 \over 1-x} $$ implying that $$ t=\int {dx \over x(1-x)} = \int {dx \over x} + \int {dx \over 1-x} = \ln(x(1-x)) $$ contrary to Arnold's claim. Additionally, if seems to me that if we then solve for x in terms of $t$, we do not obtain $$ x={e^t \over 1+e^t} $$ as we should for the ``known solution'' to the logistic curve. Can someone please explain what is going on, and where my or Arnold's solution goes wrong?
$\endgroup$ 02 Answers
$\begingroup$Let $\frac{dx}{dt} = x(1-x)$ be a nonlinear differential equation for $(t,x(t)) \in \mathbb{R}^{2}$. Observe that :
$\frac{1}{x(1-x)}dx = dt$
$\bigg(\frac{1}{x} + \frac{1}{1-x}\bigg)dx = dt$
By integrating two sides of the equation, we will get:
$\ln|x| - \ln|1-x| + C_{1} = t + C_{2}$
for $C_{1}$ and $C_{2}$ arbitrary constants
$\ln\bigg|\frac{x}{1-x}\bigg| = t + C$
Observe that by using $\exp(t)$ function on both sides of the equation, we have
$\frac{x}{1-x} = e^{t+C}$
By using straightforward algebra, we have
$x = (1 - x)e^{t+C}$
$x = e^{t+C} - x e^{t+C}$
$x + x e^{t+C} = e^{t+C}$
$x(1 + e^{t+C}) = e^{t+C}$
$x(t) = \frac{e^{t+C}}{1+e^{t+C}}$
By setting $e^{C} = x_{0}$, we will eventually get
$x(t) = \frac{x_{0}e^{t}}{1+x_{0}e^{t}}$
Since, the value of $x_{0}$ is arbitrary, one can say that the solution is in the form of $x(t) = \frac{e^{t}}{1+e^{t}}$
I believe you do a small miscalculation during your own integration. Try working out which part you do wrong. I hope this helps
$\endgroup$ 1 $\begingroup$Integrating $\frac{1}{1-x}$ you get minus the log rather than the log, because of the change of variable.
$\endgroup$ 1