How to solve the ODE for population growth

168 Views Asked by At

$$\frac{dN}{dt} = bN^2 - dN , \quad\ N(0) = N_0$$

I am trying to find the solution to this for hours, but I just can't get it to work. For the seperation of variables, I keep getting

$$\int\frac{-1}{dN}.dN + \int\frac{b}{bdN-d^2}.dN = \int dt $$.

But past that I can't factor out N to produce a final equation as a solution: N(t) = ....

Some help would be greatly appreciated :)

edit: Regarding a solution, I end up with:

$$-ln(dN) + ln(dbN-d^2)^b=t+c $$

2

There are 2 best solutions below

5
On BEST ANSWER

Assuming $d$ is a constant, the letter $d$ is perhaps not the best choice, as one tends to confuse $dN$ (i.e. $d$ times $N$) with $\frac{dN}{dt}$ (derivative of $N$ with respect to $t$).

$\frac{dN}{dt} = bN^2 - dN , \quad\ N(0) = N_0$

Apart from that, I seem to get a different equation when I separate variables.
(Or, rather, I simplify in a different way.)

$\frac{dN}{bN^2 - dN} = dt$, thus $\int\frac{dN}{bN^2 - dN}=\int dt$,
and from here $-\frac1d\int\frac{dN}N +\frac bd\int\frac{dN}{bN - d}=\int dt$ and
$-\frac1d\int\frac{dN}N +\frac 1d\int\frac{dN}{N - \frac db}=\int dt$, so
$-\int\frac{dN}N +\int\frac{dN}{N - \frac db}=d\int dt$.
We get $-\ln|N|+\ln|N - \frac db|=dt+C$, hence
$\ln|\frac{N - \frac db}N|=dt+C$, and
$|\frac{N - \frac db}N|=e^{dt+C}=e^{dt}e^C$, giving us
$\frac{N - \frac db}N=e^{dt}K$, where $K=\pm e^C$.
The latter is easy to solve for $N$ algebraically.
$N - \frac db=Ne^{dt}K$, and
$N -Ne^{dt}K= \frac db$, so $N(1 -e^{dt}K)= \frac db$, thus
$N= \frac d{b(1 -e^{dt}K)}$, general solution.

When $t=0$ we get $N_0= \frac d{b(1-K)}$, thus
$1-K= \frac d{bN_0}$, so $K=1-\frac d{bN_0}$.

Edit. Answering a follow up question in the comment below, this solution may become unbounded at a finite time, say time $T$. This could happen if the denominator becomes $0$ for $t=T$, that is $1-e^{dT}K=0$. Solving for $T$ we get $\frac1K=e^{dT}$ so $\ln(\frac1K)=-\ln(K)=dT$, and $T=\frac{-\ln(K)}d=\frac{\ln(\frac1K)}d$. Since we want $T>0$, the latter quantity may be positive either when (a) $0<K<1$ and $d>0$, or when (b) $K>1$ and $d<0$. (I don't know the context to try to determine which of the two options (a) or (b) might be more feasible than the other, perhaps (a), if $d$ is not supposed to be negative, but perhaps each of (a) and (b) is valid.)

Formally, I am supposed to write the answer without using $K$ (though it is oK), but in terms of the original parameters $b,d,N_0$.

Since $K=1-\frac d{bN_0}=\frac{bN_0-d}{bN_0}$, we obtain
$N=N(t)=\frac d{b(1 -e^{dt}\frac{bN_0-d}{bN_0})}= \frac{dN_0}{bN_0 -e^{dt}(bN_0-d)}=\frac{dN_0}{bN_0(1-e^{dt})+de^{dt}}$.

Then there may be some finite time $T$ (i.e. $0<T<\infty$) such that $\lim_{t\to T^-}N(t)=\infty$, this would happen when the denominator equals $0$, i.e. $bN_0 -e^{dT}(bN_0-d)=0$. This was already solved (but in terms of $K$), so again, $e^{dT}=\frac1K=\frac{bN_0}{bN_0-d}$, and $T=(\ln\frac{bN_0}{bN_0-d})/d=-(\ln\frac{bN_0-d}{bN_0})/d$ (whichever expression is more appropriate to work with).

2
On

Re-write the ODE as $$N^{-2}\frac{dN}{dt}+\frac{d}{N}=b.$$ Let $y=1/N$, then we get $$-\frac{dy}{dt}+dy=b$$, the integrating factor id $I=e^{dt}$. Next the solution of ODE is $$y=e^{-dt}\int b e^{dt} dt+C e^{=dt}= \frac{b}{d}+C e^{-dt} \Rightarrow N^2=\frac{1}{b/d+Ce^{-dt}},$$ where $$C=\frac{1}{N_0^2}-\frac{b}{d}.$$