Epidemic ODE — Solve an ODE numerically and check it
![]() | ![]() | ![]() | ![]() | App Exercises |
|---|
Model and Control Exercise 2 of 40. BYU class 2 · PDC class 2. 15 minutes.

Open the Epidemic ODE App
Learning Outcomes
- Simulate a set of ordinary differential equations and state what the solver needs (equations, initial conditions, time points).
- Check a numerical solution against a limiting case.
- Explain how the time step changes an Euler solution.
Book Chapter
Control of Biological Systems and Human Performance (Volume 19), Chapter 14, Estimating and Steering an Epidemic From Week-Old, Partial Counts. Read online · Chapter PDF · Lecture slides
Theory in Brief
In a closed SIR example, S, I and R are the susceptible, infectious and removed populations. The parameters describe the simulator’s disease scenario. Check the population balance before comparing trajectories.
$$\dot S=-\beta SI/N$$
$$\dot I=\beta SI/N-\gamma I$$
$$\dot R=\gamma I$$
$$S+I+R=N$$
$$y_{k+1}=y_k+\Delta t\,f(y_k)$$
Model to Controller
A compartment balance supplies the dynamics. Forecasting from measured counts also requires a model of what the instrument measures and when.
Exercise
Read (2 min). Review the model and identify which signals you will compare.
Predict (1 min). Predict whether a larger R₀ moves the peak earlier or later.
Run (8 min).
- Open the app and select the following cases in order.
- 1 · The uncontrolled wave and its two lags.
- 10 · R₀ = 4: out of reach of a reactive policy.
- Follow the case instructions, using the same measurement window for comparable trials.
- Record day and height of the peak in each case.
Explain (2 min). Which observation supports or changes your prediction? Which assumption or limit explains the gap between calculation and observation?
Generative AI Learning (2 min)
Verify the suggested claim using a second point on your trend or an independent calculation from the equations. Cite the signal, units and case that support your conclusion.
What to Turn In
Submit a screenshot of the relevant trend or scorecard and three sentences covering your prediction, the measured result with units, and the model's explanation. Course guidelines for AI use.
In the closed SIR model the three derivatives sum to zero. Plot the simulated infectious population rather than the delayed count when measuring its peak. Halving the Euler step gives a direct numerical convergence check.
Which part of the model connects the measured signal to the exercise?
A compartment balance supplies the dynamics. Forecasting from measured counts also requires a model of what the instrument measures and when.
How should the observations be interpreted?
In the closed SIR model the three derivatives sum to zero. Plot the simulated infectious population rather than the delayed count when measuring its peak. Halving the Euler step gives a direct numerical convergence check.
How could you check that a result is comparable across cases?
Use the same signal, units and reference point. When comparing integrated quantities, use the same interval.
Related
Python ODEINT · Python GEKKO · Quiz A · Step Test Simulation



