资源描述:
《微分方程求解实验报告.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、新乡学院数学与信息科学系实验报告实验项目名称微分方程求解所属课程名称数学实验实验类型综合性实验实验日期2013-5-10班级11级数学与应用数学一班学号11111011013姓名高亚丹成绩一、实验概述:【实验目的】1.会解微分方程simplify(s):对表达式s使用maple的化简规则进行化简例如:simplify(sin(x)^2+cos(x)^2)ans=12.学会用数值解解法、解析解解法、Euler折线法解微分方程y=dsolve(‘x*Dy+y-exp(x)=0’,’y(1)=2*exp(1)’,’
2、x’)ezplot(y)3.用Matlab解多元微分方程和一元微分方程组Ode23,ode45常用来求解非刚性的标准形式的一阶常微分方【实验原理】1.绘图原理2.编写解析解,数值解,Euler折线法解微分方程的程序【实验环境】MATLAB7.0二、实验内容:【实验方案】1.用Euler折线法和数值解解微分方程2.图形的绘制【实验过程】(实验步骤、记录、数据、分析)1.分别用ode23、ode45求微分方程初值问题的数值解,求解区间为t∈【0,0.5】.利用画图来比较两种求解器之间的差异.求解本问题的Matla
3、b程序为:先编写函数文件verderpol.m:functionxprime=verderpol(t,x)xprime=[-x(1)-x(2);x(2)-x(1)];再编写命令文件vdp.m:y0=[1;0];[t,x]=ode45('verderpol',[0,0.5],y0)plot(x(:,1),x(:,2),'r+');holdoncleary0=[1;0];[t,x]=ode23('verderpol',[0,0.5],y0)plot(x(:,1),x(:,2),'b*');数据结果为:t=00.0
4、0010.00010.00020.00020.00050.00070.00100.00120.00250.00370.00500.00620.01250.01880.02510.03130.04380.05630.06880.08130.09380.10630.11880.13130.14380.15630.16880.18130.19380.20630.21880.23130.24380.25630.26880.28130.29380.30630.31880.33130.34380.35630.36880.
5、38130.39380.40630.41880.43130.44380.45630.46880.48130.48600.49070.49530.5000x=1.000000.9999-0.00010.9999-0.00010.9998-0.00020.9998-0.00020.9995-0.00050.9993-0.00070.9990-0.00100.9988-0.00120.9975-0.00250.9963-0.00370.9951-0.00500.9938-0.00620.9876-0.01250.9
6、816-0.01880.9756-0.02510.9696-0.03140.9580-0.04390.9468-0.05640.9358-0.06900.9251-0.08150.9147-0.09410.9046-0.10670.8947-0.11940.8852-0.13210.8759-0.14480.8669-0.15760.8582-0.17050.8497-0.18330.8415-0.19630.8336-0.20930.8259-0.22240.8185-0.23550.8113-0.2487
7、0.8044-0.26200.7978-0.27540.7914-0.28880.7852-0.30240.7793-0.31600.7736-0.32980.7682-0.34360.7630-0.35760.7581-0.37160.7534-0.38580.7489-0.40010.7446-0.41450.7406-0.42910.7368-0.44380.7333-0.45860.7300-0.47360.7269-0.48870.7240-0.50400.7214-0.51940.7205-0.5
8、2520.7196-0.53100.7187-0.53690.7179-0.5427t=00.00010.00050.00250.01250.06250.11250.16250.21250.26250.31250.36250.41250.46250.5000x=1.000000.9999-0.00010.9995-0.00050.9975-0.00250.9877-0.01250.9413-0.06