Simulating an ordinary differential equation with SciPy
Ordinary Differential Equations (ODEs) describe the evolution of a system subject to internal and external dynamics. Specifically, an ODE links a quantity depending on a single independent variable (time, for example) to its derivatives. In addition, the system can be under the influence of external factors. A first-order ODE can typically be written as:
More generally, an -th order ODE involves successive derivatives of until the order . The ODE is said to be linear or nonlinear depending on whether is linear in or not.
ODEs naturally appear when the rate of change of a quantity depends on its value. Therefore, ODEs are found in many scientific disciplines such as mechanics (evolution of a body subject to dynamic forces), chemistry (concentration of reacting products), biology (spread of an epidemic), ecology (growth of a population), economics, and finance, among others.
Whereas simple ODEs can be solved analytically, many ODEs...