SIR Epidemic Model Dynamic Simulation by Juan Carlos Ponce Campuzano

SIR Epidemic Model Dynamic Simulation by Juan Carlos Ponce Campuzano
Loading the math board and drawing, please wait…
2019-09-16 13:19
In collections SCIE1000
① This GeoGebra example dynamically simulates the classic SIR epidemic model, showing how the numbers of Susceptible (S), Infected (I), and Recovered (R) individuals evolve over time. ② The core mathematical concept is the numerical solution of a system of ordinary differential equations (S'=-βSI/N, I'=βSI/N-γI, R'=γI), involving derivatives, differential equations, and the influence of parameters on system dynamics. ③ Construction highlights: uses NSolveODE to numerically solve the ODE system, SelectedIndex and Element to extract solution components, Sequence and If to generate curves, Textfield and buttons (button1, button2, button3) for interactive parameter adjustment (e.g., transmission rate a, recovery rate b, initial infected I_0), and Ray, Length to display proportions and dynamic markers. ④ Suitable for high school to university courses in mathematical modeling, differential equations, or biomathematics, as well as public health education to intuitively understand epidemic spread and intervention effects.

GeoGebra Commands & Parameters

  1. SelectedIndex(LN) → index
  2. Element(LN, index) → N
  3. NSolveODE({S', I', R'}, 0, {S_0, I_0, R_0}, 13) → sol_1, sol_2, sol_3
  4. Length(sol_1) → len
  5. Ray((x(A), 0), A) → r
  6. If(N ≟ 100, 1, If[N ≟ 10000, 10, 100]) → ratio
  7. Sequence((RandomUniform[0, p], RandomUniform[0, p]), i, 1, N / ratio) → pSr
  8. Sequence((RandomUniform[0, p], RandomUniform[0, p]), i, 1, N / ratio) → pIr
  9. Sequence((RandomUniform[0, p], RandomUniform[0, p]), i, 1, N / ratio) → pRr
  10. Sequence(Vector[(0, 0), Element[pSr, i]], i, 1, N / ratio) → L_1
  11. Sequence(Vector[(0, 0), Element[pIr, i]], i, 1, N / ratio) → L_2
  12. Sequence(Vector[(0, 0), Element[pRr, i]], i, 1, N / ratio) → L_3
  13. Sequence(Translate[pic1, Vector[Element[L_1, i]]], i, 1, y1 / ratio) → L_4
  14. Sequence(Translate[pic2, Vector[Element[L_2, i]]], i, 1, y2 / ratio) → L_5
  15. Sequence(Translate[pic3, Vector[Element[L_3, i]]], i, 1, y3 / ratio) → L_6
  16. Textfield(a) → InputBox1
  17. Textfield(b) → InputBox2
  18. Textfield(I_0) → InputBox3
  19. If(N ≟ 100, 100, If[N ≟ 10000, 10000, 100000]) → maxval