Physics 212, 2019: Lecture 10
Back to the main Teaching page.
Back to Physics 212, 2019: Computational Modeling.
In this lecture, we will introduce models that involved coupled, nonlinear ordinary differential equations, as well as methods for solving them.
The first model we will consider is the Malthusian growth with carrying capacity -- where a population grows nearly exponentially fast, before it reaches the maximum population size that can be supported by the environment, , where is known as the carrying capacity. During the previous lecture and the lab, you were supposed to solve the corresponding ODE numerically -- and you will have noticed how the growth starts quickly, and then saturates.
Our second model that we will consider is the predator-prey model of population growth. You can read a lot about such generic systems, including their history, here. Briefly, we consider a prey animal species , which grows exponentially, but at the same time it's eaten by the predator species, denoted by . The dynamics of the prey is , where the second term denotes the capture of the prey. Indeed, the more prey animals there are, the easier it is to capture them, and the more predators there are, the more prey they will capture, resulting in the bilinear form . At the same time, when the predators eat, they have enough food to procreate -- but usually killing one prey only produces fewer than one predators. Further, predators also die a natural death. As a result, , where . This is an interesting dynamical system that exhibits oscillations -- number of preys goes up, they become abundant, this leads to the growth of the number of predators. Predators start eating prey, and collapse their number; then there's an insufficient number of prey to support the predator population, and the latter collapses as well. The whole cycle restarts with the renewed growth of prey at that point.
Runge-Kutta 2 integration
Your work
- Problem 1
- Use a different differential equation from those provided to show that Runge-Kutta 2 has error , and the scaling of the error is not a scaling due to the equation being solved, but largely due to the methods used to solve it. Do this in a Jupyter notebook.
Scripts for this Lecture
- GrowthFunctions -- module defining different growth functions.
- Integrators -- module defining different integrators (Euler and Runge-Kutta, which we will use during the next lecture).
- Module 2 -- catch-all scripts I used during the class.
- Module 2 as a notebook -- integration as a notebook.