This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Numerical Integration 119 Numerical Integration 1. Used to integrate a function that we do not know how it integrate by quadra
ture. For example, suppose we seek I = exp(\/a: + $3dzr 2. Used when we want to determine f: f (3:)da: and we have a set of pairs of
values of [53, f 100
g 80
N
‘3 60
<
.5 4°
'3' 20
U) O 0 10 20 30 40 50 6‘0 70 80 90 100 x (m)
One approach, which we will not consider in detail here, is to ﬁt a polynomial
to the integrand and then to integrate the polynomial analytically. The approach we follow here is to consider integration rules which provide a nu
merical approximation to the integral in terms of discrete values of the integrand
for a set of values of x. Rectangular Rule approximates the function by a set of rectangles and esti
mates the integral as the sum of the areas of the rectangles. z” n—l W 2 (33141 — “51 i=1 f(x ) f(x) VI? Trapezoidal Rule ,
The trapezoidal rule ﬁts a trapezoid to each successive pair of values of [33, f and estimates the integral as the sum of the areas of the trapezoids. 05(f(Xil + f(X;+ 1)) X i
F—hxi41—xIE—"l X By expanding f in each interval as a Taylor series we ﬁnd the error in the
approximate integral, ET is given by: E h3n—1 ll
T‘Eizzlf Where 77, is some value of X in the ith interval. Since the number of terms in the
sum is proportional to l/h7 smaller intervals result in less error. Tﬁf’JPEZatDﬂL. Evie Error —F 3
/ $(X‘k): +13, H. 'FﬂJwfﬂ. ) 1 i $76 é)?”
. _ I» —‘—T;)——ci +%¥II(XC)'+.H. A/Umber 07¢ in‘l'eM/qls ,‘3 L1 If Firm/é M‘ In, 042(24 ., I43 L+ ' s
Efq/ error i [bﬂﬂhé; M +003 123 nle Estimate 3  Usual Trapezoidal Rule c=§ﬂ<ﬂ> gs“; =;[f<—;)+f<s>]+;m>§+ ' 124 R€C+QN3 qlqr Rqu AbbreVI‘q f‘n'm 1:09;) E [:11 I: 2‘ 136009;}: r l:(/‘?)(X3 4(2) +1303 )(XLrXs)+ F()“+)(XS‘XH\ 7—fqu Zorqu qu/é .—. 5F, (x;jx.\ + 159.0342.) r P3 (1943) ’+ FL+(X5‘X*+) ’r J2554?“ “‘0 125 r113 Simpson’s Rule
Simpson’s rule ﬁts a parabola ( 2nd order polynomial) to each interval between
[11013 f and [ml+2, f (asi+2)] and estimates the integral as the sum of the areas under the parabolas. For Simpson’s Rule, the intervals [xi+1 — and [sci+2 — 2:141] must be equal and
the X—distance interval length is called A112. For three values of xi; a,a + Am,b
the integral is If f(:v)d2: s %[f(a) + 4f (a + M) + “b” Simpson’s Rule requires that there be an even number of intervals Which means
that there are an odd number of data pairs [:ci, f Then the integral is ap
proximated by the sum of the areas under the approximating parabolas as n—2 1:” z. 2 +f(xi+2)] z=1,3,5,... 3 For the usual case of equal spacing, Ax, of all the 23/8, Simpson’s Rule can be
expressed as: f(:v1)+f(:vn)+4 "i1 f(x¢)+2 "f ﬂan) i=2,4,6,... i=3,5,7,... j: f(:v)dcv e 3335 l 126 ...
View
Full Document
 Spring '07
 HenrikSchmidt

Click to edit the document details