Table of contents
Ordinary Differential Equations
Most physical phenomena are ultimately described by a relationship between changing quantities, resulting in differential equations. If such an equation only contains one independent variable (such as time) and hence only total derivatives (and no partial derivatives) we classify it as an ordinary differential equation (ODE). An ODE of order
The dependent variable
Using ODE integration algorithms (integrators) we can solve linear and non-linear ODEs of any order numerically. The basic idea is to start with the initial conditions and then propagate
We will first study the simplest integrator, the Euler algorithm, and then look at a more robust class of integrators, the Runge-Kutta schemes.
Introductory example: The bouncing ball
We will introduce the basic ideas for solving ODEs by looking at a very simple physical example: the bouncing ball with Newton’s equations of motion
where
The forward Euler scheme for any first order ODE
is
In order to solve the original 2nd order equation of motion we make use of the fact that one
Solve each of the first order ODEs with the Euler algorithm:
In class we developed a simple simulation for free fall and for the bouncing ball.
- bounce_ball_numpy.ipynb: simulation and graphing with matplotlib
Resources
- Computational Modelling: Chapter 2
- Computational Physics: Chapter 9
- Weisstein, Eric W. “Ordinary Differential Equation.” From MathWorld — A Wolfram Web Resource.
- Numerical Recipes in C, WH Press, SA Teukolsky, WT Vetterling, BP Flannery. 2nd ed, 2002. Cambridge University Press. Chapter 16.
Footnotes
Solutions to ODEs can also be restricted by boundary conditions (values of the solution on the domain boundary) but this leads to difficult Eigenvalue problems and will not be considered in this lesson. ↩
The boundary condition at the floor is that the ball bounces back elastically, i.e., the velocity is reversed on collision. ↩