Case Study in Practice: Modeling Infectious Diseases with Differential Equations | 案例分析实战演练:用微分方程建模传染病

📚 Case Study in Practice: Modeling Infectious Diseases with Differential Equations | 案例分析实战演练:用微分方程建模传染病

In Pre‑U mathematics, real‑world modelling often requires translating a practical scenario into differential equations, solving them, and interpreting the results in context. This article presents a detailed case study on the SIR epidemiological model, guiding you through the entire mathematical pipeline from constructing assumptions and formulating the equations to extracting critical insights such as the basic reproduction number R₀. You will see how separable differential equations, equilibrium analysis, and parameter sensitivity combine to provide actionable public‑health recommendations.

在 Pre‑U 数学中,真实世界建模通常需要将实际场景转化为微分方程,求解并在具体情境中解释结果。本文通过一个关于 SIR 传染病模型的详细案例分析,带领你完整走一遍数学流程:从建立假设、构建方程组,到提取基本再生数 R₀ 等关键见解。你将看到可分离微分方程、平衡点分析和参数敏感性如何结合起来,为公共卫生决策提供有效建议。

1. Background and Problem Setting | 背景与问题设定

A novel influenza strain has emerged in a city of 100,000 inhabitants. Public health authorities need to predict the peak number of infections and the total number of people ultimately affected, as well as to evaluate whether immediate intervention measures such as vaccination or social distancing can prevent an epidemic. The timeline of interest is the first 120 days after the first detected case.

一种新型流感病毒在一个有 10 万居民的城市出现。公共卫生部门需要预测感染人数的峰值、最终受影响的总人数,并评估立即采取接种或社交距离等干预措施能否防止疫情暴发。关注的时间线是首例被检出后的 120 天内。

Your task as a mathematical analyst is to build a compartmental model based on ordinary differential equations, derive key quantities from the model, and produce a concise report summarizing the findings.

作为数学分析师,你的任务是建立一个基于常微分方程的仓室模型,从模型中推导关键量,并撰写一份简明报告总结发现。

2. Assumptions and Variables | 假设与变量

We adopt the classic SIR framework, dividing the total population N = 100,000 into three compartments: Susceptible S(t), Infected I(t), and Recovered/Removed R(t). The following modelling assumptions are made:

我们采用经典的 SIR 框架,将总人口 N = 100 000 划分为三个仓室:易感者 S(t)、感染者 I(t) 和康复/移除者 R(t)。提出以下建模假设:

  • The population is well mixed and homogeneous. Interactions are random and each susceptible individual has an equal probability of contacting any other individual. | 人群充分混合且同质。接触是随机的,每个易感者与其他任何个体接触的概率相等。

  • Recovered individuals acquire permanent immunity and do not return to the susceptible class during the study period. | 康复者获得永久免疫,在研究期间不会回到易感者群体。

  • The disease is transmitted at a rate proportional to the product of S and I. The transmission coefficient β (per capita contact rate multiplied by the probability of transmission per contact) is constant. | 疾病的传播速率与 S 和 I 的乘积成正比。传播系数 β(人均接触率乘以每次接触的传播概率)被视为常数。

  • Infected individuals recover at a constant per capita rate γ; thus 1/γ represents the average infectious period (in days). | 感染者以恒定的人均速率 γ 康复;因此 1/γ 表示平均传染期(以天计)。

  • Vital dynamics (births, deaths unrelated to the disease, immigration, emigration) are ignored because the epidemic duration is short (120 days) relative to the demographic timescale. | 忽略人口动力学(出生、与疾病无关的死亡、迁入、迁出),因为疫情持续时间(120 天)相对人口统计的时间尺度较短。

The state variables are:

状态变量如下:

S(t) Number of susceptible individuals at time t (days) | 时刻 t 的易感者人数(天)
I(t) Number of infectious individuals at time t | 时刻 t 的感染者人数
R(t) Number of recovered (and immune) individuals at time t | 时刻 t 的康复(且免疫)人数

The initial conditions at t = 0 (the day the first case is confirmed) are taken as: I(0) = 1, R(0) = 0, and S(0) = N − I(0) − R(0) = 99,999.

初始条件取 t = 0(首例确诊当天)为:I(0) = 1,R(0) = 0,S(0) = N − I(0) − R(0) = 99 999。

3. Formulation of the SIR Model | SIR 模型建立

Based on the assumptions, the rate of change of each compartment can be written as:

根据假设,每个仓室的变化率可写为:

dS/dt = –β S I / N

dI/dt = β S I / N – γ I

dR/dt = γ I

Note that the force of infection is β S I / N because the probability that a contact is with a susceptible is S/N, and each infected person makes β N contacts per unit time (on average). Thus the total number of new infections per unit time is (β N) × (S/N) × I = β S I / N, which reduces to β S I when the transmission coefficient is scaled appropriately. In many textbooks the equations appear as dS/dt = –β S I, with β containing the 1/N factor implicitly. We will use the version with explicit division by N for clarity when population size is fixed.

注意,感染力写为 β S I / N,因为与易感者发生一次接触的概率是 S/N,而每个感染者单位时间内平均发生 β N 次接触。因此单位时间新增感染数为 (β N) × (S/N) × I = β S I / N,当传播系数经过适当缩放时可简化为 β S I。许多教材中的 dS/dt = –β S I 隐含了 1/N 因子。为清晰起见,我们在总人口固定的情况下使用显式除以 N 的版本。

Summing the three equations gives d(S+I+R)/dt = 0, confirming that the total population N remains constant, consistent with the closed population assumption.

三式相加得 d(S+I+R)/dt = 0,确认总人口 N 保持恒定,与封闭人群假设一致。

4. Solving the Differential Equations | 求解微分方程

The system of nonlinear ODEs does not admit a closed‑form solution for S(t) and I(t) expressed in elementary functions. However, we can eliminate the time variable by dividing dI/dS:

该非线性常微分方程组没有用初等函数表示的闭式解。但我们可以通过求 dI/dS 消去时间变量:

dI/dS = (β S I / N – γ I) / (–β S I / N) = –1 + (γ N)/(β S)

Integrating with respect to S yields a conserved quantity along trajectories:

对 S 积分可得到沿轨迹守恒量:

I + S – (γ N/β) ln S = constant

Using the initial conditions, we can relate I and S at any time:

利用初始条件,我们可得到 I 与 S 在任意时刻的关系:

I(t) = N – S(t) + (γ N/β) ln (S(t)/S(0))

This result is extremely useful: it allows us to determine the final size of the epidemic (when I = 0) by solving the transcendental equation:

这一结果非常有用:它允许我们通过求解超越方程来确定疫情的最终规模(当 I = 0 时):

S(∞) = N – R(∞) = S(0) exp[ –(β/(γ N)) (N – S(∞)) ]

Or equivalently, the total number of recovered individuals R(∞) satisfies R(∞) = N – S(∞).

或等价地,康复总人数 R(∞) 满足 R(∞) = N – S(∞)。

5. Equilibrium Analysis | 平衡点分析

Setting the derivatives to zero, we find all points of the form (S, 0, R) with S + R = N are equilibria. These represent disease‑free states. The stability of the disease‑free equilibrium (S = N, I = 0, R = 0) depends on the initial growth rate of I. Expanding dI/dt near this equilibrium:

令各导数为零,我们发现所有形如 (S, 0, R) 且 S + R = N 的点均为平衡点。它们代表无病状态。无病平衡点 (S = N, I = 0, R = 0) 的稳定性取决于 I 的初始增长率。在该平衡点附近展开 dI/dt:

dI/dt ≈ (β – γ) I when S ≈ N

Thus, if β > γ (equivalently β/γ > 1), I grows exponentially at the onset; the disease‑free equilibrium is unstable and an epidemic occurs. If β < γ, any small introduction of infection decays, and the equilibrium is locally stable.

因此,若 β > γ(即 β/γ > 1),I 在初期呈指数增长;无病平衡点不稳定,疫情暴发。若 β < γ,任何小规模引入感染会衰减,平衡点局部稳定。

6. Basic Reproduction Number R₀ | 基本再生数 R₀

The threshold quantity is the basic reproduction number:

阈值量即基本再生数:

R₀ = β / γ

R₀ represents the average number of secondary infections produced by one infected individual in a wholly susceptible population. When R₀ > 1, an epidemic is possible; when R₀ < 1, the disease dies out. In our scaled formulation with explicit N, the same expression holds because the transmission rate per susceptible–infectious pair is β/N, and the average infectious period is 1/γ, giving R₀ = (transmission rate per contact) × (average duration of infectiousness) × (initial susceptible population) / (recovery rate) ... but after cancellation we obtain β/γ.

R₀ 表示在一个完全易感的人群中,一名感染者所产生的二代病例平均数。当 R₀ > 1 时,疫情可能暴发;当 R₀ < 1 时,疾病消亡。在我们显式包含 N 的缩放形式中,同样的表达式成立,因为每个易感–感染者对的传播率为 β/N,平均传染期 1/γ,经约简后即得 β/γ。

Public health interventions aim to reduce R₀ below 1 by lowering β (e.g., through masks, distancing, hygiene) or increasing γ (quicker isolation, treatment). In our city scenario, suppose β = 0.5 day⁻¹ and γ = 0.2 day⁻¹. Then R₀ = 0.5 / 0.2 = 2.5 > 1, confirming an epidemic is likely without interventions.

公共卫生干预措施的目标是通过降低 β(例如戴口罩、保持距离、卫生措施)或增大 γ(更快隔离、治疗)使 R₀ 降至 1 以下。在我们的城市场景中,假设 β = 0.5 天⁻¹,γ = 0.2 天⁻¹,则 R₀ = 0.5 / 0.2 = 2.5 > 1,确认若不干预则很可能发生疫情。


7. Parameter Estimation | 参数估计

Estimating β and γ from early epidemic data is a fundamental step. Often, we use the initial exponential growth rate r, obtained by fitting I(t) ≈ I(0) exp(r t) to the first few days’ case counts. Linearising the SIR model near the disease‑free equilibrium (S ≈ N) gives:

从疫情初期数据估计 β 和 γ 是基础步骤。通常,我们利用初始指数增长率 r,通过将 I(t) ≈ I(0) exp(r t) 拟合至最初几天的病例数获得。将 SIR 模型在无病平衡点 (S ≈ N) 附近线性化得:

r = β – γ

The average serial interval or generation time can be approximated by T_c = 1/γ. If we observe a doubling time T_d of infections, then r = ln 2 / T_d. Combining, we obtain:

平均序列间隔(代际时间)可近似为 T_c = 1/γ。若观测到感染数倍增时间 T_d,则 r = ln 2 / T_d。结合可得:

β = r + γ, γ = 1 / T_c

For our hypothetical city, early data show T_d = 2.5 days, giving r ≈ 0.277 day⁻¹. Published estimates for similar influenza suggest T_c ≈ 5 days, so γ ≈ 0.2 day⁻¹. Then β = 0.277 + 0.2 = 0.477 ≈ 0.5 day⁻¹, consistent with our assumed values.

对于我们的假设城市,早期数据显示 T_d = 2.5 天,得 r ≈ 0.277 天⁻¹。类似流感的公开估计表明 T_c ≈ 5 天,故 γ ≈ 0.2 天⁻¹。于是 β = 0.277 + 0.2 = 0.477 ≈ 0.5 天⁻¹,与我们假设的值一致。


8. Model Predictions and Interpretation | 模型预测与解读

Using the analytical relation I(S) from Section 4 and solving numerically for the peak, we find the maximum number of infectious individuals. The peak occurs when dI/dS = 0, which from the phase‑plane equation gives S = γ N / β = N / R₀. Substituting our numbers:

利用第 4 节的 I(S) 解析关系并通过数值方法求解峰值,可找到感染者的最大数量。峰值出现在 dI/dS = 0 时,由相平面方程得 S = γ N / β = N / R₀。代入数值:

S_peak = N / R₀ = 100,000 / 2.5 = 40,000

The corresponding infected count I_peak is then:

相应的感染者数 I_peak 为:

I_peak = N – S_peak + (γ N/β) ln (S_peak / S(0))

= 100,000 – 40,000 + (0.2×100,000/0.5) ln(40,000/99,999)

= 60,000 + 40,000 × (–0.9163) ≈ 60,000 – 36,652 = 23,348

Thus, about 23,300 people would be infectious at the peak, placing a heavy burden on healthcare. The final size equation gives S(∞) ≈ 10,700, meaning R(∞) ≈ 89,300. Nearly 90 % of the population would eventually be infected during this wave.

因此,在峰值时约有 23 300 人具有传染性,给医疗系统带来沉重负担。最终规模方程给出 S(∞) ≈ 10 700,即 R(∞) ≈ 89 300。接近 90% 的人口在这一波疫情中最终会被感染。

The peak day t_peak can be approximated by integrating dS/dt; a numerical simulation shows it occurs around day 55. These numbers make a compelling case for implementing interventions before the epidemic accelerates.

峰值出现的日期 t_peak 可通过积分 dS/dt 近似求得;数值模拟显示约在第 55 天。这些数字充分说明了在疫情加速前实施干预措施的必要性。


9. Exploring Intervention Scenarios | 探索干预情景

If a vaccination campaign successfully immunises 30 % of the susceptible population very early, the effective reproduction number becomes R_e = R₀ × (S(0)/N). If we instantaneously move 30,000 individuals from S to R, then S(0) reduces to 69,999. R_e = 2.5 × 0.7 = 1.75, which is still > 1, so an epidemic will still occur but with a smaller peak. Repeating the calculation:

如果一项疫苗接种运动在极早期成功免疫了 30% 的易感人口,有效再生数变为 R_e = R₀ × (S(0)/N)。若瞬间将 30 000 人从 S 移至 R,则 S(0) 降至 69 999。R_e = 2.5 × 0.7 = 1.75,仍大于 1,疫情仍会发生但峰值较小。重复计算:

S_peak = N / R₀ = 40,000 (unchanged, because the threshold S depends only on R₀ and N)

I_peak = 100,000 – 40,000 + 40,000 ln(40,000/69,999) = 60,000 + 40,000 × (–0.5596) ≈ 37,616

The peak infected drops from 23,348 to about 37,600? Wait, there is an error: the formula should be I_peak = N – S_peak + (γ N/β) ln(S_peak / S(0)). We must recompute carefully.

峰值感染数从 23 348 降至约 37 600?等等,有误:公式应为 I_peak = N – S_peak + (γ N/β) ln(S_peak / S(0))。我们重新仔细计算。

I_peak = 100,000 – 40,000 + 40,000 × ln(40,000 / 69,999) = 60,000 + 40,000 × (–0.5596) = 60,000 – 22,384 = 37,616

This number is larger than the previous I_peak? That appears counterintuitive, but it highlights the subtlety: with a smaller initial susceptible pool, the epidemic takes longer to build up, and the peak number infected might not decrease monotonically if computed this way. Actually, a more precise interpretation is that I_peak here uses the relation I + S – (γ N/β) ln S = const, which changes because the initial condition changed. The original I_peak for S(0)=99,999 was 23,348. With S(0)=69,999, the trajectory shifts and indeed I_peak becomes 37,616? Let’s check the conserved quantity: For original case, constant = I(0)+S(0) – (γ N/β) ln S(0) = 1 + 99,999 – 40,000 ln(99,999) ≈ 100,000 – 40,000×11.5129 = 100,000 – 460,516 = –360,516. At peak, I_peak = const – S_peak + 40,000 ln S_peak = –360,516 – 40,000 + 40,000×10.5966 = –400,516 + 423,864 = 23,348. Correct. With vaccination: constant new = 0 + 69,999 – 40,000 ln(69,999) = 69,999 – 40,000×11.1562 = 69,999 – 446,248 = –376,249. Then I_peak new = –376,249 – 40,000 + 40,000 ln(40,000) = –416,249 + 423,864 = 7,615? Wait, ln(40,000) = 10.5966, 40,000×10.5966 = 423,864. So –376,249 – 40,000 + 423,864 = 7,615. That makes sense: vaccination reduces the peak infected from 23,348 to about 7,600. My earlier mistake was mixing constants. The corrected peak is I_peak ≈ 7,615, a dramatic reduction. This illustrates the power of even 30% vaccine coverage when applied early.

更准确的计算是:原始常数 const = I(0)+S(0) – 40 000 ln S(0) = 1 + 99 999 – 40 000 ln(99 999) ≈ –360 516。接种后新常数 const_new = 0 + 69 999 – 40 000 ln(69 999) = –376 249。峰值时 I_peak new = const_new – 40 000 + 40 000 ln(40 000) = –376 249 – 40 000 + 423 864 = 7 615。接种 30% 使感染峰值从 23 348 降至约 7 615,降幅显著。这说明了早期哪怕 30% 的疫苗覆盖率也能带来巨大效果。


10. Model Validation and Limitations | 模型验证与局限性

While the SIR model captures the core dynamics, it rests on simplifications. In reality, populations are heterogeneous; contacts are structured by age, household, and social networks; immunity may wane; and behavioural changes (voluntary distancing, mask‑wearing) reduce β over time. Moreover, our parameter estimation assumed constant β and γ derived from early exponential growth, which might over‑ or underestimate R₀ if the growth phase is not truly exponential due to stochastic fade‑out or importation of new cases. Sensitivity analysis should be performed by varying parameters within plausible ranges and examining the range of possible peaks and final sizes. Despite these limitations, the SIR model provides a valuable first‑approximation and a clear framework for understanding the impact of interventions.

尽管 SIR 模型捕捉了核心动力学,但它建立在简化之上。现实中,人群是异质的;接触按年龄、家庭和社交网络结构化;免疫力可能衰减;行为改变(自愿保持距离、戴口罩)会使 β 随时间下降。此外,我们的参数估计假设 β 和 γ 恒定并由早期指数增长导出,如果增长阶段因随机消散或新病例输入而非真正指数增长,则可能高估或低估 R₀。应在合理范围内调整参数进行敏感性分析,检查可能的峰值和最终规模范围。尽管有这些局限,SIR 模型仍提供了有价值的第一近似和清晰的框架,用于理解干预措施的效果。


11. Conclusion and Reporting | 结论与报告撰写

This case study demonstrates the complete workflow of epidemic modelling: translating a verbal problem into differential equations, performing phase‑plane analysis to derive peak size and final size, estimating parameters from early data, calculating R₀, and evaluating intervention scenarios. The key findings – an R₀ of 2.5, a peak of about 23,300 infections without intervention, and a reduction to about 7,600 with 30 % early vaccination – form the backbone of a public health advisory. A formal report would include clear graphs of S(t), I(t), R(t) over time, the phase portrait I vs S, and a table summarising parameters and outcomes.

本案例展示了传染病建模的完整流程:将文字问题转化为微分方程,执行相平面分析以推导峰值规模和最终规模,利用早期数据估计参数,计算 R₀,以及评估干预情景。关键发现——R₀ = 2.5,无干预下峰值约 23 300 例感染,早期接种 30% 后降至约 7 600 例——构成了公共卫生建议的骨干。正式报告应包括 S(t)、I(t)、R(t) 随时间变化的清晰图表、I 对 S 的相图,以及总结参数和结果的表格。


12. Further Mathematical Extensions | 延伸数学讨论

For Pre‑U students aiming for top marks, one could extend the analysis by introducing a time‑varying β to mimic social distancing rolled out after day 30, or by adding a latent compartment (SEIR model), which introduces a delay between infection and infectiousness. The SEIR model adds an equation dE/dt = β S I/N – σ E, where σ is the rate of progression to infectiousness. The effective reproduction number becomes R₀ = β / γ still, but the peak is delayed and reduced. Such extensions illustrate how progressively sophisticated models capture more realism while still relying on core ODE techniques.

对于力求高分的 Pre‑U 学生,可以通过引入时变 β 来模拟第 30 天后实施的社交距离措施,或增加潜伏仓室(SEIR 模型)来扩展分析。SEIR 模型增加了方程 dE/dt = β S I/N – σ E,其中 σ 是进入传染期的速率。有效再生数仍为 R₀ = β / γ,但峰值被延迟且降低。此类扩展表明,更复杂的模型如何在捕捉更多现实因素的同时仍依赖核心常微分方程技法。

Published by TutorHao | Mathematics Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading