Beruflich Dokumente
Kultur Dokumente
A&M University
Chapter 5 1
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
NUMERICAL INTEGRATION &
DIFFERENTIATION :
NEWTON-COTES
INTEGRATION FORMULAS
2
Numerical Differentiation and
Integration
Calculus is the mathematics of change. Because engineers must
continuously deal with systems and processes that change,
calculus is an essential tool of engineering.
Standing in the heart of calculus are the mathematical concepts
of differentiation and integration:
x
x f x x f
dx
dy
x
x f x x f
x
y
i i
x
i i
A
A +
=
A
A +
=
A
A
A
) ( ) (
lim
) ( ) (
0
}
=
b
a
dx x f I ) (
Differentiation Integration
by Lale Yurttas, Texas
A&M University
Chapter 5 3
Figure PT6.2
The integral is
equivalent to the
area under the
curve.
by Lale Yurttas, Texas
A&M University
Chapter 5 4
Newton-Cotes Integration Formulas
Most common numerical integration schemes.
They are based on the strategy of replacing a
complicated function or tabulated data with an
approximating function that is easy to integrate:
n
n
n
n n
b
a
n
b
a
x a x a x a a x f
dx x f dx x f I
+ + + + =
~ =
} }
1
1 1 0
) (
) ( ) (
=
n
n
x
x
x
x
x
x
n
dx x f dx x f dx x f I
x b x a
n
a b
h
1
2
1
1
0
) ( ) ( ) (
0
2
) ( ) (
2
) ( ) (
2
) ( ) (
1 2 1 1 0 n n
x f x f
h
x f x f
h
x f x f
h I
+
+ +
+
+
+
=
The Multiple-Application
Trapezoidal Rule
by Lale Yurttas, Texas
A&M University
Chapter 5 13
Figure 21.8
by Lale Yurttas, Texas
A&M University
Chapter 5 14
Can be obtained by summing the individual errors for
each segment:
Thus, if the number of segments (n) is doubled, the
truncation error will be quartered.
f
n
a b
E
f n i f
a
' '
=
' '
~
' '
2
3
12
) (
) (
Error of the Multiple-Application
Trapezoidal Rule
Use the two segment trapezoidal rule to estimate
the integral of
f(x) = 0.2 + 25x 200x
2
+ 675x
3
900x
4
+ 400x
5
from a = 0 to b = 0.8. The exact value of the
integral can be determined analytically to be
1.640533
by Lale Yurttas, Texas
A&M University
Chapter 5 15
by Lale Yurttas, Texas
A&M University
Chapter 5 16
More accurate estimate of an integral is obtained if a
high-order polynomial is used to connect the points.
The formulas that result from taking the integrals
under such polynomials are called Simpsons rules.
by Lale Yurttas, Texas
A&M University
Chapter 5 17
Simpsons 1/3 rule
(parabola connecting 3 points)
Simpsons 3/8 rule
(cubic equation connecting 4 points)
Results when a second-order interpolating
polynomial is used.
by Lale Yurttas, Texas
A&M University
Chapter 5 18
| |
2
) ( ) ( 4 ) (
3
) (
) )( (
) )( (
) (
) )( (
) )( (
) (
) )( (
) )( (
2 1 0
2
1 2 0 2
1 0
1
2 1 0 1
2 0
0
2 0 1 0
2 1
2 0
2
0
a b
h x f x f x f
h
I
dx x f
x x x x
x x x x
x f
x x x x
x x x x
x f
x x x x
x x x x
I
x b x a
x
x
= + + ~
(
+
+
=
= =
}
Simpsons 1/3 Rule
19
Single segment application of Simpsons 1/3 rule has a
truncation error of:
Simpsons 1/3 rule is more accurate than trapezoidal rule.
b a f
a b
E
t
) (
2880
) (
) 4 (
5
=
Error of the Simpsons 1/3 Rule
by Lale Yurttas, Texas
A&M University
Chapter 5
Use the Simpson's 1/3 rule to estimate the integral of
f(x) = 0.2 + 25x 200x
2
+ 675x
3
900x
4
+ 400x
5
from a = 0 to b = 0.8. The exact value of the integral
can be determined analytically to be 1.640533
by Lale Yurttas, Texas
A&M University
Chapter 5 20
by Lale Yurttas, Texas
A&M University
Chapter 5 21
Just as the trapezoidal rule, Simpsons rule can be
improved by dividing the integration interval into a
number of segments of equal width.
Yields accurate results and considered superior to
trapezoidal rule for most applications.
However, it is limited to cases where values are
equispaced.
Further, it is limited to situations where there are an
even number of segments and odd number of points.
The Multiple-Application
Simpsons 1/3 Rule
n
a b
h
=
22
Total integral:
Substituting the Simpsons 1/3 rule for each integral
yields:
} } }
+ + + =
n
n
x
x
x
x
x
x
dx x f dx x f dx x f I
2
4
2
2
0
) ( ) ( ) (
6
) ( ) ( 4 ) (
2
6
) ( ) ( 4 ) (
2
6
) ( ) ( 4 ) (
2
1 2
4 3 2 2 1 0
n n n
x f x f x f
h
x f x f x f
h
x f x f x f
h I
+ +
+ +
+ +
+
+ +
=
=
+ + + ~
~ =
} }
Simpsons 3/8 Rule
by Lale Yurttas, Texas
A&M University
Chapter 5
Estimated error:
The 3/8 rule is more accurate than the 1/3 rule.
by Lale Yurttas, Texas
A&M University
Chapter 5 27
) (
6480
) (
) 4 (
5
f
a b
E
t
=
More accurate
a) Use the Simpson's 3/8 rule to estimate the integral
of f(x) = 0.2 + 25x 200x
2
+ 675x
3
900x
4
+ 400x
5
from a = 0 to b = 0.8. The exact value of the integral
can be determined analytically to be 1.640533.
b) Use it in conjunction with Simpsons 1/3 rule to
integrate the same function for five segments.
by Lale Yurttas, Texas
A&M University
Chapter 5 28
by Lale Yurttas, Texas
A&M University
Chapter 5 29
Simpsons 1/3 and 3/8
rules can be applied in
tandem to handle
multiple applications with
odd numbers of intervals.
INTEGRATION WITH UNEQUAL
SEGMENTS
In practice, many situations where does not based on
equally spaced data points and must deal with unequal-
sized segments.
For example: experimental data.
For these cases:
i. Apply the trapezoidal rule to each segment and sum
the results.
ii. Apply appropriate Simpson's rule for these
segments make sure equal length for each segments.
by Lale Yurttas, Texas
A&M University
Chapter 5 30
The information in table 1 was
generated using
f(x) = 0.2 + 25x 200x
2
+ 675x
3
900x
4
+ 400x
5
from a = 0 to b = 0.8.
a)Use trapezoidal rule to integral this
data.
b)Use Simpsons rules for those
segments where they are
appropriate.
by Lale Yurttas, Texas
A&M University
Chapter 5 31
x f(x)
0.0 0.200000
0.12 1.309729
0.22 1.305241
0.32 1.743393
0.36 2.074903
0.40 2.456000
0.44 2.842985
0.54 3.507297
0.64 3.181929
0.70 2.363000
0.80 0.232000
Table 1