Download presentation
Presentation is loading. Please wait.
1
Elements of Numerical Integration
Sec:4.3 Elements of Numerical Integration
2
Sec:4.3 Elements of Numerical Integration
How to integrate a definite integral of a function that has no explicit antiderivative or whose antiderivative is not easy to obtain. ๐ ๐ ๐ ๐ ๐
๐
3
Sec:4.3 Elements of Numerical Integration
The Trapezoidal Rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐ โ=๐โ๐ Simpsonโs Rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ โ โ=(๐โ๐)/2 The midpoint Rule ๐ ๐ ๐ฅ 0 ๐=๐(๐) How to use MATLAB Derivation ๐ ๐ ๐ ๐ฅ ๐๐ฅ =๐๐๐ ๐ ๐ + ๐ ๐ ๐ ๐ โฒโฒ ๐ โ=(๐โ๐)/2 ๐ฅ 0 =(๐+๐)/2
4
Sec:4.3 Elements of Numerical Integration
Example The Trapezoidal Rule Approximate the integral using the Trapezoidal rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐ 0 2 ๐ฅ 2 ๐๐ฅ โ=๐โ๐ ๐ ๐ฅ = ๐ฅ 2 ,โ=2, ๐=0,๐=2 0 2 ๐ฅ 2 ๐๐ฅ โ ๐ ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ (๐) ๐+๐ โ๐
5
Sec:4.3 Elements of Numerical Integration
Example Simpsonโs Rule Approximate the integral using the Simpsonโs rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ โ 0 2 ๐ฅ 2 ๐๐ฅ โ=(๐โ๐)/2 ๐ ๐ฅ = ๐ฅ 2 ,โ=1, ๐ฅ 0 =0, ๐ฅ 1 =1, ๐ฅ 2 =2 0 2 ๐ฅ 2 ๐๐ฅ โ ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐ ๐ +๐๐ ๐ +๐ ๐ ๐ฅ 0 =0 ๐ฅ 1 =1 ๐ฅ 2 =2 โ ๐ ๐ ๐+๐+๐ โ ๐ ๐ It is exact
6
Sec:4.3 Elements of Numerical Integration
Example The midpoint Rule Approximate the integral using the midpoint rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ =๐๐๐ ๐ ๐ + ๐ ๐ ๐ ๐ โฒโฒ ๐ 0 ๐ 4 sinโก(๐ฅ) ๐๐ฅ โ=(๐โ๐)/2 ๐ฅ 0 =(๐+๐)/2 ๐ ๐ ๐ฅ 0 ๐=๐(๐) ๐ ๐ฅ =sinโก(๐ฅ),โ= ๐ 8 , ๐=0, ๐= ๐ 4 ๐ฅ 0 = ๐ 8 , 0 ๐ 4 sinโก(๐ฅ)๐๐ฅ โ ๐( ๐ 8 ) ๐ ๐ 8 ๐=0 ๐ฅ 0 = ๐ 8 ๐= ๐ 4 โ๐.๐๐๐๐๐๐๐๐
7
Sec:4.3 Elements of Numerical Integration
The Trapezoidal Rule f x^2; a=0; b=2; h=b-a; intg = (h/2)*(f(a)+f(b)) ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐ โ=๐โ๐ Simpsonโs Rule f x^2; a=0; b=2; h=(b-a)/2; x=a:h:b; intg = (h/3)*(f(x(1))+4*f(x(2))+f(x(3))) ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ โ โ=(๐โ๐)/2 The midpoint Rule f sin(x); a=0; b=pi/4; h=(b-a)/2; x0= =(b+a)/2; intg = 2*h*f(x0) ๐ ๐ ๐ ๐ฅ ๐๐ฅ =๐๐๐ ๐ ๐ + ๐ ๐ ๐ ๐ โฒโฒ ๐ โ=(๐โ๐)/2 ๐ฅ 0 =(๐+๐)/2
8
Sec:4.3 Elements of Numerical Integration
Example Simpsonโs Rule โ=(๐โ๐)/2 Approximate the integral using the Simpsonโs rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ โ 0 2 ๐ฅ 2 ๐๐ฅ Definition The degree of precision (or accuracy) of integral formula is n if and only if the error is zero for all polynomials ๐ 0 ๐ฅ =1, ๐ 1 ๐ฅ =๐ฅ, ๐ 2 ๐ฅ = ๐ฅ 2 ,โฏ, ๐ ๐ ๐ฅ = ๐ฅ ๐ but is not zero for the polynomial ๐ ๐+1 ๐ฅ = ๐ฅ ๐+1 ๐ ๐ฅ = ๐ฅ 2 ,โ=1, ๐ฅ 0 =0, ๐ฅ 1 =1, ๐ฅ 2 =2 0 2 ๐ฅ 2 ๐๐ฅ โ ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐ ๐ +๐๐ ๐ +๐ ๐ โ ๐ ๐ It is exact The approximation from Simpson's rule is exact because its truncation error involves ๐ ๐ ๐ โ , which is identically 0 when ๐ ๐ฅ = ๐ฅ 2 Remark the degree of precision of Simpsonโs rule is 3. The integral of any polynomial of degree 3 or less is exact when using Simpsonโs rule
9
How to find degree of precision
Sec:4.3 Elements of Numerical Integration Definition Definition The degree of precision (or accuracy) of integral formula is n if and only if the error is zero for all polynomials ๐ 0 ๐ฅ =1, ๐ 1 ๐ฅ =๐ฅ, ๐ 2 ๐ฅ = ๐ฅ 2 ,โฏ, ๐ ๐ ๐ฅ = ๐ฅ ๐ but is not zero for the polynomial ๐ ๐+1 ๐ฅ = ๐ฅ ๐+1 Find the degree of precision of the formula โ๐ ๐ ๐(๐) ๐
๐โ๐ โ ๐ ๐ +๐( ๐ ๐ ) solution function: Exact: Use the formula: โ๐ ๐ ๐ ๐
๐=๐ ๐ โ ๐ ๐ +๐ ๐ ๐ =๐+๐=๐ ๐ ๐ =๐ How to find degree of precision function: Exact: Use the formula: โ๐ ๐ ๐ ๐
๐=๐ ๐ โ ๐ ๐ +๐ ๐ ๐ =โ ๐ ๐ + ๐ ๐ =๐ ๐ ๐ =๐ ๐ ๐ =๐ ๐ ๐ ๐ ๐
๐ ๐ ๐ ๐ ๐
๐ โ๐ ๐ ๐ ๐ ๐
๐ = ๐ ๐ ๐ โ ๐ ๐ +๐ ๐ ๐ = ๐ ๐ + ๐ ๐ = ๐ ๐ ๐ ๐ = ๐ ๐ ๐ ๐ =๐ ๐ ๐ ๐ ๐
๐ ๐ ๐ ๐ ๐
๐ โ๐ ๐ ๐ ๐ ๐
๐ =๐ ๐ โ ๐ ๐ +๐ ๐ ๐ =โ ๐ ๐ + ๐ ๐ =๐ ๐ ๐ = ๐ ๐ ๐ ๐ = ๐ ๐ ๐ ๐ ๐ ๐ ๐
๐ ๐ ๐ ๐ ๐ ๐
๐ โ๐ ๐ ๐ ๐ ๐
๐ = ๐ ๐ ๐ โ ๐ ๐ +๐ ๐ ๐ = ๐ ๐ + ๐ ๐ = ๐ ๐ ๐ ๐ = ๐ ๐ โฎ โฎ โฎ the degree of precision is 3.
10
Derivation Sec:4.3 Elements of Numerical Integration
Weighted Mean Value Theorem for Integrals Suppose f โ C[a, b], the Riemann integral of g exists on [a, b], and g(x) does not change sign on [a, b]. Then there exists a number c in (a, b) with The Trapezoidal Rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐ โ=๐โ๐ ๐ ๐ ๐ ๐ฅ ๐ ๐ฅ ๐๐ฅ=๐(๐) ๐ ๐ ๐ ๐ฅ ๐๐ฅ
11
Sec:4.3 Elements of Numerical Integration
Derivation for The Trapezoidal Rule using first Lagrange polynomials ๐ฅ 0 =๐ ๐ฅ 1 =๐ โ=๐โ๐ ๐ ๐ฅ = ๐ ๐ ๐ + ๐น ๐ (๐) ๐ ๐ฅ =๐ ๐ ๐ ๐ณ ๐ (๐)+๐ ๐ ๐ ๐ณ ๐ (๐)+ ๐ โฒโฒ ๐ ๐! (๐โ ๐ ๐ )(๐โ ๐ ๐ ) ๐ ๐ฅ =๐ ๐ ๐ ๐โ ๐ ๐ ๐ ๐ โ ๐ ๐ +๐ ๐ ๐ ๐โ ๐ ๐ ๐ ๐ โ ๐ ๐ + ๐ โฒโฒ ๐ ๐! (๐โ ๐ ๐ )(๐โ ๐ ๐ ) ๐ ๐ ๐ ๐ฅ ๐๐ฅ =๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ณ ๐ ๐ ๐
๐ +๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ณ ๐ ๐ ๐
๐+ ๐ ๐ ๐ ๐ ๐ โฒโฒ ๐ ๐! (๐โ ๐ ๐ )(๐โ ๐ ๐ ) dx ๐ ๐ ๐ ๐ฅ ๐๐ฅ = 1 2 โ ๐ ๐ ๐ +๐ ๐ ๐ + ๐ ๐ ๐ ๐ ๐ โฒโฒ ๐ ๐! (๐โ ๐ ๐ )(๐โ ๐ ๐ ) dx ๐ ๐ ๐ ๐ ๐ณ ๐ ๐ ๐
๐= ๐ ๐ ๐ ๐ ๐โ ๐ ๐ ๐ ๐ โ ๐ ๐ ๐
๐= ๐ โ๐ ๐ ๐ ๐ ๐ ๐โ ๐ ๐ ๐
๐= โ ๐ ๐ ๐โ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ = โ ๐ ๐ ๐โ ๐ ๐ ๐ ๐ = ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ณ ๐ ๐ ๐
๐= ๐ ๐ ๐ ๐ ๐โ ๐ ๐ ๐ ๐ โ ๐ ๐ ๐
๐= ๐ ๐ ๐ ๐ ๐ ๐ ๐โ ๐ ๐ ๐
๐= ๐ ๐ ๐โ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ = ๐ ๐ ๐ ๐ ๐ ๐ โ๐ = ๐ ๐ ๐
12
Sec:4.3 Elements of Numerical Integration
Error for The Trapezoidal Rule The Trapezoidal Rule Weighted Mean Value Theorem for Integrals Suppose f โ C[a, b], the Riemann integral of g exists on [a, b], and g(x) does not change sign on [a, b]. Then there exists a number c in (a, b) with ๐ ๐ ๐ ๐ฅ ๐๐ฅ = 1 2 โ ๐ ๐ ๐ +๐ ๐ ๐ + ๐ ๐ ๐ ๐ ๐ โฒโฒ ๐ ๐! (๐โ ๐ ๐ )(๐โ ๐ ๐ ) dx ๐ ๐ ๐ ๐ ๐ โฒโฒ ๐ ๐! (๐โ ๐ ๐ )(๐โ ๐ ๐ ) dx = ๐ ๐ ๐ ๐ ๐ ๐ ๐ โฒโฒ ๐(๐) (๐โ ๐ ๐ )(๐โ ๐ ๐ ) dx ๐ ๐ ๐ ๐ฅ ๐ ๐ฅ ๐๐ฅ=๐(๐) ๐ ๐ ๐ ๐ฅ ๐๐ฅ The Weighted Mean Value Theorem for Integrals = ๐ โฒโฒ ๐ ๐ ๐ ๐ ๐ ๐ (๐โ ๐ ๐ )(๐โ ๐ ๐ ) dx = ๐ โฒโฒ ๐ ๐ โ ๐ ๐ ๐ ==โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐ The Trapezoidal Rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = 1 2 โ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐
13
Derivation Sec:4.3 Elements of Numerical Integration Simpsonโs Rule
๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ โ โ=(๐โ๐)/2
14
Sec:4.3 Elements of Numerical Integration
Simpsonโs Rule Derivation using second Lagrange polynomials ๐ฅ 0 =๐ ๐ฅ 1 = ๐ฅ 0 +โ ๐ฅ 2 =๐ ๐ ๐ฅ = ๐ ๐ ๐ + ๐น ๐ (๐) ๐ ๐ฅ =๐ ๐ ๐ ๐ณ ๐ (๐)+๐ ๐ ๐ ๐ณ ๐ (๐)+๐ ๐ ๐ ๐ณ ๐ (๐)+ ๐ โฒโฒโฒ ๐ ๐! (๐โ ๐ ๐ )(๐โ ๐ ๐ ) (๐โ ๐ ๐ ) ๐ ๐ ๐ ๐ฅ ๐๐ฅ =๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ณ ๐ ๐ ๐
๐ +๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ณ ๐ ๐ ๐
๐ฅ+๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ณ ๐ ๐ ๐
๐+ ๐ ๐ ๐ ๐ ๐ โฒโฒโฒ ๐ ๐! (๐โ ๐ ๐ )(๐โ ๐ ๐ )(๐โ ๐ ๐ )dx = ๐ ๐ ๐ ๐ ๐ + ๐ ๐ ๐ ๐ ๐ + ๐ ๐ ๐ ๐ ๐ + ๐ ๐ ๐ ๐ ๐ โฒโฒโฒ ๐ ๐! (๐โ ๐ ๐ )(๐โ ๐ ๐ )(๐โ ๐ ๐ )dx ๐ ๐ = ๐ ๐ ๐ ๐ ๐ณ ๐ ๐ ๐
๐= ๐ ๐ ๐ ๐ = ๐ ๐ ๐ ๐ ๐ณ ๐ ๐ ๐
๐= ๐๐ ๐ ๐ ๐ = ๐ ๐ ๐ ๐ ๐ณ ๐ ๐ ๐
๐= ๐ ๐ Simpsonโs Rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐ ๐ ๐ + ๐ ๐ ๐ ๐ ๐ โฒโฒโฒ ๐ ๐! (๐โ ๐ ๐ )(๐โ ๐ ๐ )(๐โ ๐ ๐ )dx Deriving Simpsonโs rule in this manner, however, provides only an ๐( โ 4 ) error term involving ๐โฒโฒโฒ (๐).
15
Sec:4.3 Elements of Numerical Integration
approaching the problem in another way, a higher-order term ๐ฅ 0 =๐ ๐ฅ 1 = ๐ฅ 0 +โ ๐ฅ 2 =๐ Third Taylor polynomial ๐ ๐ฅ =๐ ๐ฅ 1 + ๐ โฒ ( ๐ฅ 1 ) ๐ฅโ ๐ฅ ๐ โฒ โฒ( ๐ฅ 1 ) 2 ๐ฅโ ๐ฅ ๐ โฒ โฒโฒ( ๐ฅ 1 ) 6 ๐ฅโ ๐ฅ ๐ (๐) (๐) ๐๐ ๐โ ๐ ๐ ๐ ๐ฅ 0 ๐ฅ 2 ๐ ๐ฅ ๐๐ฅ = ๐ฅ 0 ๐ฅ 2 ๐ ๐ฅ 1 + ๐ โฒ ( ๐ฅ 1 ) ๐ฅโ ๐ฅ ๐ โฒ โฒ( ๐ฅ 1 ) 2 ๐ฅโ ๐ฅ ๐ โฒ โฒโฒ( ๐ฅ 1 ) 6 ๐ฅโ ๐ฅ ๐๐ฅ + ๐ ๐ ๐ ๐ ๐ (๐) (๐) ๐๐ ๐โ ๐ ๐ ๐ ๐
๐ ๐ ๐ ๐ ๐ ๐ โฒ ( ๐ ๐ ) ๐โ ๐ ๐ ๐
๐ =๐ ๐ฅ 0 ๐ฅ ๐ โฒ โฒโฒ( ๐ฅ 1 ) 6 ๐ฅโ ๐ฅ ๐๐ฅ=0 ๐ฅ 0 ๐ฅ 2 ๐ ๐ฅ ๐๐ฅ = ๐ฅ 0 ๐ฅ 2 ๐ ๐ฅ ๐ โฒ โฒ( ๐ฅ 1 ) 2 ๐ฅโ ๐ฅ ๐๐ฅ + ๐ ๐ ๐ ๐ ๐ (๐) (๐) ๐๐ ๐โ ๐ ๐ ๐ ๐
๐
16
Sec:4.3 Elements of Numerical Integration
๐ฅ 0 ๐ฅ 2 ๐ ๐ฅ ๐๐ฅ = ๐ฅ 0 ๐ฅ 2 ๐ ๐ฅ ๐ โฒ โฒ( ๐ฅ 1 ) 2 ๐ฅโ ๐ฅ ๐๐ฅ + ๐ ๐ ๐ ๐ ๐ (๐) (๐) ๐๐ ๐โ ๐ ๐ ๐ ๐
๐ =2โ๐ ๐ฅ โ 3 3 ๐โฒโฒ ๐ฅ ๐ ๐ ๐ ๐ ๐ (๐) (๐) ๐๐ ๐โ ๐ ๐ ๐ ๐
๐ ๐ โฒโฒ ๐ ๐ = ๐ ๐ ๐ โ๐๐ ๐ ๐ +๐( ๐ ๐ ) ๐ ๐ โ ๐ ๐ ๐๐ ๐ ๐ ( ๐ ๐ ) Using centered difference formaula for =2โ๐ ๐ฅ โ ๐ ๐ ๐ โ๐๐ ๐ ๐ +๐( ๐ ๐ ) ๐ ๐ โ ๐ ๐ ๐๐ ๐ ๐ ( ๐ ๐ ) + ๐ ๐ ๐ ๐ ๐ (๐) (๐) ๐๐ ๐โ ๐ ๐ ๐ ๐
๐ =2โ๐ ๐ฅ 1 + โ 3 ๐ ๐ ๐ โ๐๐ ๐ ๐ +๐( ๐ ๐ ) โ โ 3 ๐ ๐ ๐๐ ๐ ๐ ( ๐ ๐ ) + ๐ ๐ ๐ ๐ ๐ (๐) (๐) ๐๐ ๐โ ๐ ๐ ๐ ๐
๐ = โ 3 ๐๐ ๐ ๐ +๐ ๐ ๐ โ๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ( ๐ ๐ ) + ๐ ๐ ๐ ๐ ๐ (๐) (๐) ๐๐ ๐โ ๐ ๐ ๐ ๐
๐ ๐ฅ 0 ๐ฅ 2 ๐ฅโ ๐ฅ ๐๐ฅ = = ๐ฅโ ๐ฅ ๐ฅ 0 ๐ฅ 2 = 2 โ 5 5 The Weighted Mean Value Theorem for Integrals = โ 3 ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ( ๐ ๐ ) + ๐ (๐) (๐) ๐๐ ๐ ๐ ๐ ๐ ๐โ ๐ ๐ ๐ ๐
๐ = โ 3 ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ ๐ + ๐ ๐ ๐๐ ๐ ๐ ๐ = โ 3 ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ โ
17
Sec:4.3 Elements of Numerical Integration
Notice that in each instance Simpsonโs Rule is significantly superior. Simpsonโs Rule The Trapezoidal Rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ โ ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐
18
Sec:4.3 Elements of Numerical Integration
The Trapezoidal Rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐ The Trapezoidal and Simpson's rules are examples of a class of methods known as closed Newton-cotes methods. โ=๐โ๐ Simpsonโs Rule In the formula information in the endpoints are used ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ โ โ=(๐โ๐)/2 The midpoint Rule The midpoint rules is an example of a class of methods known as open Newton-cotes methods. ๐ ๐ ๐ ๐ฅ ๐๐ฅ =๐๐๐ ๐ ๐ + ๐ ๐ ๐ ๐ โฒโฒ ๐ In the formula information in the endpoints are not used โ=(๐โ๐)/2 ๐ฅ 0 =(๐+๐)/2
19
Sec:4.3 Elements of Numerical Integration
The Trapezoidal Rule (2pts) Simpsonโs Rule (3pts) ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐ ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ โ ๐ ๐ฅ โ๐ ๐ ๐ ๐ณ ๐ (๐)+โฏ+๐ ๐ ๐ ๐ณ ๐ (๐) ๐= ๐โ๐ ๐ ๐ ๐ฅ โ ๐=0 ๐ ๐ ๐ ๐ ๐ณ ๐ (๐) ๐ฅ 0 ๐ฅ ๐ ๐ ๐ฅ ๐๐ฅ โ ๐=0 ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ณ ๐ (๐)๐
๐ ๐ฅ 0 ๐ฅ ๐ ๐ ๐ฅ ๐๐ฅ โ ๐=0 ๐ ๐ ๐ ๐ ๐ ๐ Closed Newton-Cotes Formulas The (n+1)-point closed Newton-Cotes formula
20
๐น ๐น ๐น Sec:4.3 Elements of Numerical Integration
Closed Newton-Cotes Formulas The (n+1)-point closed Newton-Cotes formula ๐ฅ 0 ๐ฅ ๐ ๐ ๐ฅ ๐๐ฅ = ๐=0 ๐ ๐ ๐ ๐ ๐ ๐ + ๐น ๐ ๐ = ๐ ๐ ๐ ๐ ๐ณ ๐ (๐)๐
๐ = ๐ ๐ ๐ ๐ ๐=๐ ๐โ ๐ ๐ (๐โ ๐ ๐ ) ( ๐ ๐ โ ๐ ๐ ) ๐
๐ where Theorem 4.2 There exists ๐โ ๐,๐ such that ๐ is odd ๐ is even ๐น = โ ๐+2 ๐ ๐+1 (๐) ๐+1 ! 0 ๐ ๐ก (๐กโ1)โฏ ๐กโ๐ ๐๐ก ๐น = โ ๐+3 ๐ ๐+2 (๐) ๐+2 ! 0 ๐ ๐ก 2 (๐กโ1)โฏ ๐กโ๐ ๐๐ก the degree of precision is ๐ the degree of precision is ๐+1 The Trapezoidal Rule (2pts, n=1) Simpsonโs Rule (3pts, n=2) ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐ ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ โ
21
๐น Sec:4.3 Elements of Numerical Integration
n=1 : The Trapezoidal Rule The (n+1)-point closed Newton-Cotes formula ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐ ๐ ๐๐ ๐ โฒโฒ ๐ ๐ฅ 0 ๐ฅ ๐ ๐ ๐ฅ ๐๐ฅ = ๐=0 ๐ ๐ ๐ ๐ ๐ ๐ + ๐น n=2 : Simpsonโs Rule It is called closed because the endpoints are included as nodes. ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐ ๐ ๐๐ ๐ ๐ ๐ n = 3: Simpsonโs Three-Eighths rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐๐ ๐ ๐ ๐ ๐ +๐๐ ๐ ๐ +๐๐ ๐ ๐ +๐( ๐ ๐ ) โ ๐๐ ๐ ๐๐ ๐ ๐ ๐ n = 4: ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐๐ ๐๐ ๐๐ ๐ ๐ +๐๐๐ ๐ ๐ +๐๐๐ ๐ ๐ +๐๐๐ ๐ ๐ +๐๐( ๐ ๐ ) โ ๐๐ ๐ ๐๐๐ ๐ ๐ ๐
22
๐น Sec:4.3 Elements of Numerical Integration Open Newton-Cotes Formulas
๐= ๐โ๐ ๐+๐ The open Newton-Cotes formulas do not include the endpoints as nodes. Open Newton-Cotes Formulas ๐ฅ โ1 ๐ฅ ๐+1 ๐ ๐ฅ ๐๐ฅ = ๐=0 ๐ ๐ ๐ ๐ ๐ ๐ + ๐ ๐ = ๐ โ๐ ๐ ๐+๐ ๐ณ ๐ (๐)๐
๐ = ๐ โ๐ ๐ ๐+๐ ๐=๐ ๐โ ๐ ๐ (๐โ ๐ ๐ ) ( ๐ ๐ โ ๐ ๐ ) ๐
๐ ๐น where
23
๐น ๐น ๐น Sec:4.3 Elements of Numerical Integration
Open Newton-Cotes Formulas ๐ฅ โ1 ๐ฅ ๐+1 ๐ ๐ฅ ๐๐ฅ = ๐=0 ๐ ๐ ๐ ๐ ๐ ๐ + ๐ ๐ = ๐ โ๐ ๐ ๐+๐ ๐ณ ๐ (๐)๐
๐ = ๐ โ๐ ๐ ๐+๐ ๐=๐ ๐โ ๐ ๐ (๐โ ๐ ๐ ) ( ๐ ๐ โ ๐ ๐ ) ๐
๐ ๐น where Theorem 4.2 There exists ๐โ ๐,๐ such that ๐ is odd ๐ is even ๐น = โ ๐+2 ๐ ๐+1 (๐) ๐+1 ! โ1 ๐+1 ๐ก (๐กโ1)โฏ ๐กโ๐ ๐๐ก ๐น = โ ๐+3 ๐ ๐+2 (๐) ๐+2 ! โ1 ๐+1 ๐ก 2 (๐กโ1)โฏ ๐กโ๐ ๐๐ก n=1 : n=0 : The midpoint Rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐๐ ๐ ๐ ๐ โฒโฒ ๐ ๐ ๐ ๐ ๐ฅ ๐๐ฅ =๐๐๐ ๐ ๐ + ๐ ๐ ๐ ๐ โฒโฒ ๐
24
๐น Sec:4.3 Elements of Numerical Integration Open Newton-Cotes Formulas
n=0 : The midpoint Rule ๐ ๐ ๐ ๐ฅ ๐๐ฅ =๐๐๐ ๐ ๐ + ๐ ๐ ๐ ๐ โฒโฒ ๐ ๐ฅ โ1 ๐ฅ ๐+1 ๐ ๐ฅ ๐๐ฅ = ๐=0 ๐ ๐ ๐ ๐ ๐ ๐ + ๐น n=1 : ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐๐ ๐ ๐ ๐ ๐ +๐ ๐ ๐ โ ๐๐ ๐ ๐ ๐ โฒโฒ ๐ n = 2: ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐๐ ๐ ๐๐ ๐ ๐ โ๐ ๐ ๐ +๐๐ ๐ ๐ โ ๐๐๐ ๐ ๐๐ ๐ ๐ ๐ n = 3: ๐ ๐ ๐ ๐ฅ ๐๐ฅ = ๐๐ ๐๐ ๐๐๐ ๐ ๐ +๐ ๐ ๐ +๐ ๐ ๐ +๐๐๐ ๐ ๐ โ ๐๐๐ ๐ ๐๐๐ ๐ ๐ ๐
25
Sec:4.3 Elements of Numerical Integration
Example
26
Sec:4.3 Elements of Numerical Integration
Example
27
Sec:4.3 Elements of Numerical Integration
28
Sec:4.3 Elements of Numerical Integration
summary
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.