SIR Epidemic Model Dynamic Simulation by Juan Carlos Ponce Campuzano
Loading the math board and drawing, please wait…
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
SelectedIndex(LN) → indexElement(LN, index) → NNSolveODE({S', I', R'}, 0, {S_0, I_0, R_0}, 13) → sol_1, sol_2, sol_3Length(sol_1) → lenRay((x(A), 0), A) → rIf(N ≟ 100, 1, If[N ≟ 10000, 10, 100]) → ratioSequence((RandomUniform[0, p], RandomUniform[0, p]), i, 1, N / ratio) → pSrSequence((RandomUniform[0, p], RandomUniform[0, p]), i, 1, N / ratio) → pIrSequence((RandomUniform[0, p], RandomUniform[0, p]), i, 1, N / ratio) → pRrSequence(Vector[(0, 0), Element[pSr, i]], i, 1, N / ratio) → L_1Sequence(Vector[(0, 0), Element[pIr, i]], i, 1, N / ratio) → L_2Sequence(Vector[(0, 0), Element[pRr, i]], i, 1, N / ratio) → L_3Sequence(Translate[pic1, Vector[Element[L_1, i]]], i, 1, y1 / ratio) → L_4Sequence(Translate[pic2, Vector[Element[L_2, i]]], i, 1, y2 / ratio) → L_5Sequence(Translate[pic3, Vector[Element[L_3, i]]], i, 1, y3 / ratio) → L_6Textfield(a) → InputBox1Textfield(b) → InputBox2Textfield(I_0) → InputBox3If(N ≟ 100, 100, If[N ≟ 10000, 10000, 100000]) → maxval