Introduction to scientific Computing A Matrix Vector Approach Using Matlab Written by Charles FVan Loan 陈文斌 Wbchen(fudan. edu. cn 复日大学
Introduction to Scientific Computing -- A Matrix Vector Approach Using Matlab Written by Charles F.Van Loan 陈 文 斌 Wbchen@fudan.edu.cn 复旦大学
Numerical Integration The Newton -Cotes rules Composite rules Adaptive Quadrature Special Topics Shared Memory Adaptive Quadrature
Numerical Integration • The Newton-Cotes Rules • Composite Rules • Adaptive Quadrature • Special Topics • Shared Memory Adaptive Quadrature
An m-point quadrature rule q for the definite integral b I=I f(x)dx is an approximation of the form Q=(b-a∑wf(x) k=1 weights abscissas Efficiency essentially depends upon the number offunction evaluations
= b a I f (x)dx An m-point quadrature rule Q for the definite integral is an approximation of the form = = − m k k k Q b a w f x 1 ( ) ( ) abscissas weights Efficiency essentially depends upon the number of function evaluations
The Newton-Cotes rules p(x)≈f(x) b p(x)x≈f( x)ax C M-point Newton-Cotes rule NC(m QPm(rdx where pm-l)interpolates f(x)at X.=a+ (b-a)
The Newton-Cotes Rules p(x) f (x) p x dx f x dx b a b a ( ) ( ) M-point Newton-Cotes rule Q p x dx b a NC m = m− ( ) ( ) 1 where pm-1 (x) interpolates f(x) at b a i m m i xi a ( ), 1: 1 1 − = − − = +
m=2 trapezoidal rule QC(2)=f(a)+ f(b)-∫(a) x-a b (b-af(a)+f(b) m=3 and c=(a+b/2 Simpsonrule f(b) -f(c f(c)-f(a) C x-a)+ 6-cc-a NC(3) x-ax-c c-a b-a a)+4/a+b f(b 2
m=2 trapezoidal rule = − + − − − = + ( ) 2 1 ( ) 2 1 ( ) ( ) ( ) ( ) ( ) (2) b a f a f b x a dx b a f b f a Q f a b a NC m=3 and c=(a+b)/2 Simpson rule + + + − = − − − − − − − − − + − − = + ( ) 2 ( ) 4 6 ( )( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) (3) f b a b f a f b a x a x c dx b a c a f c f a b c f b f c x a c a f c f a Q f a b a NC