Spread of infectious disease
The SIR model solved with SciPy and a hand-written RK4, with stability read off symbolically in SymPy.
The SIR (susceptible, infectious, recovered) model is derived analytically and its coupled differential equations are solved both with SciPy’s integrators and with a manual fourth-order Runge–Kutta implementation. The stability of the disease-free and endemic states is determined symbolically with SymPy, and the evolution of the disease through a population is visualized with Matplotlib.
Here is the infection rate, the recovery rate and the population size. The interactive note puts and on sliders.

In the same manner, a model for the spread of HIV infection inside the body is built and compared with publicly available data from an academic journal.
