4.3 Numerical Integration Numerical quadrature ) (

advertisement
4.3 Numerical Integration
( )
Numerical quadrature: Numerical method to compute ∫
approximately by a sum ∑
( ) .
The interpolation nodes are given as:
𝑃𝑁 (𝑥)
(
( ))
(
( ))
(
( ))
…
(
Here
( )
∫
(
)
( )
( )
Quadrature formula: ∫
Error: ( )
∑
∫ (
( )
∫ ∑ ( )
( )
(
) (
(
)
(
)
(
)
)
( ) with
)
))
By Lagrange Interpolation Theorem (Thm 3.3):
( )
∑
)
(
(
(
)
∫
( ( ))
∫ (
( )
(1)
)
(
)
(
)
( ( ))
.
( ( ))
1
The Trapezoidal Rule (obtained by first Lagrange interpolating polynomial)
Let
; and
(see Figure 1)
Figure 1 Trapezoidal Rule
∫
( )
∫ [ ( )
(
)
( )
(
)
∫ (
]
)(
)
( )
( ( ))
Thus
∫
( )
[ (
)
(
)]
( )(
)
.
Error term
Note:
for Trapezoidal rule.
2
The Simpson’s (1/3) Rule (error obtained by third Taylor polynomial)
Let
; and
( )
( )
( )(
( )
𝑝(𝑥)
∫
( )
∫ ( ( )
( )
𝑓(𝑥)
( )
)
(
( )
)
( )(
)
𝑥
𝑎
𝑥
𝑥
( )
( )
)
(
( )
( ( ))
( )
( )
(
)
( )
(
(see Figure 2)
(
)
(
)
) )
( )
𝑏
Figure 2 Simpson's Rule
Now approximate
( )
[ ( )
( )
( )
( )]
( )
Thus
∫
( )
( (
)
(
)
(
))
( )
( )
Error term
Note:
for Simpson’s rule.
3
Precision
Definition: The degree of accuracy or precision of a quadrature formula is the largest positive integer
is exact for , for each
.
such that the formula
Trapezoidal rule has degree of accuracy one.
∫
∫
∫
=
[
∫
;
[
∫
.
.
]
Trapezoidal rule is exact for
]
.
[
∫
(or
).
Trapezoidal rule is exact for .
]
Trapezoidal rule is NOT exact for
.
Simpson’s rule has degree of accuracy three.
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
( )
Here
∑
( ) with
.
for
∫
( )
.
.
( ) is the ith Lagrange base polynomial of degree N.
Figure 3 Closed Newton-Cotes Formulas
4
Theorem 4.2 Suppose that ∑
(
There exists
if
( ) is the (n+1)-point closed Newton-Cotes formula with
) for which ∫
[
is even and
( )
∑
(
( )
(
∫
[
is odd and
Remark:
( )
)
∫
(
)
and
(
.
) ,
], and
(
if
)
( )
∑
( )
(
)
( )
)
∫
(
)
(
)
].
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
;
.
f(x)
𝑃𝑛 (𝑥)
a=x
-1
x
0
Figure 4 Open Newton-Cotes Formula
x
n
b=x
n+1
5
Open Newton-Cotes Formula
See Figure 4. Let
; and
for
Theorem 4.3 Suppose that ∑
(
. There exists
if
( )
∑
( )
( )
∫
[
is odd and
(
(
)
( )
)
(
∫
and
)
(
( )
( )
) ,
], and
(
if
.
( ) is the (n+1)-point open Newton-Cotes formula with
) for which ∫
[
is even and
. This implies
∑
( )
)
(
( )
)
∫
(
)
(
)
].
Examples of open Newton-Cotes formulas
n=0: Midpoint rule (Figure 5)
∫
( )
( )
f(x)
where
.
𝑝 (𝑥)
x
a=x
-1
0
b=x
0
1
Figure 5 Midpoint rule
6
n=1: ∫
( )
[ ( )
n=2: ∫
( )
[
( )
( )]
( )
( )
( ) where
( )]
( )
.
( ) where
.
7
Download