在经济学、病毒等动力学模型的计算中,都有可能运用到伊藤公式

以某病毒模型为例(与经典SEIR模型有所区别),其动力学方程为:

matlab计算程序为: 

%SEIR对于的伊藤求解程序
clc;
clear all;
format compact
syms S E I R
syms a b c beta1 beta %参数
%输入微分方程

equation1=-a*S*I+b*I; 
equation2=a*S*I-beta1*E; 
equation3=beta1*E-(c+b)*I;
equation4=c*I;

V=S^2+E^2+I^2+R^2;%取V(t,x)
df1=(diff(V,S)*equation1+1/2*(beta*S)^2*diff(V,S,2))
df2=(diff(V,E)*equation2+1/2*(beta*E)^2*diff(V,E,2))
df3=(diff(V,I)*equation3+1/2*(beta*I)^2*diff(V,I,2))
df4=(diff(V,R)*equation4+1/2*(beta*R)^2*diff(V,R,2))
LV=df1+df2+df3+df4
LV=expand(LV)%罗列梳理

计算结果:

LV =
E^2*beta^2 - 2*I^2*b - 2*I^2*c - 2*E^2*beta1 + I^2*beta^2 + R^2*beta^2 + S^2*beta^2 + 2*E*I*beta1 + 2*I*R*c + 2*I*S*b - 2*I*S^2*a + 2*E*I*S*a 

补充:

伊藤积分的基本表达式:

 其中x为Bt的布朗运动,f为Bt的连续平滑函数。

更多推荐