| Download
Lecture slides for UCLA LS 30B, Spring 2020
Project: LS 30 Materials
Path: Public worksheets/Lecture slides - Spring 2020 / Mini-Lecture 5-2 - Discrete-time models of dynamical systems.ipynb
Views: 14466License: GPL3
Image: ubuntu2004
Kernel: SageMath 9.3
All of our models so far (differential equations) have assumed that time () is continuous.
This was why we needed to use Euler's method, with a “small” , to approximate solutions to our differential equations. And this was always just an approximation: we can make it more accurate by using a smaller , but we can never get the exact solution using Euler's method.
But sometimes, it makes sense to think of time as discrete. This means that the variable can only be a whole number.
This makes sense, for example, for models of populations that have a distinct mating season, or a very fixed life cycle that repeats each year (such as many insects).
Discrete time models
(Also known as difference equations)
In [1]:
In [2]:
10
In [3]:
20
In [4]:
40
In [5]:
80
In [6]:
160
In [7]:
[5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120]
In [8]:
In [9]:
In [10]:
0.960000000000000
In [11]:
0.153600000000000
In [12]:
0.520028160000000
In [13]:
0.998395491228058
In [14]:
0.00640773729417265
In [15]:
In [16]:
In [17]:
In [18]:
In [19]:
In [20]: