Solving differential equations and systems with parameters
In the following section, we will see how to solve differential equations and systems with parameters.
Getting ready
We will need to have the package and install the prerequisites spicy.integrate
.
How to do it...
No book on scientific computing is complete without revisiting Lorenz attractors. SciPy excels both at the computation of solutions and presentation of ideas based on systems of differential equations, and we will show how and why in this recipe:
- Consider a two-dimensional fluid cell that is heated from underneath and cooled from above, much like what occurs with the Earth's atmosphere. This creates convection which can be modeled by a single partial differential equation, for which a decent approximation has the form of the following system of ordinary differential equations:

- The variable x represents the rate of convective overturning. The variables y and z stand for the horizontal and vertical temperature variations, respectively...