数学建模作业---第二章。
微分方程稳定性分析。
1) 由解得平衡点, ,
特征值, ,
∴是不稳定点。
matlab作图程序:
x=[-5:0.1:5];
fora=-5:0.1:5; y=a*x;
plot(x,y);hold on;
endxlabel('x');ylabel('y');
得到图形:2)由解得平衡点, ,
特征值, ∴是不稳定点。
matlab作图程序:
y=[0:0.1:10];
for a=-5:0.5:5;
x=a./(y.^(0.5));
plot(y,x);hold on;
endxlabel('y');ylabel('x');
得到如下图形:
3)由解得平衡点, ,
特征值, 是不稳定点。
用matlab作图程序如下:
x=[0:0.01:5]; for a=-10:0.1:10;
y=((2)*x.^2+a).^0.5;
plot(x,y);hold on;
endxlabel('x');ylabel('y');
得到如下图形:
4)由解得平衡点, ,
特征值, ,
∴是稳定点。
用matlab程序作图如下:
x=[-5:0.01:5]; for a=-5:0.5:5;
y=a*(x.^2);
plot(x,y);hold on;
endxlabel('x');ylabel('y');
得到如下图形:
种族增长模型:
由题意,得到菌落的细菌数目n(t)变化的模型为:
设g(t)= 则令g(t)=0,得到。
n=0或n=
所以此模型的平衡点为n=0或,并且可以得到:
当0当n>时,n’(t)>0。
设g’(t)=
令g’(t)=0,得:
n=0或或。
分析得到:当00;当当n>时,n”(t)>0;
画出趋势图形为:
分析:是稳定的,是不稳定的,即表示当种群数量小于时,病菌会随时间变化逐渐减少0,趋于稳定;当初时病菌数量恰好为时,数量并不会随时间改变;当初时病菌数量大于时,则会随时间逐渐增加;
有限资源竞争模型。
由得到:x2=0或x1=0,x2=或x1=,x2=0
三个平衡点:
1. 对于,系数矩阵,所以不稳定。
2.对于,系数矩阵,,。
∴,是稳定的。
当时,当时,
3.对于,系数矩阵,,
∴,不稳定。
所以,当时,物种二最终要灭亡。
对于线性方程组在平面上表示两条直线和。
对于线性方程组在平面上表示两条直线和。
当和,直线和将第一象限分成三个区域ⅰ,ⅱ
在区域i中,x2’(t)>0,随着时间t物种2数量增加,到达直线时,有=0,即此刻趋常数,说明曲线平行于横轴过度到区域ii。
在区域ii中,物种2数量减少,物种1增加。当经过直线时, =0,即此刻为一常数,说明曲线是垂直于横轴向下过度到区域iii的。
在区域iii中, <0说明物种2随时间变化数量减少,最终消失。综上分析:物种二最终要灭亡。
图如下:蝴蝶效应和混沌解。
1)建立描述微分方程组的外部函数(函数名:
functionxdot=lorenz(t,x)
xdot=[-8/3*x(1)+x(2)*x(3);
10*x(2)+10*x(3);
x(1)*x(2)+28*x(2)-x(3)];
输入。t,x]=ode45(@lorenz,[0 100],[0 0 1e-10]);
plot(x(:,2), x(:,1));
xlabel(''
ylabel(''
再输入[t,x]=ode45(@lorenz,[0 100],[0 0 1e-10]);
plot(x(:,2), x(:,3));
xlabel(''
ylabel(''
再输入。t,x]=ode45(@lorenz,[0 100],[0 0 1e-10]);
plot(x(:,3), x(:,1));
xlabel(''
ylabel(''
再输入。t,x]=ode45(@lorenz,[0 100],[0 0 1e-10]);
plot(x(:,3), x(:,1));
xlabel(''
ylabel(''
得到如下图形:
改变初始值,即:,,2
输入:t,x]=ode45(@lorenz,[0 100],[1 12]);
plot(x(:,2), x(:,1));
xlabel(''
ylabel(''
输入:[t,x]=ode45(@lorenz,[0 100],[1 12]);
plot(x(:,2), x(:,3));
xlabel(''
ylabel(''
输入:t,x]=ode45(@lorenz,[0 100],[1 12]);
plot(x(:,3), x(:,1));
xlabel(''
ylabel(''
图形如下:分析:通过两**形的对比,我们可以看出当初始值改变后,图形基本不变,只有略微变化。
用微分方程考察共振现象。
通过受力分析,得到弹簧的运动微分方程。
由题,g取9.8
则:h=0时:
用matlab求解:
>x=dsolve('d2x+4*x=0','x(0)=1,dx(0)=0','t')
x =cos(2*t)
> t=0:0.05:5;x=cos(2*t);
>plot(t,x);tlabel('t');xlabel('x');
得到h=0时的图:
h=0.1时:
用matlab求解:
> x=dsolve('d2x++0.2*dx+4*x=0','x(0)=1,dx(0)=0','t')
x =cos((399^(1/2)*t)/10)/exp(t/10) +399^(1/2)*sin((399^(1/2)*t)/10))/399*exp(t/10))
>t=0:0.05:
5;x=cos((399^(1/2).*t)/10)./exp(t/10)+(399^(1/2)*sin((399^(1/2).
*t)/10))/399.*exp(t/10));
plot(t,x);tlabel('t');xlabel('x');
得到h=0.1时的图:
则:时:用matlab求解:
> x=dsolve('d2x+4*x+sint=0','x(0)=1,dx(0)=0','t')
x =cos(2*t)*(sint/4 + 1) -sint/4
t=0:0.05:5;x=cos(2*t).*sin(t/4) +1) -sin(t/4);
plot(t,x);tlabel('t');xlabel('x');图:时:
用matlab求解。
> x=dsolve('d2x+4*x+sin1.2*t=0','x(0)=1,dx(0)=0','t')
x =cos(2*t) +sin12*sin(2*t))/8 - sin12*t)/4
t=0:0.05:5;x=cos(2*t) +sin(12)*sin(2*t))/8 - sin(12*t))/4;
plot(t,x);tlabel('t');xlabel('x');图:时:
用matlab求解。
> x=dsolve('d2x+4*x+sin1.4*t=0','x(0)=1,dx(0)=0','t')
x =cos(2*t) +sin14*sin(2*t))/8 - sin14*t)/4
t=0:0.05:5;x=cos(2*t) +sin(14)*sin(2*t))/8 - sin(14*t))/4;
plot(t,x);tlabel('t');xlabel('x');图:时:
用matlab求解。
> x=dsolve('d2x+4*x+sin1.6*t=0','x(0)=1,dx(0)=0','t')
x =cos(2*t) +sin16*sin(2*t))/8 - sin16*t)/4
t=0:0.05:5;x=cos(2*t) +sin(16)*sin(2*t))/8 - sin(16*t))/4;
plot(t,x);tlabel('t');xlabel('x');图:时:
用matlab求解。
> x=dsolve('d2x+4*x+sin1.8*t=0','x(0)=1,dx(0)=0','t')
x =cos(2*t) +sin18*sin(2*t))/8 - sin18*t)/4
t=0:0.05:5;x=cos(2*t) +sin(18)*sin(2*t))/8 - sin(18*t))/4;
plot(t,x);tlabel('t');xlabel('x');图:时:
用matlab求解。
> x=dsolve('d2x+4*x+sin2*t=0','x(0)=1,dx(0)=0','t')
x =cos(2*t) +sin2*sin(2*t))/8 - sin2*t)/4
t=0:0.05:5;x=cos(2*t) +sin(2)*sin(2*t))/8 - sin(2*t))/4;
plot(t,x);tlabel('t');xlabel('x');图:时:
用matlab求解。
> x=dsolve('d2x+4*x+sin2.2*t=0','x(0)=1,dx(0)=0','t')
x =cos(2*t) +sin22*sin(2*t))/8 - sin22*t)/4
t=0:0.05:5;x=cos(2*t) +sin(22)*sin(2*t))/8 - sin(22*t))/4;
plot(t,x);tlabel('t');xlabel('x');图:时:
用matlab求解。
> x=dsolve('d2x+4*x+sin2.4*t=0','x(0)=1,dx(0)=0','t')x =cos(2*t) +sin24*sin(2*t))/8 - sin24*t)/4
t=0:0.05:5;x=cos(2*t) +sin(24)*sin(2*t))/8 - sin(24*t))/4;
数学建模作业
1992年全国数学建模a题数据分析。对土豆和生菜,分别建立施肥量和产量之间的多元关系,运用excel和matlab软件依次采用散点法和拟合关系进行绘图显示。在确认模型具有完美的基础上,进行线性相关 交互作用 最佳响应水平 强影响变量等的分析。同时,将两种作物进行比较,得出一系列颇有实用价值的结论。分...
数学建模作业
1.试说明下面的数学规划 mp 是一个凸规划。解 1 目标函数。一阶顺序主子式为,行列式为 二阶顺序主子式为,行列式为 三阶顺序主子式为,行列式为。hessian矩阵正定,目标函数是凸函数。2 约束条件。一阶顺序主子式为,行列式为 二阶顺序主子式为,行列式为 三阶顺序主子式为,行列式为。hessia...
数学建模作业
有风条件下的森林救火。摘要 僧林救火问题是一个优化问题,我们可以采用定积分和极值法来求森林的面积,救火的总费用 单位森林面积损失费 损失面积 每个队员的单位时间的灭火费用 人数 灭火时间 单位人数 一次性支出 参加救火的消防员人数。在有风的条件下我们可以把损失的面积的图像看作是扇形或椭圆,我们可以用...