Download presentation
Presentation is loading. Please wait.
Published byCurtis Snow Modified over 9 years ago
1
Quadrature
2
二阶 : 中点公式 : 梯形公式 : 四阶公式 : Simpson’s 1/3 rd Rule
4
Boole ’ s rule,The 6-th Newton-Cotes rule (the first step of Romberg integration) The extrapolated Simpson ’ s rule.
5
a = 0;b = 1; M = 10; H = (b-a)/M; % 2M intervals x = linspace(a,b,M+1); fpm = feval('fquad',x); fpm(2:end-1) = 2*fpm(2:end-1); csq = H*sum(fpm)/6; x = linspace(a+H/2,b-H/2,M); fpm = feval('fquad',x); csq = csq + 4/6*H*sum(fpm); Composite Simpson numerical integration
6
quad 基于变步长 Simpson 公式 (recursive adaptive Simpson quadrature) quad8 基于 Newton-Cotes 公式 (adaptive recursive Newton-Cotes 8 panel rule) quadl adaptive Lobatto quadrature % 1 f = inline('sin(x)/x'); f = vectorize(f); Q = quad(f,realmin,pi) % 2 anonymous function, beginning with MATLAB 7 f = @(x) sin(x)/x Q = quad(f,realmin,pi) % 3 use an M-file Q = quad(@sinc,0,pi)
7
Dblquad 二重积分 Triplequad 三重积分 计算 %1 function f = fxy(x,y) f = exp(-x.^2/2).*sin(x.^2+y.^2); I = dblquad('fxy',-2,2,-1,1) %2 I = dblquad(inline('exp(-x.^2/2).*sin(x.^2+y.^2)','x','y'),-2,2,-1,1) 符号计算 int
8
% integrating discrete data x = 0:10; y = x; % composite trapezoid rule T = sum(diff(x).*(y(1:end-1)+y(2:end))/2)
9
n 点求积公式若具有 2n-1 阶代数精度就成为 Gauss 型求积公式. Gauss-Legendre 公式 Gauss-Chebyshev 公式 Gauss-Laguerre 公式 Gauss-Hermite 公式
10
三项递推:
12
勒让德多项式 (Legendre) [-1,1], (x)=1 递推关系 : P 0 (x)=1, P 1 (x)=x,
13
Legendre 多项式
14
无穷积分 令 Gauss-Laguerre 方法 ( 定义在 [0,∞), 无复合公式 )
15
The road to wisdom? Well, it’s plain and simple to express: Err and err and err again but less and less PIET HEIN, Grooks(1966)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.