{ "cells": [ { "cell_type": "markdown", "id": "greek-burton", "metadata": {}, "source": [ "# Differential and difference forms\n", "\n", "Difference equation model:\n", "\n", "$$\n", "\\frac{1}{N}\\frac{\\Delta N}{\\Delta t} = r + sN\n", "$$\n", "\n", "Differential equation model:\n", "\n", "$$\n", "\\frac{1}{N}\\frac{dN}{dt} = r + sN\n", "$$\n", "\n", "Recall that the delta sign ($\\Delta$) means *change in* or the *difference*. Compare the difference equation with the differential form, which uses the terminology $dN$ and $dt$. These represent infinitesimally small time steps, corresponding to our common-sense perception of time as divisible ever more finely without limit. In differential equations populations change smoothly rather than in finite steps—growth approximating that of organisms that can reproduce at any time, such as bacterial or human populations.\n", "\n", "It turns out that differential equations are harder for computers to solve than difference equations. Computers cannot make infinitely fine time steps, but have to approximate by using very small time steps instead. On the other hand, difference equations can be harder to solve mathematically." ] }, { "cell_type": "code", "execution_count": 1, "id": "human-corporation", "metadata": { "tags": [ "output_scroll" ] }, "outputs": [ { "data": { "text/html": [ "
time | size | |
---|---|---|
<dbl> | <dbl> | |
1 | 1 | 1.000000 |
2 | 2 | 1.999000 |
3 | 3 | 3.994004 |
4 | 4 | 7.972056 |
5 | 5 | 15.880558 |
6 | 6 | 31.508924 |
7 | 7 | 62.025036 |
8 | 8 | 120.202967 |
9 | 9 | 225.957181 |
10 | 10 | 400.857715 |
11 | 11 | 641.028522 |
12 | 12 | 871.139478 |
13 | 13 | 983.394966 |
14 | 14 | 999.724273 |
15 | 15 | 999.999924 |
16 | 16 | 1000.000000 |
17 | 17 | 1000.000000 |
18 | 18 | 1000.000000 |
19 | 19 | 1000.000000 |
20 | 20 | 1000.000000 |
21 | 21 | 1000.000000 |
22 | 22 | 1000.000000 |