Chapter 2

Free fall and ordinary differential equations

Many problems in physics and engineering are expressed in the form of either ordinary or partial differential equations (denoted ODEs, or PDEs). To a large part, this seems to be due to the fact that mathematical descriptions of problems of interest, especially the complex ones, simplify significantly when we consider only infinitesimal changes of the variables involved. The result is the emergence of differential equations of one form or another. Take Newton’s second law F = ma, for example. Since the acceleration a is the second derivative of position with respect to time, Newtonian mechanics always involves differential equations, be it free fall on earth, or star motion in the sky. Another example is wave motion such as a vibrating string. To describe waves, we must treat the space and time variables independently. This leads to wave equations in the form of PDEs. Therefore, solving differential equations is a major undertaking in scientific computing.

Some ODEs, like those for free fall, yield analytic solutions in closed-form, known functions. Others do not, so numerical solutions are needed. Because ODEs are among the single, most common class of mathematical relations used across science and engineering including this book, we will devote this chapter to the discussion of methods of numerical solutions suitable to the problems we study (PDEs will be discussed separately starting from Chapter 6). The ODE solvers developed ...

Get Computational Modeling and Visualization of Physical Systems with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.