1 / 23

数值积分与数值微分

数值积分与数值微分. 数值积分 数值微分 大作业. 数值微分. 两点公式 三点公式. 两点公式. 给定两个节点: x1=a, x2=a+h:. 当 h=1:. 差分. 给定三个节点: x1=a-h, x2=a, x3=a+h:. 三点公式. 当 h=1:. 数值积分. 插值求积公式 辛卜生法 高斯求积法 一元函数的数值积分 多重数值积分. 插值 : 定义在区间 [a,b] 上的函数 f(x) ,可以通过区间上 n+1 点 (x k ,f(x k )) 的 n 次插值多项式 P n (x) 来近似代替:. 插值求积公式. 则 f(x) 的积分为:.

Télécharger la présentation

数值积分与数值微分

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 数值积分与数值微分 数值积分 数值微分 大作业

  2. 数值微分 • 两点公式 • 三点公式

  3. 两点公式 • 给定两个节点:x1=a, x2=a+h: • 当h=1: 差分

  4. 给定三个节点:x1=a-h, x2=a, x3=a+h: 三点公式 • 当h=1:

  5. 数值积分 • 插值求积公式 • 辛卜生法 • 高斯求积法 • 一元函数的数值积分 • 多重数值积分

  6. 插值:定义在区间[a,b]上的函数f(x),可以通过区间上n+1点(xk,f(xk))的n次插值多项式Pn(x)来近似代替: 插值求积公式 • 则f(x)的积分为:

  7. 则f(x)的积分为:

  8. 辛卜生法 将积分区间二等分,得到三个等距点:a,(a+b)/2,b,以此三点作为插值结点,得:

  9. 代数精度 • 如果某个数值求积公式对于所有次数不超过m的多项式均能准确成立,但对于m+1次多项式不一定成立,则称该数值求积公式的代数精度为m,或称该数值求积公式具有m次代数精度。

  10. 高斯求积法 • 定理 • 插值求积公式 其结点xk为高斯点的充要条件是以这些点为零点的多项式: 与任何次数不超过n的多项式Pn(x)在区间[a,b]上均正交,即:

  11. 几种常用的高斯求积法 • 勒让德-高斯求积公式 • 切比雪夫-高斯求积公式 • 拉盖尔-高斯求积公式 • 埃尔米特-高斯求积公式

  12. Matlab中的积分 • 一元函数的积分 • 二元函数的积分

  13. 一元函数的积分 • quad • 符号解析法 • 10参数高斯法 • Simulink法

  14. quad • fun = inline('exp(-x.*x)','x'); • Isim = quad(fun,0,1) • IL=quadl(fun,0,1)

  15. quad • % funInteg.m • function y = funInteg(x) • y = exp(-x.*x); • ---------------------------------------- • % tstquad2.m • Isim = quad(@funInteg,0,1) • IL=quadl(@funInteg,0,1)

  16. 符号解析法 • sym x; • IS = int('exp(-x*x)','x',0,1) • vpa(IS)

  17. 10参数高斯法 • function g = gauss10(fun,a,b) • x = [0.1488743390;0.4333953941;0.6974095683;... • 0.8650633667;0.9739065285]; • w = [0.2955242247;0.2692667193;0.2190863625;... • 0.1494513492;0.0666713443]; • t = .5*(b+a)+.5*(b-a)*[-flipud(x);x]; • W = [flipud(w);w]; • g = sum(W.*feval(fun,t))*(b-a)/2;

  18. 10参数高斯法 • fun = inline('exp(-x.*x)','x'); • lg = gauss10(fun,0,1)

  19. 二元函数的积分 • dblquad • triplequad

  20. 符号法 • syms x y • ssx01=vpa(int(int(x^y,x,0,1),y,1,2)) • ssx12=vpa(int(int(x^y,y,0,1),x,1,2))

  21. 数值法 • zz=inline('x.^y','x','y'); • nsx01=dblquad(zz,0,1,1,2) • nsx12=dblquad(zz,1,2,0,1)

  22. 变上限多重积分 • 见mbook第四章

  23. 大作业 • 编制一个GUI界面实现以下功能: • 输入序列,输出对其的微分(一元函数); • 输入函数,输出对其的积分(一元函数和二元函数)。 • GUI界面应包括按钮,输入编辑框和输出编辑框。 • 程序说明书(程序的功能说明,使用说明、程序结构图,callback函数说明及对本课程教学的改进意见。)

More Related