Title: Quadrature
1Quadrature
2?? ????
????
????
Simpsons 1/3rd Rule
3(No Transcript)
4Booles rule,The 6-th Newton-Cotes rule (the
first step of Romberg integration) The
extrapolated Simpsons rule.
5Composite Simpson numerical integration
a 0b 1 M 10 H (b-a)/M 2M
intervals x linspace(a,b,M1) fpm
feval('fquad',x) fpm(2end-1)
2fpm(2end-1) csq Hsum(fpm)/6 x
linspace(aH/2,b-H/2,M) fpm feval('fquad',x)
csq csq 4/6Hsum(fpm)
6quad ?????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 _at_(x) sin(x)/x Q
quad(f,realmin,pi) 3 use an M-file Q
quad(_at_sinc,0,pi)
7Dblquad ???? Triplequad ????
??
1 function f fxy(x,y) f exp(-x.2/2).sin(x.
2y.2) I dblquad('fxy',-2,2,-1,1) 2 I
dblquad(inline('exp(-x.2/2).sin(x.2y.2)','x',
'y'),-2,2,-1,1)
???? int
8 integrating discrete data
x 010 y x composite trapezoid rule T
sum(diff(x).(y(1end-1)y(2end))/2)
9Gauss-Legendre??
Gauss-Chebyshev??
Gauss-Laguerre??
Gauss-Hermite??
n????????2n-1???????? Gauss ?????.
10????
11(No Transcript)
12??????(Legendre) -1,1 , ?(x)1 ???? P0(x)1
, P1(x)x,
13Legendre???
14????
?
Gauss-Laguerre??(???0,8),?????)
15The road to wisdom? Well, its plain and simple
to express Err and err and err again but
less and less and less PIET HEIN, Grooks(1966)