Skip to content
Tutorials Center
My learning

Topics

Lesson 25 of 46 ยท Continuous Models with ODEs

Chapter 5 review: continuous models with ODEs

Review exponential, logistic, SIR and predator-prey models and Euler and RK4 solvers with a one-page summary, a recap table and a ten-question quiz.

You have now met the main ways to model smooth change. Before moving to optimization, pause and put the pieces together. This page gives you the chapter on one poster, a table of every model and its key facts, a short experiment on solver accuracy, and a long quiz.

Four cards summarising exponential, logistic, systems and numerical solver facts.
Chapter 5 on one page: four model families and the checks that go with them.

Recap table

Model Equation Behaviour Key facts
Exponential dy/dt = kยทy grows or decays without limit half-life is ln 2 divided by the size of k
Newton cooling dT/dt = โˆ’k(T โˆ’ T_room) approaches room temperature gap decays exponentially
Logistic dN/dt = rN(1 โˆ’ N/K) S-curve to K fastest growth at K/2
Constant harvest rN(1 โˆ’ N/K) โˆ’ H two equilibria, or none H_max = rK/4
SIR Sโ€ฒ = โˆ’ฮฒSI, Iโ€ฒ = ฮฒSI โˆ’ ฮณI, Rโ€ฒ = ฮณI one epidemic wave Rโ‚€ = ฮฒ/ฮณ, peak at S = 1/Rโ‚€
Lotka-Volterra xโ€ฒ = ax โˆ’ bxy, yโ€ฒ = โˆ’cy + dxy closed cycles equilibrium (c/d, a/b)

The workflow in four questions

  1. What changes, and what pushes it? Name the state variables and write "rate of change = inflow โˆ’ outflow".
  2. Where does it stop? Set the rates to zero to find equilibria, and use a phase line or the sign of the slope to judge stability.
  3. How do I solve it? A formula if one exists; otherwise RK4 or solve_ivp.
  4. Can I trust the answer? Halve the step and compare. Check a conserved quantity or a known limit such as the peak formula.

Try it

The experiment below measures the observed order of Euler and RK4 on the decay equation. You will see how fast each error shrinks when h is halved.

Python Observed order of Euler and RK4

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The ratios in the last column should be close to 2 for Euler and close to 16 for RK4: first order and fourth order made visible.

Python Which equilibrium is stable?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check ยท 10 questions

of 10 answered You scored / 10 ยท perfect!

  1. 1. A substance decays with k = -0.2 per hour. Its half-life is about:

    Half-life = ln(2) / 0.2 = 0.693 / 0.2 = 3.47 hours.
  2. 2. Coffee at 90 degrees C is in a 20 degrees C room. Which description of dT/dt is right?

    Newton's law of cooling says the rate is proportional to the temperature difference.
  3. 3. For the logistic equation, the population grows fastest when N equals:

    The growth rate rN(1 - N/K) is a parabola with its maximum at K/2.
  4. 4. With r = 0.4 and K = 50, the maximum sustainable constant harvest is:

    H_max = rK/4 = 0.4 * 50 / 4 = 5.
  5. 5. In SIR, an epidemic can start only if:

    dI/dt = (beta S - gamma) I > 0 requires beta S > gamma.
  6. 6. At the peak of an SIR epidemic, S is equal to:

    dI/dt = 0 when beta S = gamma, i.e. S = gamma/beta = 1/R0.
  7. 7. What does halving the step size do to the error of Euler's method?

    Euler's method is first order.
  8. 8. Lotka-Volterra solutions in the phase plane are:

    The conserved quantity V forces solutions onto closed curves around (c/d, a/b).
  9. 9. A harvest quota above rK/4 will:

    There is no equilibrium, so the growth rate is negative for all N.
  10. 10. Why is an Euler phase portrait of predator-prey a poor illustration of the real system?

    The numerical error accumulates and the computed loop spirals out, so the conserved quantity is not preserved.

Summary

  • Rates in, equations out: ODEs turn "what pushes the change" into a model.
  • Equilibria and stability come from the sign of the rate; closed forms exist only for simple models.
  • Euler is first order, RK4 fourth order; always test a solver on a case you can check.
  • Rโ‚€ = ฮฒ/ฮณ, H_max = rK/4 and (c/d, a/b) are the three numbers to remember.

Next: Chapter 6 overview: optimization models