Presentation is loading. Please wait.

Presentation is loading. Please wait.

Elements of Numerical Integration

Similar presentations


Presentation on theme: "Elements of Numerical Integration"โ€” Presentation transcript:

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


Download ppt "Elements of Numerical Integration"

Similar presentations


Ads by Google