4.3 Numerical Integrationzxu2/acms40390F11/sec4-3-Numerical_integration.pdf6 Open Newton-Cotes...

7
1 4.3 Numerical Integration Numerical quadrature: Numerical method to compute ∫ () approximately by a sum ( ) . The interpolation nodes are given as: ( ( )) ( ( )) ( ( )) ( ( )) Here By Lagrange Interpolation Theorem (Thm 3.3): () ∑ ( ) () ( )( ) () () (()) (1) ∫ () ∑ ( ) () ( ) ∫ ( ) ( ) () (()) Quadrature formula: ∫ () ( ) with () . Error: () () ( ) ( ) () (()) ()

Transcript of 4.3 Numerical Integrationzxu2/acms40390F11/sec4-3-Numerical_integration.pdf6 Open Newton-Cotes...

Page 1: 4.3 Numerical Integrationzxu2/acms40390F11/sec4-3-Numerical_integration.pdf6 Open Newton-Cotes Formula See Figure 4. Let ; and for . This implies . Theorem 4.3 Suppose that ∑ ( )

1

4.3 Numerical Integration

Numerical quadrature: Numerical method to compute ∫ ( )

approximately by a sum ∑ ( )

.

The interpolation nodes are given as:

( ( ))

( ( ))

( ( ))

( ( ))

Here By Lagrange Interpolation Theorem (Thm 3.3):

( ) ∑ ( ) ( )

( ) ( )

( ) ( )( ( )) (1)

∫ ( )

∫ ∑ ( ) ( )

( ) ∫ ( ) ( ) ( )( ( ))

Quadrature formula: ∫ ( )

∑ ( )

with ∫ ( )

.

Error: ( )

( ) ∫ ( ) ( ) ( )( ( ))

𝑃𝑁(𝑥)

Page 2: 4.3 Numerical Integrationzxu2/acms40390F11/sec4-3-Numerical_integration.pdf6 Open Newton-Cotes Formula See Figure 4. Let ; and for . This implies . Theorem 4.3 Suppose that ∑ ( )

2

The Trapezoidal Rule (obtained by first Lagrange interpolating polynomial)

Let ; and (see Figure 1)

∫ ( )

∫ [ ( )

( ) ( )

( )]

∫ ( )( )

( )( ( ))

Thus

∫ ( )

[ ( ) ( )]

( )( )

.

Error term

Note: for Trapezoidal rule.

Figure 1 Trapezoidal Rule

Page 3: 4.3 Numerical Integrationzxu2/acms40390F11/sec4-3-Numerical_integration.pdf6 Open Newton-Cotes Formula See Figure 4. Let ; and for . This implies . Theorem 4.3 Suppose that ∑ ( )

3

The Simpson’s (1/3) Rule (error obtained by third Taylor polynomial)

Let

; and

(see Figure 2)

( ) ( ) ( )( ) ( )

( )

( )

( )

( )( )

( )

∫ ( )

∫ ( ( ) ( )( ) ( )

( )

( )

( )

( )( ( ))

( )

)

( )

( )

( )( )

Now approximate ( )

[ ( ) ( ) ( )]

( )( )

Thus

∫ ( )

( ( ) ( ) ( ))

( )( )

Error term

Note:

for Simpson’s rule.

Figure 2 Simpson's Rule

𝑥 𝑎 𝑥 𝑥 𝑏

𝑝(𝑥)

𝑓(𝑥)

Page 4: 4.3 Numerical Integrationzxu2/acms40390F11/sec4-3-Numerical_integration.pdf6 Open Newton-Cotes Formula See Figure 4. Let ; and for . This implies . Theorem 4.3 Suppose that ∑ ( )

4

Precision

Definition: The degree of accuracy or precision of a quadrature formula is the largest positive integer such that the formula

is exact for , for each .

; ∫

[ ] Trapezoidal rule is exact for (or ).

=

. ∫

[ ]

. Trapezoidal rule is exact for .

. ∫

[ ]

Trapezoidal rule is NOT exact for .

Remark: The degree of precision of a quadrature formula is if and only if the error is zero for all polynomials of degree

, but is NOT zero for some polynomial of degree .

Closed Newton-Cotes Formulas

Let and

. for .

∫ ( )

∑ ( )

with ∫ ( )

.

Here ( ) is the ith Lagrange base polynomial of degree N.

Trapezoidal rule has degree of accuracy one.

Simpson’s rule has degree of accuracy three.

Figure 3 Closed Newton-Cotes Formulas

𝑃𝑁(𝑥)

Page 5: 4.3 Numerical Integrationzxu2/acms40390F11/sec4-3-Numerical_integration.pdf6 Open Newton-Cotes Formula See Figure 4. Let ; and for . This implies . Theorem 4.3 Suppose that ∑ ( )

5

Theorem 4.2 Suppose that ∑ ( ) is the (n+1)-point closed Newton-Cotes formula with and

.

There exists ( ) for which ∫ ( )

∑ ( )

( )( )

( ) ∫ ( ) ( )

,

if is even and [ ], and

∫ ( )

∑ ( )

( )( )

( ) ∫ ( ) ( )

if is odd and [ ].

Remark: is even, degree of precision is is odd, degree of precision is

Examples. N=1: Trapezoidal rule; N=2: Simpson’s rule.

N=3: Simpson’s Three-Eighths rule

∫ ( )

( ( ) ( ) ( ) ( ))

( )( ) where ;

.

a=x-1

xn

f(x)

x0 b=x

n+1

Figure 4 Open Newton-Cotes Formula

𝑃𝑛(𝑥)

Page 6: 4.3 Numerical Integrationzxu2/acms40390F11/sec4-3-Numerical_integration.pdf6 Open Newton-Cotes Formula See Figure 4. Let ; and for . This implies . Theorem 4.3 Suppose that ∑ ( )

6

Open Newton-Cotes Formula

See Figure 4. Let

; and for . This implies .

Theorem 4.3 Suppose that ∑ ( ) is the (n+1)-point open Newton-Cotes formula with and

. There exists ( ) for which ∫ ( )

∑ ( )

( )( )

( ) ∫ ( ) ( )

,

if is even and [ ], and

∫ ( )

∑ ( )

( )( )

( ) ∫ ( ) ( )

if is odd and [ ].

Examples of open Newton-Cotes formulas

n=0: Midpoint rule (Figure 5)

∫ ( )

( )

( )( )

where .

a=x

-1

f(x)

x0

0

b=x1

Figure 5 Midpoint rule

𝑝 (𝑥)

Page 7: 4.3 Numerical Integrationzxu2/acms40390F11/sec4-3-Numerical_integration.pdf6 Open Newton-Cotes Formula See Figure 4. Let ; and for . This implies . Theorem 4.3 Suppose that ∑ ( )

7

n=1: ∫ ( )

[ ( ) ( )]

( )( ) where .

n=2: ∫ ( )

[ ( ) ( ) ( )]

( )( ) where .