插值法与拟合法在传染病问题中的应用
2021-11-27杨莹闫泽飞华瑛
杨莹 闫泽飞 华瑛



DOI:10.16661/j.cnki.1672-3791.2107-5042-7919
摘 要:该文是针对插值法与拟合法在传染病问题上的应用分析。搜集连续60天的患病人数作为处理数据,通过使用插值法和拟合法进行模拟,求得累计患病人数与时间的关系。结果表明:(1)在精度上拉格朗日插值法与牛顿插值法的误差相似。但是对于一些结构复杂的函数,牛顿插值法的优势比起拉格朗日插值法更加明显。(2)使用数据拟合法进行传染病问题的应用分析,相较于插值法处理能得到更加精准的结果。
关键词:拉格朗日插值法 牛顿插值法 差商 数据拟合法 最小二乘法
中图分类号:O314 文献标识码:A文章编号:1672-3791(2021)08(a)-0183-04
Application of Interpolation Method and Fitting Method in Infectious Disease
YANG Ying YAN Zefei HUA Ying*
(College of Information Engineering, Xi'an University, Xi'an, Shaanxi Province, 710065 China)
Abstract: This paper analyzes the application of interpolation method and fitting method in the problem of infectious diseases. The number of patients in 60 consecutive days was collected as the processing data, and the relationship between the cumulative number of patients and time was obtained by using interpolation method and fitting method for simulation. The results show that: (1) The errors of Lagrange interpolation method and Newton interpolation method are similar in accuracy. However, for some functions with complex structure, the advantages of Newton interpolation method are more obvious than Lagrange interpolation method. (2) The application analysis of infectious disease problems using data fitting method can get more accurate results than interpolation method.
Key Words: Lagrange interpolation method; Newton interpolation method; Difference quotient; Data fitting method; Least square method
病毒威脅着人类的健康,所以能够准确地模拟和预测其传播情况尤为重要。基于此,我们运用插值法和拟合法分别对病毒的传播情况进行模拟求解,计算与实际结果之间的误差,并对误差产生的原因进行分析。
1 数据选取与研究方法
1.1 数据选取
依据某传染病发展的情况[1],选取连续60天(2020年1月30日至3月20日)的累计患病人数作为处理数据分别进行预测。
1.2 研究方法
1.2.1 插值法
(1)拉格朗日插值法。拉格朗日插值法[2]通过构造插值基函数求解多项式插值函数。基于此构造插值多项式:
(2)牛顿插值法。牛顿插值[3]引入了差商的概念,其插值多项式具有承袭性,函数在点t0,t1,...,tk处的k阶差商:
依据差商构造差商表,进而表示牛顿插值多项式中的系数:
于是,可得到满足插值条件的n次牛顿插值多项式:
1.2.2 数据拟合法
如果涉及到较多数据……
