Ordinary differential equations: Separable differential equations
Example 4: Logistic growth
The first-order ODE \[\frac{\dd y}{\dd t}=r\cdot y\cdot \left(1-\frac{y}{a}\right)\] where \(r\) and \(a\) are positive constants, can be rewritten in differential form: \[\frac{a}{y\,(y-a)}\,\dd y=-r\,\dd t\] Integrating the left- and right-hand side \[\int\frac{a}{y\, (y-a)}\,\dd y=-r \int \dd t\] is doable. The result of computing the integral on the right-hand side is \(-r\cdot t\). The integral on the left-hand side can be computed by partial fraction decomposition of the integrand: we can decompose the integrand (check this!) as \[\frac{a}{y\, (y-a)}=\frac{1}{y-a}-\frac{1}{y}\] Thus: \[\int\frac{a}{y\, (y-a)}\,\dd y = \ln|y-a|-\ln|y| + C=\ln\left|\frac{y-a}{y}\right|+ C\] Equality of the two integration results up to some constant leads after some algebraic manipulation to the following formula: \[\frac{y-a}{y}=-c\cdot e^{-r\cdot t}\] for some constant \(c\). Why is it useful to place a minus sign in the right-hand side becomes obvious when we isolate the variable \(y\): \[\begin{aligned} \frac{y-a}{y}=-c\cdot e^{-r\cdot t} &\implies 1-\frac{a}{y}=-c\cdot e^{-r\cdot t} \\ \\ &\implies \frac{a}{y} = 1+ c\cdot e^{-r\cdot t}\\ \\ &\implies y = \frac{a}{1+ c\cdot e^{-r\cdot t}}\end{aligned}\] We have now reached the classical formula for a logistic function.
The constant \(c\) is determined by the inital value: If \(y(0)=\alpha\) then \(\alpha=\dfrac{a}{1+c}\), that is, \(c\,\alpha = a-\alpha\) (check this!). Thus: \[\begin{aligned}y &= \frac{a}{1+c\cdot e^{-r\cdot t}}\\ \\ &= \frac{a\cdot \alpha }{\alpha+c\cdot \alpha\cdot e^{-r\cdot t}}\\ \\ &= \frac{a\cdot\alpha}{\alpha+(a-\alpha)e^{-r\cdot t}}\\ \\ &= \frac{a}{1+\left(\dfrac{a}{\alpha}-1\right)e^{-r\cdot t}}\end{aligned}\]
In other words, we have proven the following theorem.
The general solution of the initial value problem \[\frac{\dd y}{\dd t}=r\cdot y\cdot \left(1-\frac{y}{a}\right),\quad y(0)=\alpha\] where \(r\) and \(a\) are positive constants and \(-\infty<\alpha<\infty\), is \[y(t) = \frac{a}{1+\left(\dfrac{a}{\alpha}-1\right) e^{-r\, t}}\]