数学实验第四次讲稿.ppt

  1. 1、本文档共62页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数学实验第四讲; 1) 掌握微分方程求解的三种解法:解析 法、数值解法以及图形表示解的方法; 2) 学会使用MATLAB软件求解析解、数值解 和图形解; 3) 通过范例学习怎样建立微分方程模型和 分析问题的思想;;一,建立微分方程;一,建立微分方程;一,建立微分方程;一,建立微分方程;一,建立微分方程;一,建立微分方程;二,微分方程的解法;二,微分方程的解法;二,微分方程的解法;二,微分方程的解法之解析方法; dsolve('eq1,eq2,...', 'cond1,cond2,...', 'v') symbolically solves the ordinary differential equation(s) specified by eq1, eq2,... using v as the independent variable and the boundary and/or initial condition(s) specified by cond1,cond2,.... The default independent variable is t. The letter D denotes differentiation with respect to the independent variable; with the primary default, this is d/dx. A D followed by a digit denotes repeated differentiation. For example, D2 is d2/dx2. Any character immediately following a differentiation operator is a dependent variable. For example, D3y denotes the third derivative of y(x) or y(t). Initial/boundary conditions are specified with equations like y(a) = b or Dy(a) = b, where y is a dependent variable and a and b are constants. If the number of initial conditions specified is less than the number of dependent variables, the resulting solutions will contain the arbitrary constants C1, C2,....;例①;例② 常系数的二阶微分方程;x=dsolve('(Dx)^2+x^2=1','x(0)=0');输入: [x,y]=dsolve('Dx=3*x+4*y','Dy=-4*x+3*y') [x,y]=dsolve('Dx=3*x+4*y','Dy=-4*x+3*y','x(0)=0,y(0)=1');对于大量的微分方程,只能得到其数值解,一般而言,得到的解是方程的一个特解的近似。求微分方程数值解的方法很多,比如:欧拉法,龙格—库塔法等。其基本思想就是通过已知点得到函数值,并用该函数值代替一个小区间上函数的导数,得到在该区间上的一条直线,并用该直线作为方程特解的近似。有兴趣的同学可以参考微分方程数值解方面的著作。 ;;1)首先建立M-文件 (weif.m) function f = weif(x,y) f=-y+x+1; 2)求解:[x,y]=ode23(‘weif’, [0, 1], 1) 3) 作图形: plot(x, y, ‘r’); 4) 与精确解进行比较 hold on ezplot(‘x+exp(-x)’,[0, 1]); 1、在解n个未知函数的方程组时,x0和x均为n维向量,m-函数文件中的待解方程组应以x的分量形式写成.;注意1;例如:;例2 Van der pol 方程:;(1)编写M文件 ( 文件名为 vdpol.m): function yp = vdpol(t,y); global a; yp=[y(2);a*(1-y(1)^2)*y(2)-y(1)];; 蓝色曲线 ——y(1); (原方程解) 红色曲线 ——y(2);;范例;例3 考虑Lorenz模型:;1、 lorenz.m function xdot=lorenz(t,x) xd

文档评论(0)

春意依然 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档