Professional Documents
Culture Documents
% %
&* ' = +,
Closed vs. Open formulas
Closed forms are those where data points at the beginning and
end of the limits of integration are known.
Open forms have integration limits that extend beyond the range
of the data.
% %
& / −& ,
&* ' = &(,) + (' − ,)
/−,
Trapezoidal rule
The area under this straight
line is an estimate of the
+
integral of !(#) between ! & −! %
' ≅ )! % + # − % .#
limits of % and &. &−%
*
! % +! &
' ≅ (& − %)
2
Area of the trapezoid?
The trapezoidal rule is equivalent
to approximating the area of the
trapezoid under the straight line.
2 ) +2 /
! ≅ (/ − )) ×
2
Newton-Cotes closed formulas
In fact, all Newton-Cotes closed formulas can be expressed in a
general format of the ”area of trapezoid”. They differ only with
respect to how we calculate the average height.
1 ))
!" = − ( ̅ (+)(- − .)/
12
Example
Use the trapezoidal rule to numerically integrate
! 6 +! 5
2 ≅ (5 − 6) ×
2
! 0 + ! 0.8
2 ≅ (0.8 − 0) ×
2
0.2 + 0.232
2 ≅ 0.8× = 0.1728
2
Example: Truncating error
We need the function’s second derivative over the interval.
1 /
!0 = − −60 0.8 = 2.56
12
)−+
ℎ=
,
Multiple-application trapezoidal rule
#−%
ℎ=
&
)+ )0
' = ( , - .- + ( , - .- + ⋯
)* )+
, -2 + , -3 , -3 + , -5
'=ℎ +ℎ +⋯
2 2
, -2 + 2 ∑;<3
9:3 , -9 + , -;
' = (# − %)
2&
Multiple-application trapezoidal rule
( )* + 2 ∑120
./0 ( ). + ( )1
! = ($ − &)
23
What about the error?
An estimate for the local
truncating error of a
multiple-application of the
trapezoidal rule is
1 (( − ))+ 00
!" = − -
/̅
12 ,
Example
Use the two-segment trapezoidal rule to numerically integrate
0.8 − 0
ℎ= = 0.4
2
! "9 + 2 ∑>?=
;<= ! "; + ! ">
4 = (6 − 7)
2@
! 0 + 2! 0.4 + ! 0.8
4 = 0.8 = 1.0688
4
Example: Truncating error
We need the function’s second derivative over the interval.
1 0.8 − 0 +
!" = − −60 = 0.64
12 2-
3 points 4 points
Simpson’s 1/3 rules
Simpson’s 1/3 rule results when 3 points
a second-order interpolating
polynomial is used with
!" , !$ , and !( .
. .
* = , / ! 0! ≅ , /( ! 0!
- -
24
! − !$ ! − !( ! − !" ! − !(
*= , / !" + / !$ 0!
!" − !$ !" − !( !$ − !" !$ − !(
23
Simpson’s 1/3 rules
% %
!
+-
' − '1 ' − '* ' − '2 ' − '*
= #. & '2 + & '1
'2 − '1 '2 − '* '1 − '2 '1 − '*
+,
' − '2 ' − '1
+ & '* / ('
'* − '2 '* − '1
Simpson’s 1/3 rules
( )* + 4( )- + ((). )
! = ($ − &)
6
($ − &)2 (7)
01 = − (̅
2880
Example
Use the Simpson’s 1/3 rule to numerically integrate
( )* + 4 ∑450
./0,2,3 ( ). + 2 ∑ 458
7/8,9,: ( )7 + (()4 )
! = ($ − &)
3<
Multi-Application Simpson’s 1/3 rules
The error can also be estimated as
2 = 4 (ℎ = 0.2)
! 0 = 0.2
! 0.2 = 1.288
! 0.4 = 2.456
! 0.6 = 3.464
! 0.8 = 0.232
Example
! " = 0.2 + 25" − 200" * + 675" - − 900" / + 400" 1
! "7 + 4 ∑=>;
9:;,-,1 ! "9 + 2 ∑ =>*
?:*,/,@ ! "? + !("= )
2 = (4 − 5)
3B
4−5 1 0.81
EF = − /
!̅ /
=− /
−2400 = 0.017067
180B 180 4
Simpson’s 3/8 rules
Similarly, if we fit a third-order
polynomial to four points, it’s
called Simpson’s 3/8 rule.
( )* + 3( )- + 3( ). + ( )/
! = ($ − &)
8
($ − &)3 (8)
12 = − (̅
6480
Example
Use Simpson’s 3/8 rule to numerically integrate
! 0 = 0.2
! 0.2667 = 1.432724
! 0.5333 = 3.487177
! 0.8 = 0.232
Example
! " = 0.2 + 25" − 200" * + 675" - − 900" / + 400" 1