Beruflich Dokumente
Kultur Dokumente
INTEGRATION:
NEWTON COTEs
FORMULAS
GROUP MEMBERS
Muhammad Saad Qureshi
Athar Minallah
Faizan Shahid
Arslan Ahmed
Najam Tariq
http://numericalmethods.eng.usf.e
du
LIST OF TOPICS TO BE COVERED
Trapezoidal Rule & its Error Analysis
Simpsons 1/3 Rule & its Error Analysis
Simpsons 3/8 Rule & its Error Analysis
EXAMPLES !
http://numericalmethods.eng.usf.e
du
What is Numerical
Integration
Integration:
The process of
measuring the area
under a function plotted
on a graph.
b
I f ( x )dx
a
Where:
f(x) is the integrand
a= lower limit of
integration
b= upper limit of
integration
Newton cotes
integration
formula
Trapezoidal
Rule
SAAD QURESHI
Basis of Trapezoidal
Rule
Trapezoidal Rule is based on the Newton-Cotes
Formula that states if one can approximate the
integrand as an nth order polynomial
b
I f ( x)dx
where
f ( x ) fn( x )
and
f n ( x ) a0 a1 x ... an 1 x n 1 an x n
http://numericalmethods.eng.
usf.edu
Basis of Trapezoidal
Rule
f ( a ) f ( b )
(
b
a
)
f ( x )dx
2
http://numericalmethods.eng.
usf.edu
Derivation of the Trapezoidal
Rule
f ( x)dx Area of
a
trapezoid
1
( Avgheight )( width)
2
1
f ( b ) f ( a )( b a )
2
f ( a ) f ( b )
( b a )
Example 1
The vertical distance covered by a rocket from t=8
to t=30 seconds is given by:
140000
x 2000 ln
9
.
8
t
dt
140000 2100t
8
30
Solution
a)
f (a) f (b)
I (b a )
a 8
b 30
140000
f ( t ) 2000 ln
9.8t
140000 2100t
140000
f ( 8 ) 2000 ln
9.8( 8 )
140000 2100( 8 )
177.27 m / s
140000
9.8( 30 ) 901.67 m / s
140000 2100( 30 )
f ( 30 ) 2000 ln
10
Solution (cont)
177.27 901.67
I ( 30 8 )
a)
11868 m
x 2000 ln
9
.
8
t
dt
140000 2100t
8
30
11061 m
11
Solution (cont)
b)
I f ( x )dx
a
f ( x )dx
a
ah
f ( x )dx
a ( n 2 )h
a ( n 1 ) h
ba
f
(
a
)
2
f ( x )dx
2n
f
(
a
ih
)
f
(
b
)
i 1
n 1
14
f ( x )dx
Example 2
140000
x 2000 ln
9.8t dt
140000 2100t
15
Solution
ba
I
f
(
a
)
2n
n2
n 1
i 1
f ( a ih ) f ( b )
a8
ba
30 8
h
n
2
b 30
11
16
Solution (cont)
Then:
30 8
I
f
(
8
)
2( 2 )
2 1
i 1
f ( a ih ) f ( 30 )
22
f ( 8 ) 2 f ( 19 ) f ( 30 )
4
22
177.27 2( 484.75 ) 901.67
4
11266 m
17
Solution (cont)
140000
x 2000 ln
9
.
8
t
dt 11061 m
140000 2100t
Newton cotes
integration
formula
ATHAR
Error analysis of
Trapezoidal
rule
20
Example on Error
Analysis
http://numericalmethods.eng.usf.e
du
21
Newton cotes
integration
formula
Simpsons
1/3 Rule
FAIZAN SHAHID
Introduction:
Mathematical Explanation:
mathematical explanation:
(Simple Or Single Segment Case)
Choose
a b a b
,f
2
2
( a , f ( a )),
and
( b , f ( b ))
f ( a ) f 2 ( a ) a0 a1a a 2 a
a b
a b
a b
a b
f
2
0
1
2
2
2
2
2
f ( b ) f 2 ( b ) a 0 a1b a 2 b 2
Solving the previous equations for a0, a1 and a2 give
a0
a1
a b
2
abf ( a ) b f ( a )
2
2
a 2ab b 2
a b
3af ( b ) 3bf ( a ) 4bf
bf ( b )
2
2
2
a 2ab b
a b
f(a) 2 f
f ( b )
2
a 2 2ab b 2
a 2 f ( b ) abf ( b ) 4abf
a b
af ( a ) 4af
2
a2
mathematical explanation:
(Simple Or Single Segment Case)
Then
I f 2 ( x )dx
a
a0 a1 x a 2 x 2 dx
b
x2
x3
a0 x a1 a 2
2
3 a
b2 a2
b3 a3
a0 ( b a ) a1
a2
2
3
f 2 ( x )dx
ba
a b
f
(
a
)
4
f
f
(
b
)
6
2
a
Hence
Since for Simpsons 1/3rd Rule, the interval [a, b] is broken into 2 segments, the
segment width
ba
2
f 2 ( x )dx f ( a ) 4 f
3
a b
f ( b )
2
Example:
(Simple Or two Segment Case)
Consider
the definite integral in interval [1,2].
Solve for using Simpson's 1/3 rule for function by using simple
or 2 segment case:
SOLUTION: We know that for two segment case, the Simpsons 1/3
Rule is known as,
Where, it is given:
Example:
(Simple Or two Segment Case)
Now,
we calculate as,
mathematical explanation:
(multiple Segment Case)
0
2
equal segments,
hence
the segment
width.
xn 2
xn
Where,
.... f ( x )dx f ( x )dx
xn 4
. . .
xn 2
f ( x0 ) 4 f ( x1 ) f ( x2 )
...
f ( x )dx ( x2 x0 )
a
f ( x2 ) 4 f ( x3 ) f ( x4 )
( x 4 x 2 )
...
6
x
x0
x2
xn
-2
xn
mathematical explanation:
(multiple Segment Case)
f ( xn 4 ) 4 f ( x n 3 ) f ( xn 2 )
f ( xn 2 ) 4 f ( xn 1 ) f ( xn )
... ( xn 2 xn 4 )
...
(
x
x
)
n
n
6
6
Since
x i xi 2 2 h
i 2 , 4, ..., n
Then
b
f ( x0 ) 4 f ( x1 ) f ( x2 )
...
f ( x2 ) 4 f ( x3 ) f ( x4 )
2h
...
f ( x )dx 2h
f ( x n 4 ) 4 f ( xn 3 ) f ( x n 2 )
...
f ( xn 2 ) 4 f ( xn 1 ) f ( xn )
2h
2h
mathematical explanation:
(multiple Segment Case)
h
3
n 1
n2
h
f ( x 0 ) 4 f ( xi ) 2 f ( xi ) f ( x n )
3
i 1
i 2
i
odd
i
even
n 1
n 2
ba
f ( x 0 ) 4 f ( xi ) 2 f ( xi ) f ( x n )
3n
i 1
i 2
i
odd
i
even
example:
(multiple Segment Case)
Consider
the definite integral in interval [1,2].
n 1
n2
h
f for
SOLUTION: We knowthat
the
( x0 )multiple
4 f ( xisegment
) 2 f ( xcase,
i ) f ( xn )
3
1
i 2
Simpsons 1/3 Rule is known
as, i i odd
i
even
Where,
example:
(multiple Segment Case)
We
know that,
Calculating
points and their function values,
POINTS:
FUNCTION
POINTS:
FUNCTION VALUES:
VALUES:
example:
(multiple Segment Case)
Putting
the values in the function,
Newton cotes
integration
formula
Simpsons
3/8 Rule
ARSLAN AHMED
Formula
Derivation
using matrixes
using lagrange interpolation
Not to discuss here
140,000
I 2000 ln
9.8 x dx,
140,000 2100 x
a 8
7.3333
40
3usf.edu 3
140000
x0 8 f x0 2000 ln
9.8 8 177 .2667
140000 2100 8
x1 x0 h 8 7.3333 15.3333
140000
http://numericalmethods.eng.
usf.edu
41
x2 x0 2h 8 2(7.3333) 22.6666
140000
f
x
2000
ln
x3 x0 3h 8 3(7.3333) 30
140000
f
x
2000
ln
140000 2100 30
http://numericalmethods.eng.
usf.edu
42
43
3
Example 2 (Multiple segments Simpson
8
b 30
rule)
140,000
ComputeI 2000 ln
9.8 x dx,
140,000 2100 x
a 8
sing Simple
8multiple segments rule, with numbe
of
"h) "segments = n= 6 (which corresponds to 2
big segments).
http://numericalmethods.eng.
usf.edu
44
Solution
In this example, one has (see Eq. 14):
30 8
h
3.6666
6
x0 , f x0 8,177.2667
x3 , f x3 19,484.7455; where x3 x0 3h 19
http://numericalmethods.eng.
usf.edu
45
46
3
I 3.6666 177 .2667 3 f xi 3 f xi 2 f xi 901 .6740
8
i 1, 4,..
i 2,5,..
i 3,6,..
177 .2667 3 270 .4104 608 .8976 3 372 .4629 746 .9870
I 1.3750
2
484
.
7455
901
.
6740
I 11,601 .4696
http://numericalmethods.eng.
usf.edu
47
x0 a 8
x1 x0 1h 8 3.1429 11 .1429
x4 x0 4h 8 4 3.1429 20.5714
x5 x0 5h 8 5 3.1429 23.7143
x6 x0 6h 8 6 3.1429 26.8571
x7 x0 7 h 8 http://numericalmethods.eng.
7 3.1429 30
usf.edu
48
140,000
f x0 8 2000 ln
9.8 8 177 .2667
140,000 2100 8
Similarly:
f x4 536 .3909
f x5 646 .8260
f x6 767 .9978
f x7 901 .6740
http://numericalmethods.eng.
usf.edu
49
h
I1 f x0 4 f xi 2 f xi f xn1
3
i 1,3,...
i 2,...
3.1429
I1
177 .2667 4 256 .5863 435 .2749 2 342 .3241 536 .3909
3
I1 4364 .1197
http://numericalmethods.eng.
usf.edu
50
3h
I2
f x0 3 f xi 3 f xi 2 f xi f xn1
8
i 1,3,...
i 2,...
i 3 , 6 ,...
I 2 3.1429 177 .2667 3 256 .5863 3 342 .3241 skip! 435 .2749
8
I 2 6697 .2748
51
Remarks:
(a) Comparing the truncated error of Simpson 1/3 ru
Et
b a
2880
(18)
With Simple 3/8 rule (See Eq. 13), the latter seems
offer slightly more accurate answer than the former
However, the cost associated with Simpson 3/8 rule
(using 3rd order polynomial function) is significant
higher than the one associated with Simpson 1/3 ru
http://numericalmethods.eng.
(using 2nd order polynomial
function). 52
usf.edu
h
f x0 4 f x1 f x2 f x2 4 f x3 f x4 ..... f xn 2 4 f xn 1 f xn
3
I1
n 1
n2
h
I 2 f x0 4 f xi 2 f xi f xn
3
i 1,3,...
i 2, 4, 6...
http://numericalmethods.eng.
usf.edu
(19)
53
http://numericalmethods.eng.
usf.edu
54