chpter 5 1
TRANSCRIPT
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 1/31
by Lale Yurttas, Texas A&M University
Chapter 5 1
Copyright © The McGraw-Hill Companies, Inc. Permission required or reproduction or display.
Chapter 5NUMERICAL
INTEGRATION &DIFFERENTIATION :
NEWTON-COTESINTEGRATION FORMULAS
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 2/31
2
Numerica Di!ere"tiati#"a"$ I"te%rati#"
• Calculus is the mathematics of change. Becauseengineers must continuously deal with systemsand processes that change, calculus is anessential tool of engineering.
• Standing in the heart of calculus are themathematical concepts of diferentiation and
integration :
x x f x x f
dxdy
x x f x x f
x y
ii x
ii
∆−∆+=
∆−∆+=
∆∆
∆)()(
lim
)()(
0
∫ =b
a
dx x f I )(
Di erentiation Integration
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 3/31
by Lale Yurttas, Texas A&M University
Chapter 5 3
Figure PT6.2
The integralis e ui!alentto the areaunder the
cur!e.
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 4/31
by Lale Yurttas, Texas A&M University
Chapter 5 4
Ne t#"-C#te' I"te%rati#"F#rmu a'
• "ost common numerical integrationschemes.
• They are #ased on the strategy ofreplacing a complicated function orta#ulated data with an appro$imating
function that is easy to integrate:
nn
nnn
b
an
b
a
xa xa xaa x f
dx x f dx x f I
++++=
≅=
−−
∫ ∫ 1
110)(
)()(
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 5/31
by Lale Yurttas, Texas A&M University
Chapter 5 5
Figure 21.1
Si"% e 'trai%hti"e Si"% e para(# a
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 6/31
by Lale Yurttas, Texas A&M University
Chapter 5 6
Three straightline segments
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 7/31
T)E TRA*E+OIDAL RULE• The %rst of the &ewton'Cotes closed
integration formulas.• Corresponds to the case where the
polynomial is %rst order:
• The area under this %rst order polynomial isan estimate of the integral of (x) #etween the limits of a and b :
∫ ∫ ≅=b
a
b
a
dx x f dx x f I )()( 1
2
)()()(
b f a f ab I +−=
Trapezoidal rule
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 8/31
by Lale Yurttas, Texas A&M University
Chapter 5 !
Figure 21.4
(raphicalillustration of thetrape)oidal rule.
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 9/31
by Lale Yurttas, Texas A&M University
Chapter 5 "
• *hen we employ the integral under astraight line segment to appro$imate theintegral under a cur!e, error may #esu#stantial:
where $ lies somewhere in the inter!alfrom a to b .
3))((121 ab f E t −′′−= ξ
Err#r #, the Trape #i$aRu e
Truncation error
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 10/31
E.amp e /
+se trape)oidal rule to numericallyintegrate
f $- /.0 1 02$ 3 0//$ 0 1 452$ 6 37//$ 8 1 8//$ 2
from a / to # /.9. The e$act !alueof the integral can #e determinedanalytically to #e .48/266
by Lale Yurttas, Texas A&M University
Chapter 5 1#
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 11/31
by Lale Yurttas, Texas A&M University
Chapter 5 11
f(x) = 0.2 + 25x – 200x 2 + 675x 3 – 900x 4 + 400x 5
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 12/31
12
• ;ne way to impro!e the accuracy of thetrape)oidal rule is to di!ide the integrationinter!al from a to # into a num#er of segmentsand apply the method to each segment.
• The areas of indi!idual segments can then #eadded to yield the integral for the entire inter!al.
Su#stituting the trape)oidal rule for each integralyields:
∫ ∫ ∫ −
+++=
==−=
n
n
x
x
x
x
x
x
n
dx x f dx x f dx x f I
xb xan
abh
1
2
1
1
0
)()()(
0
2)()(
2)()(
2)()( 12110 nn x f x f
h x f x f
h x f x f
h I ++++++= −
The Mu tip e-App icati#"Trape #i$a Ru e
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 13/31
by Lale Yurttas, Texas A&M University
Chapter 5 13
Figure 21.8
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 14/31
by Lale Yurttas, Texas A&M University Chapter 5 14
• Can #e o#tained #y summing theindi!idual errors for each segment:
Thus, if the num#er of segments n- isdou#led, the truncation error will #euartered.
f nab
E
f ni f
a ′′−−=
′′≅′′
∑2
3
12)(
)(ξ
rr#r # e u p e-App icati#"
Trape #i$a Ru e
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 15/31
E.amp e 0
+se the two segment trape)oidal ruleto estimate the integral of f $- /.0 1 02$ 3 0//$ 0 1 452$ 6 37//$ 8 1 8//$ 2
from a / to # /.9. The e$act !alueof the integral can #e determinedanalytically to #e .48/266
by Lale Yurttas, Texas A&M University Chapter 5 15
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 16/31
by Lale Yurttas, Texas A&M University Chapter 5 16
SIM*SON1S RULES• "ore accurate estimate of an integral is
o#tained if a high'order polynomial is usedto connect the points.
• The formulas that result from ta<ing theintegrals under such polynomials are calledSimpson’s rules .
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 17/31
by Lale Yurttas, Texas A&M University Chapter 5 1
!impson"s #$% rule$parab%la %nne tin' 3 p%ints(
!impson"s %$& rule$ ubi e)uati%n %nne tin' 4 p%ints(
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 18/31
Simp'#"1' /23 Ru e'
• =esults when a second'orderinterpolating polynomial is used.
by Lale Yurttas, Texas A&M University Chapter 5 1!
[ ]2
)()(4)(3
)())((
))(()(
))(())((
)())((
))((
210
21202
101
2101
200
2010
21
20
2
0
abh 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
xb xa
x
x
−=++≅
−−−−+
−−−−+
−−−−=
==
∫
Simp !"# 1$3 %ule
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 19/31
1"
*Single segment application of Simpson>s ?6rule has a truncation error of:
*Simpson>s ?6 rule is more accurate thantrape)oidal rule.
ba f ab
E t ξ ξ )(2880
)( )4(5−
−=
Err#r #, the Simp'#"1' /23Ru e
by Lale Yurttas, Texas A&M University Chapter 5
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 20/31
E.amp e 3
+se the Simpson@s ?6 rule to estimate theintegral of f $- /.0 1 02$ 3 0//$ 0 1 452$ 6 3 7//$ 8 1 8//$ 2
from a / to # /.9. The e$act !alue of theintegral can #e determined analytically to #e
.48/266
by Lale Yurttas, Texas A&M University Chapter 5 2#
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 21/31
by Lale Yurttas, Texas A&M University Chapter 5 21
• Aust as the trape)oidal rule, Simpson>s rule can#e impro!ed #y di!iding the integration inter!alinto a num#er of segments of e ual width.
• ields accurate results and considered superiorto trape)oidal rule for most applications.• However , it is limited to cases where !alues are
e uispaced.
• Further , it is limited to situations where thereare an e!en num#er of segments and oddnum#er of points.
The Mu tip e-App icati#"Simp'#"1' /23 Ru e
nab
h −
=
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 22/31
22
• Total integral:
• Su#stituting the Simpson>s ?6 rule foreach 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)(
26
)()(4)(2
12
432210
nnn x f x f x f h
x f x f x f h
x f x f x f h I
++++
+++++=
−−
by Lale Yurttas, Texas A&M University Chapter 5
# #
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 23/31
by Lale Yurttas, Texas A&M University Chapter 5 23
• Can #e o#tained #y summing theindi!idual errors for each segment.
• The estimated error:
)4(4
5
180)(
f nab
E a−−=
rr#r # e u p e-App icati#"
Simp'#"1' /23 Ru e
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 25/31
E.amp e 4
+se the multiple'application Simpson@s ?6 rulewith n 8 to estimate the integral of f $- /.0 1 02$ 3 0//$ 0 1 452$ 6 3 7//$ 8 1 8//$ 2
from a / to # /.9. The e$act !alue of theintegral can #e determined analytically to #e
.48/266
by Lale Yurttas, Texas A&M University Chapter 5 25
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 26/31
26
• +tili)es when the num#er of segments isodd.
[ ]
3)(
)()(3)(3)(83
)()(
3210
3
abh
x f x f x f x f h
I
dx x f dx x f I b
a
b
a
−=
+++≅
≅= ∫ ∫
Simp'#"1' 32 Ru e
Simp !"# 3$8 %ule
by Lale Yurttas, Texas A&M University Chapter 5
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 27/31
Err#r #, the Simp'#"1'32 Ru e
• stimated error:
• The 6?9 rule is more accurate thanthe ?6 rule.
by Lale Yurttas, Texas A&M University Chapter 5 2
)(6480
)( )4(5
ξ f ab
E t −−=
&!re ' ur' e
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 28/31
E.amp e 5
a- +se the Simpson@s 6?9 rule to estimate theintegral of f $- /.0 1 02$ 3 0//$ 0 1 452$ 6 37//$ 8 1 8//$ 2
from a / to # /.9. The e$act !alue of theintegral can #e determined analytically to #e
.48/266.#- +se it in con unction with Simpson>s ?6 rule to
integrate the same function for %!e segments.
by Lale Yurttas, Texas A&M University Chapter 5 2!
8/9/2019 chpter 5 1
http://slidepdf.com/reader/full/chpter-5-1 29/31
by Lale Yurttas, Texas A&M University Chapter 5 2"
Simpson>s ?6 and6?9 rules can #e
applied in tandem tohandle multipleapplications with oddnum#ers of inter!als.