pop-dyn with fdm
Population dynamics solution using finite difference method is illustrated in brief here.
fdm
With the definition of the derivate of a smooth function $u$ ata point $x \in \mathbb{R}$
$$\tag{1} u' = \lim_{h \rightarrow 0} \frac{u(x + h) - u(x)}{h}, $$
a differential equation
$$\tag{2} u' = \frac{du}{dx} $$
can be solved numerically
$$\tag{3} u(x + h) = u(x) + h u'(x) + O(h^2) $$
using finite difference method (FDM) with the error of the approximation is proportional to $h^2$ 1.
num-eqns
Using Eqns (3) and (26b52.5) following equation can be obtained
$$\tag{4} N(t + dt) = N(t) + r N(t) \left( 1 - \frac{N(t)}{K} \right) \Delta t, $$
where $r$ and $K$ stand for not growth rate and carrying capacity, respectively.
result
Result from Eqn (4) is as follows.
Figure 1. Population dynamics for two different set of parameters.
Results in Figure 1 are obrtained using $\Delta t = 1$, $t_{\rm beg} = 0$, and $t_{\rm end} = 120$. For Data 1 other parameters are $N_0 = 1000$, $K = 4500$, and $r = 0.1$, while for Data 2 the parameters are $N_0 = 8000$, $K = 3000$, and $r = 0.05$.
It shows that for Data 1 the growth is positive until it reaching carrying capacity $K$, while for Data 2 the growth is negative until it reaching carrying capacity $K$. Oscillation near the value of carrying capacity is not observed.
refs
Pascal Frey, Maya De Buhan, “The finite difference method”, MA691 The numerical simulation of complex PDE problems , Universidad de Chile, Ch 6, p 78-92, 2008, url https://www.ljll.fr/~frey/cours/UdC/ma691/ma691_ch6.pdf [20260221]. ↩︎