差分方程及微分方程数值解

上传人:wt****50 文档编号:37828564 上传时间:2018-04-23 格式:DOC 页数:7 大小:151KB
返回 下载 相关 举报
差分方程及微分方程数值解_第1页
第1页 / 共7页
差分方程及微分方程数值解_第2页
第2页 / 共7页
差分方程及微分方程数值解_第3页
第3页 / 共7页
差分方程及微分方程数值解_第4页
第4页 / 共7页
差分方程及微分方程数值解_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《差分方程及微分方程数值解》由会员分享,可在线阅读,更多相关《差分方程及微分方程数值解(7页珍藏版)》请在金锄头文库上搜索。

1、1东南大学东南大学数学实验数学实验报告报告实验内容:实验内容:差分方程及微分方程数值解差分方程及微分方程数值解一 实验目的实验目的熟悉迭代法及微分方程数值方法熟悉迭代法及微分方程数值方法二 预备知识预备知识(1)了解差分方程稳定性、周期分解、混沌等相关知识(2)了解欧拉方法、龙格-库特方法。三 实验内容与要求实验内容与要求(一)Volterra 方程数值解方程0, , dcba dxycxdtdybxyaxdtdx其中a=1,b=0.1,c=0.5,d=0.04. 2)0(,25)0(yx命令与结果在函数编辑器中输入:function dxdt = euler( t,x ) dxdt= x(1

2、)*(1-0.1*x(2) x(2)*(-0.5+0.02*x(1); end四阶龙格-库塔公式:在命令窗口中输入: tspan=0 15; x0=25;2; t,x=ode45(euler,tspan,x0); plot(t,x(:,1),r-,LineWidth,0.5); hold on; plot(t,x(:,2),g-,LineWidth,0.5); hold on;(1)相图四阶龙格-库塔公式:2axis(0 15 0 125) legend(x(1),x(2) grid on title(The Numerical Solution Of Calculable way of fo

3、urth rank Rounge-kutt) plot(x(:,1),x(:,2)欧拉方法:在命令窗口中输入: tspan=0 15; x0=25;2; t,x=ode23(euler,tspan,x0); plot(t,x(:,1),r-,LineWidth,0.5); hold on; plot(t,x(:,2),g-,LineWidth,0.5); hold on; axis(0 15 0 125) legend(x(1),x(2) grid on title(The Numerical Solution Of Euler Equation) plot(x(:,1),x(:,2)欧拉公式

4、:(2)轨线图四/五阶龙格-库塔公式:3欧拉公式:(2)差分阻滞增长模型在 t 时刻单位时间内的人口数量的变化量仅仅与此时的人口数量 x 有关(等于右边的值),其)1 ()(Nxrxtx if nargin2x0=0.5; end x=x0; n=1:10000; for i=2:10000x(i)=b*x(i-1)*(1-x(i-1); end plot(n,x,.); end结果图: ( )nx n稳定性分析b=2.2,在 1 到 3 范围之间 稳定命令与结果(图) ( )nx nfunction x=block(b,x0) b=2.2; if nargin2x0=0.5; end x=x

5、0; n=1:10000; for i=2:10000x(i)=b*x(i-1)*(1-x(i-1); end plot(n,x,.); end结果图: ( )nx n(2)不稳定情况b=3. 3b=3. 636稳定性分析b=3.3 在 1 到 3 范围之间 不稳定命令与结果(图) ( )nx n稳定性分析b=3.63 在 1 到 3 范围之间 不稳定命令与结果(图) ( )nx n(3)倍周期分解b=3. 3b=3. 5(1)求稳定平衡点可得两个平衡点:0.4794 0.8236 程序: function x=block(b,x0) b=3.3; if nargin2x0=0.5; end

6、x=x0; n=1:100; for i=2:100x(i)=b*x(i-1)*(1-x(i-1); end(2)数值结果ans =Columns 1 through 160.5000 0.8250 0.4764 0.8232 0.4804 0.8237 0.4792 0.8236 0.4795 0.8236 0.4794 0.8236 (1)求稳定平衡点四个平衡点:0.5009 0.8750 0.3828 0.8269 程序: function x=block(b,x0) b=3.5; if nargin2x0=0.5; end x=x0; n=1:100; for i=2:100x(i)=

7、b*x(i-1)*(1-x(i-1); end(2)数值结果ans =Columns 1 through 160.5000 0.8750 0.3828 0.8269 0.5009 0.8750 0.3828 0.8269 70.4794 0.8236 0.4794 0.8236Columns 17 through 320.4794 0.8236 0.4794 0.8236 0.4794 0.8236 0.4794 0.8236 0.4794 0.8236 0.4794 0.8236 0.4794 0.8236 0.4794 0.82360.5009 0.8750 0.3828 0.8269 0.5009 0.8750 0.3828 0.8269Columns 17 through 320.5009 0.8750 0.3828 0.8269 0.5009 0.8750 0.3828 0.8269 0.5009 0.8750 0.3828 0.8269 0.5009 0.8750 0.3828 0.8269

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 社会民生

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号