Numerical Analysis. 10th ed. R L Burden, J D Faires, and A M Burden

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Numerical Analysis. 10th ed. R L Burden, J D Faires, and A M Burden"

Transcription

1 Numericl Anlysis 10th ed R L Burden, J D Fires, nd A M Burden Bemer Presenttion Slides Prepred by Dr. Annette M. Burden Youngstown Stte University July 9, 2015

2 Chpter 4.1: Numericl Differentition 1 Three-Point Formuls THREE-POINT ENDPOINT FORMULA f (x 0 ) = 1 2h [ 3f (x 0) + 4f (x 0 + h) f (x 0 + 2h)] + h2 3 f (3) (ξ 0 ), where ξ 0 lies between x 0 nd x 0 + 2h. THREE-POINT MIDPOINT FORMULA f (x 0 ) = 1 2h [f (x 0 + h) f (x 0 h)] h2 6 f (3) (ξ 1 ), where ξ 1 lies between x 0 h nd x 0 + h.

3 Chpter 4.1: Numericl Differentition 2 Five-Point Formuls FIVE-POINT MIDPOINT FORMULA f (x 0 ) = 1 12h [f (x 0 2h) 8f (x 0 h) + 8f (x 0 + h) f (x 0 + 2h)] + h4 30 f (5) (ξ), where ξ lies between x 0 2h nd x 0 + 2h. FIVE-POINT ENDPOINT FORMULA f (x 0 ) = where ξ lies between x 0 nd x 0 + 4h. 1 12h [ 25f (x 0) + 48f (x 0 + h) 36f (x 0 + 2h) + 16f (x 0 + 3h) 3f (x 0 + 4h)] + h4 5 f (5) (ξ),

4 Chpter 4.1: Numericl Differentition 3 SECOND DERIVATIVE MIDPOINT FORMULA f (x 0 ) = 1 h 2 [f (x 0 h) 2f (x 0 ) + f (x 0 + h)] h2 12 f (4) (ξ), for some ξ, where x 0 h < ξ < x 0 + h. If f (4) is continuous on [x 0 h, x 0 + h] it is lso bounded, nd the pproximtion is O(h 2 ). NOTE: It is prticulrly importnt to py ttention to round-off error when pproximting derivtives.

5 Chpter 4.1: Numericl Differentition 4 ERROR - INSTABILITY The totl error in the pproximtion, f (x 0 ) f (x 0 + h) f (x 0 h) 2h = e(x 0 + h) e(x 0 h) 2h h2 6 f (3) (ξ 1 ), is due both to round-off error, the first prt, nd to trunction error. If we ssume tht the round-off errors e(x 0 ± h) re bounded by some number ε > 0 nd tht the third derivtive of f is bounded by number M > 0, then f (x 0 ) f (x 0 + h) f (x 0 h) 2h ε h + h2 6 M. To reduce the trunction error, h 2 M/6, we need to reduce h. But s h is reduced, the round-off error ε/h grows. In prctice, then, it is seldom dvntgeous to let h be too smll, becuse in tht cse the round-off error will dominte the clcultions.

6 Chpter 4.2: Richrdson s Extrpoltion 5 Richrdson s extrpoltion is used to generte high-ccurcy results while using low-order formuls. Extrpoltion cn be pplied whenever it is known tht n pproximtion technique hs n error term with predictble form, one tht depends on prmeter, usully the step size h. Richrdson s Extrpoltion The YouTube video developed by Dougls Hrder cn serve s good illustrtion of the Richrdson s Extrpoltion for students. Richrdson s Extrpoltion Video

7 Chpter 4.3: Elements of Numericl Integrtion 6 The need often rises for evluting the definite integrl of function tht hs no explicit ntiderivtive or whose ntiderivtive is not esy to obtin. The bsic method involved in pproximting b f (x) dx is clled numericl qudrture. It uses sum n i=0 if (x i ) to pproximte b f (x) dx.

8 Chpter 4.3: Elements of Numericl Integrtion 7 Trpezoidl Rule b f (x) dx = h 2 [f (x 0) + f (x 1 )] h3 12 f (ξ). This is clled the Trpezoidl rule becuse when f is function with positive vlues, b f (x) dx is pproximted by the re in trpezoid, s shown in the figure below. y y 5 f (x) y 5 P 1 (x) 5 x 0 x 1 5 b x

9 Chpter 4.3: Elements of Numericl Integrtion 8 Trpezoidl Rule The YouTube video developed by Mthispower4u cn serve s good illustrtion of the Trpezoidl Rule for students. Trpezoidl Rule Video

10 Chpter 4.3: Elements of Numericl Integrtion 9 Simpson s Rule Simpson s rule results from integrting over [, b] the second Lgrnge polynomil with eqully-spced nodes x 0 =, x 2 = b, nd x 1 = + h, where h = (b )/2. x2 x 0 f (x) dx = h 3 [f (x 0) + 4f (x 1 ) + f (x 2 )] h5 90 f (4) (ξ). y y 5 f (x) y 5 P 2 (x) 5 x 0 x 1 x 2 5 b x

11 Chpter 4.3: Elements of Numericl Integrtion 10 Simpson s Rule The error term in Simpson s rule involves the fourth derivtive of f, so it gives exct results when pplied to ny polynomil of degree three or less. The YouTube video developed by Exm Solutions cn serve s good illustrtion of the Simpson s Rule for students. Simpson s Rule Video

12 Chpter 4.3: Elements of Numericl Integrtion 11 Definition 4.1 The degree of ccurcy, or precision, of qudrture formul is the lrgest positive integer n such tht the formul is exct for x k, for ech k = 0, 1,..., n. Definition 4.1 implies tht the Trpezoidl nd Simpson s rules hve degrees of precision one nd three, respectively. The degree of precision of qudrture formul is n if nd only if the error is zero for ll polynomils of degree k = 0, 1,..., n, but is not zero for some polynomil of degree n + 1. The Trpezoidl nd Simpson s rules re exmples of clss of methods known s Newton-Cotes formuls. There re two types of Newton-Cotes formuls, open nd closed.

13 Chpter 4.3: Elements of Numericl Integrtion 12 Closed Newton-Cotes Formuls The (n + 1)-point closed Newton-Cotes formul uses nodes x i = x 0 + ih, for i = 0, 1,..., n, where x 0 =, x n = b nd h = (b )/n. (See Figure) It is clled closed becuse the endpoints of the closed intervl [, b] re included s nodes. y y = f (x) y = P n (x) 5 x 0 x 1 x 2 x n21 x n 5 b x

14 Chpter 4.3: Elements of Numericl Integrtion 13 Theorem (4.2: Closed Newton-Cotes Formuls) Suppose tht n i=0 if (x i ) denotes the (n + 1)-point closed Newton-Cotes formul with x 0 =, x n = b, nd h = (b )/n. There exists ξ (, b) for which b f (x) dx = n i=0 i f (x i ) + hn+3 f (n+2) (ξ) (n + 2)! if n is even nd f C n+2 [, b], nd n 0 t 2 (t 1) (t n) dt, b f (x) dx = n i=0 i f (x i ) + hn+2 f (n+1) (ξ) (n + 1)! n 0 t(t 1) (t n) dt, if n is odd nd f C n+1 [, b].

15 Chpter 4.3: Elements of Numericl Integrtion 14 Common Closed Newton-Cotes Formuls n = 1: Trpezoidl rule where x 0 < ξ < x 1 x1 n = 2: Simpson s rule where x 0 < ξ < x 2 x2 x 0 x 0 f (x) dx = h 2 [f (x 0) + f (x 1 )] h3 12 f (ξ). f (x) dx = h 3 [f (x 0) + 4f (x 1 ) + f (x 2 )] h5 90 f (4) (ξ). n = 3: Simpson s Three-Eighths where x 0 < ξ < x 3 x3 x 0 n = 4: where x 0 < ξ < x 4 f (x) dx = 3h 8 [f (x 0) + 3f (x 1 ) + 3f (x 2 ) + f (x 3 )] 3h5 80 f (4) (ξ). x4 x 0 f (x) dx = 2h 45 [7f (x 0) + 32f (x 1 ) + 12f (x 2 ) + 32f (x 3 ) + 7f (x 4 )] 8h7 945 f (6) (ξ).

16 Chpter 4.3: Elements of Numericl Integrtion 15 Open Newton-Cotes Formuls The open Newton-Cotes formuls do not include the endpoints of [, b] s nodes. They use the nodes x i = x 0 + ih, for ech i = 0, 1,..., n, where h = (b )/(n + 2) nd x 0 = + h. This implies tht x n = b h, so we lbel the endpoints by setting x 1 = nd x n+1 = b, s shown in the figure. Open formuls contin ll the nodes used for the pproximtion within the open intervl (, b). y y = f (x) y = P n (x) 5 x 21 x 0 x 1 x 2 x n x n11 5 b x

17 Chpter 4.3: Elements of Numericl Integrtion 16 Common Open Newton-Cotes Formuls n = 0: Midpoint rule x 1 x 1 f (x) dx = 2hf (x 0 ) + h3 3 f (ξ), x 1 < ξ < x 1. n = 1: x 2 f (x) dx = 3h x 1 2 [f (x 0) + f (x 1 )] + 3h3 4 f (ξ), x 1 < ξ < x 2. n = 2: x3 f (x) dx x 1 = 4h 3 [2f (x 0) f (x 1 ) + 2f (x 2 )] + 14h5 45 f (4) (ξ), n = 3: x4 x 1 < ξ < x 3. x 1 f (x) dx = 5h 24 [11f (x 0) + f (x 1 ) + f (x 2 ) + 11f (x 3 )] h5 f (4) (ξ), x 1 < ξ < x 4.

18 Chpter 4.3: Elements of Numericl Integrtion 17 Theorem (4.3) Suppose tht n i=0 if (x i ) denotes the (n + 1)-point open Newton-Cotes formul with x 1 =, x n+1 = b, nd h = (b )/(n + 2). There exists ξ (, b) for which b f (x) dx = n i=0 i f (x i ) + hn+3 f (n+2) (ξ) (n + 2)! n+1 1 t 2 (t 1) (t n) dt, if n is even nd f C n+2 [, b], nd b f (x) dx = n i=0 i f (x i ) + hn+2 f (n+1) (ξ) (n + 1)! n+1 1 t(t 1) (t n) dt, if n is odd nd f C n+1 [, b].

19 Chpter 4.4: Composite Numericl Integrtion 18 Theorem (4.4) Let f C 4 [, b], n be even, h = (b )/n, nd x j = + jh, for ech j = 0, 1,..., n. There exists µ (, b) for which the Composite Simpson s rule for n subintervls cn be written with its error term s b f (x) dx = h f () (n/2) 1 j=1 n/2 f (x 2j ) + 4 f (x 2j 1 ) + f (b) b 180 h4 f (4) (µ). j=1

20 Chpter 4.4: Composite Numericl Integrtion 19 Choose n even integer n. Subdivide the intervl [, b] into n subintervls, nd pply Simpson s rule on ech consecutive pir of subintervls. (See Figure 4.7) y y 5 f (x) 5 x 0 x 2 x 2j22 x 2j21 x 2j b 5 x n x Figure: Figure 4.7

21 Chpter 4.4: Composite Numericl Integrtion 20 The error term for the Composite Simpson s rule is O(h 4 ), wheres it ws O(h 5 ) for the stndrd Simpson s rule. However, these rtes re not comprble becuse for stndrd Simpson s rule we hve h fixed t h = (b )/2, but for Composite Simpson s rule we hve h = (b )/n, for n n even integer. This permits us to considerbly reduce the vlue of h.

22 Chpter 4.4: Composite Numericl Integrtion 21 Algorithm 4.1: COMPOSITE SIMPSON S RULE To pproximte the integrl I = b f (x) dx: INPUT endpoints, b; even positive integer n. OUTPUT pproximtion XI to I. Step 1 Set h = (b )/n. Step 2 Set XI0 = f () + f (b); XI1 = 0; (Summtion of f (x 2i 1 ).) XI2 = 0. (Summtion of f (x 2i ).) Step 3 For i = 1,..., n 1 do Steps 4 nd 5. Step 4 Set X = + ih. Step 5 If i is even then set XI2 = XI2 + f (X) else set XI1 = XI1 + f (X). Step 6 Set XI = h(xi0 + 2 XI2 + 4 XI1)/3. Step 7 OUTPUT (XI); STOP.

23 Chpter 4.4: Composite Numericl Integrtion 22 Theorem (4.5) Let f C 2 [, b], h = (b )/n, nd x j = + jh, for ech j = 0, 1,..., n. There exists µ (, b) for which the Composite Trpezoidl rule for n subintervls cn be written with its error term s b f (x) dx = h n 1 f () + 2 f (x j ) + f (b) b 2 12 h2 f (µ). j=1 y y 5 f (x) 5 x 0 x 1 x j21 x j x n21 b 5 x n x Figure: Figure 4.8

24 Chpter 4.4: Composite Numericl Integrtion 23 Theorem (4.6) Let f C 2 [, b], n be even, h = (b )/(n + 2), nd x j = + (j + 1)h for ech j = 1, 0,..., n + 1. There exists µ (, b) for which the Composite Midpoint rule(see lso composite midpoint rule) for n + 2 subintervls cn be written with its error term s b n/2 f (x) dx = 2h f (x 2j ) + b 6 h2 f (µ). j=0 y y 5 f (x) 5 x 21 x 0 x 1 x 2j21 x 2j x 2j11 x n21 x n b 5 x n11 x

25 Chpter 4.5: Romberg Integrtion 24 Recll from Section 4.2 tht Richrdson extrpoltion cn be performed on ny pproximtion procedure whose trunction error is of the form m 1 K j h α j + O(h αm ), j=1 for collection of constnts K j nd when α 1 < α 2 < α 3 < < α m. In tht section we gve demonstrtions to illustrte how effective this techniques is when the pproximtion procedure hs trunction error with only even powers of h, tht is, when the trunction error hs the form. m 1 K j h 2j + O(h 2m ). j=1 Becuse the Composite Trpezoidl rule hs this form, it is n obvious cndidte for extrpoltion. This results in technique known s Romberg integrtion.

26 Chpter 4.5: Romberg Integrtion 25 To pproximte the integrl b f (x) dx we use the results of the Composite Trpezoidl Rule with n = 1, 2, 4, 8, 16,..., nd denote the resulting pproximtions, respectively, by R 1,1, R 2,1, R 3,1, etc. We then pply extrpoltion in the mnner given in Section 4.2, tht is, we obtin O(h 4 ) pproximtions R 2,2, R 3,2, R 4,2, etc, by R k,2 = R k, (R k,1 R k 1,1 ), for k = 2, 3,... Then O(h 6 ) pproximtions R 3,3, R 4,3, R 5,3, etc, by R k,3 = R k, (R k,2 R k 1,2 ), for k = 3, 4,.... In generl, fter the pproprite R k,j 1 pproximtions hve been obtined, we determine the O(h 2j ) pproximtions from 1 R k,j = R k,j j 1 1 (R k,j 1 R k 1,j 1 ), for k = j, j + 1,...

27 Chpter 4.5: Romberg Integrtion 26 y y y y 5 f (x) R 1,1 R 2,1 y 5 f (x) R 3,1 y 5 f (x) b x b x b x O ( ) hk 2 Figure: Figure 4.10 nd Tble 4.10 O ( ) hk 4 O ( ) hk 6 O ( ) hk 8 k 1 R 1,1 2 R 2,1 R 2,2 3 R 3,1 R 3,2 R 3,3 4 R 4,1 R 4,2 R 4,3 R 4,4.... n R n,1 R n,2 R n,3 R n,4 R n,n.... O ( ) hk 2n

28 Chpter 4.5: Romberg Integrtion 27 Algorithm 4.2: ROMBERG INTEGRATION b To pproximte the integrl I = f (x) dx, select n integer n > 0. INPUT endpoints, b; integer n. OUTPUT n rry R. (Compute R by rows; only the lst 2 rows re sved in storge.) Step 1 Set h = b ; R 1,1 = h (f () + f (b)). 2 Step 2 OUTPUT (R 1,1 ). Step 3 For i = 2,..., n do Steps 4 8. Step 4 Set R 2,1 = 1 [R 1,1 + h 2 i 2 k=1 ]. 2 f ( + (k 0.5)h) (Approximtion from Trpezoidl method.) Step 5 For j = 2,..., i set R 2,j = R 2,j 1 + R 2,j 1 R 1,j 1 4 j 1. (Extrpoltion.) 1 Step 6 OUTPUT (R 2,j for j = 1, 2,..., i). Step 7 Set h = h/2. Step 8 For j = 1, 2,..., i set R 1,j = R 2,j. (Updte row 1 of R.) Step 9 STOP.

29 Chpter 4.6: Adptive Qudrture 28 Composite formuls very effective in most situtions, but suffer occsionlly from requirement of eqully-spced nodes. Inpproprite when integrting function on n intervl contining regions with both lrge nd smll functionl vrition. How cn we determine wht technique should be pplied on vrious portions of the intervl of integrtion How ccurte cn we expect the finl pproximtion to be? An efficient technique for this type of problem should predict the mount of functionl vrition nd dpt the step size s necessry. These methods re clled Adptive qudrture methods.

30 Chpter 4.6: Adptive Qudrture 29 Algorithm 4.3: ADAPTIVE QUADRATURE b To pproximte the integrl I = f (x) dx to within given tolernce: INPUT endpoints, b; tolernce TOL; limit N to number of levels. OUTPUT pproximtion APP or messge tht N is exceeded. Step 1 Set APP = 0; i = 1; TOL i = 10 TOL; i = ; h i = (b )/2; FA i = f (); FC i = f ( + h i ); FB i = f (b); S i = h i (FA i + 4FC i + FB i )/3; (Approx. from Simpson s for entire intervl) L i = 1. Step 2 While i > 0 do Steps 3 5. Step 3 Set FD = f ( i + h i /2); FE = f ( i + 3h i /2); S1 = h i (FA i + 4FD + FC i )/6; (Approximtions from Simpson s method for hlves of subintervls.) S2 = h i (FC i + 4FE + FB i )/6; v 1 = i ; (Sve dt t this level.) v 2 = FA i ; v 3 = FC i ; v 4 = FB i ; v 5 = h i ; v 6 = TOL i ; v 7 = S i ; v 8 = L i. Step 4 Set i = i 1. (Delete the level.)

31 Chpter 4.6: Adptive Qudrture 30 Algorithm 4.3: ADAPTIVE QUADRATURE CONTINUED Step 5 If S1 + S2 v 7 < v 6 then set APP = APP + (S1 + S2) else if (v 8 N) then OUTPUT ( LEVEL EXCEEDED ); (Procedure fils.) STOP. else (Add one level.) set i = i + 1; (Dt for right hlf subintervl.) i = v 1 + v 5 ; FA i = v 3 ; FC i = FE; FB i = v 4 ; h i = v 5 /2; TOL i = v 6 /2; S i = S2; L i = v 8 + 1; Step 6 OUTPUT (APP); STOP. set i = i + 1; (Dt for left hlf subintervl.) i = v 1 ; FA i = v 2 ; FC i = FD; FB i = v 3 ; h i = h i 1 ; TOL i = TOL i 1 ; S i = S1; L i = L i 1. (APP pproximtes I to within TOL.)

32 Chpter 4.7: Gussin Qudrture 31 Consider the Trpezoidl rule pplied to determine the integrls of the functions whose grphs re shown in Figure The Trpezoidl rule pproximtes the integrl of the function by integrting the liner function tht joins the endpoints of the grph of the function. y y y y 5 f (x) y 5 f (x) y 5 f (x) 5 x 1 x 2 5 b x 5 x 1 x 2 5 b x 5 x 1 x 2 5 b x Figure: Figure 4.15

33 Chpter 4.7: Gussin Qudrture 32 But this is not likely the best line for pproximting the integrl. Lines such s those shown in Figure 4.16 would likely give much better pproximtions in most cses. y y y y 5 f (x) y 5 f (x) y 5 f (x) x 1 x 2 b x x 1 x 2 b x x 1 b x x 2 Figure: Figure 4.16

34 Chpter 4.7: Gussin Qudrture 33 In Gussin qudrture the points for evlution re chosen in n optiml, rther thn eqully-spced, wy. The nodes x 1, x 2,..., x n in the intervl [, b] nd coefficients c 1, c 2,..., c n, re chosen to minimize the expected error obtined in the pproximtion b n f (x) dx c i f (x i ). i=1 The YouTube video developed by Wen Shen cn serve s good illustrtion of the introduction to Gussin Qudrture for students. Illustrtion Introducing Gussin Qudrture

35 Chpter 4.7: Gussin Qudrture 34 The nodes x 1, x 2,..., x n needed to produce n integrl pproximtion formul tht gives exct results for ny polynomil of degree less thn 2n re the roots of the nth-degree Legendre polynomil. (See Theorem 4.7.) Theorem (4.7) Suppose tht x 1, x 2,..., x n re the roots of the nth Legendre polynomil P n (x) nd tht for ech i = 1, 2,..., n, the numbers c i re defined by 1 n x x j c i = dx. x i x j 1 j=1 j i If P(x) is ny polynomil of degree less thn 2n, then 1 n P(x) dx = c i P(x i ). 1 i=1

36 Chpter 4.8: Multiple Integrls 35 Algorithm 4.4: SIMPSON S DOUBLE INTEGRAL To pproximte the integrl I = b d(x) f (x, y) dy dx : c(x) INPUT endpoints, b: even positive integers m, n. OUTPUT pproximtion J to I. Step 1 Set h = (b )/n; J 1 = 0; (End terms.) J 2 = 0; (Even terms.) J 3 = 0. (Odd terms.) Step 2 For i = 0, 1,..., n do Steps 3 8. Step 3 Set x = + ih; (Composite Simpson s method for x.) HX = (d(x) c(x))/m; K 1 = f (x, c(x)) + f (x, d(x)); (End terms.) K 2 = 0; (Even terms.) K 3 = 0. (Odd terms.) Step 4 For j = 1, 2,..., m 1 do Step 5 nd 6. Step 5 Set y = c(x) + jhx; Q = f (x, y). Step 6 If j is even then set K 2 = K 2 + Q else set K 3 = K 3 + Q. ( Step 7 Set L = (K 1 + 2K 2 + 4K 3 )HX/3. L ) d(x i ) c(x i ) f (x i, y) dy by the Composite Simpson s method. Step 8 If i = 0 or i = n then set J 1 = J 1 + L else if i is even set J 2 = J 2 + L else set J 3 = J 3 + L. (End Step 2) Step 9 Set J = h(j 1 + 2J 2 + 4J 3 )/3. Step 10 OUTPUT (J); STOP.

37 Chpter 4.8: Multiple Integrls 36 Algorithm 4.5: GAUSSIAN DOUBLE INTEGRAL INPUT endpoints, b; positive integers m, n. (The roots r i,j nd coefficients c i,j need to be vilble for i = mx{m, n} nd for 1 j i.) OUTPUT pproximtion J to I. Step 1 Set h 1 = (b )/2; h 2 = (b + )/2; J = 0. Step 2 For i = 1, 2,..., m do Steps 3 5. Step 3 Set JX = 0; x = h 1 r m,i + h 2 ; d 1 = d(x); c 1 = c(x); k 1 = (d 1 c 1 )/2; k 2 = (d 1 + c 1 )/2. Step 4 For j = 1, 2,..., n do set y = k 1 r n,j + k 2 ; Q = f (x, y); JX = JX + c n,j Q. Step 5 Set J = J + c m,i k 1 JX. (End Step 2) Step 6 Set J = h 1 J. Step 7 OUTPUT (J); STOP.

38 Chpter 4.8: Multiple Integrls 37 Algorithm 4.6: GAUSSIAN TRIPLE INTEGRAL To pproximte the integrl b d(x) c(x) β(x,y) f (x, y, z) dz dy dx : α(x,y) INPUT endpoints, b; positive integers m, n, p. (The roots r i,j nd coefficients c i,j need to be vilble for i = mx{n, m, p} nd for 1 j i.) OUTPUT pproximtion J to I. Step 1 Set h 1 = (b )/2; h 2 = (b + )/2; J = 0. Step 2 For i = 1, 2,..., m do Steps 3 8. Step 3 Set JX = 0; x = h 1 r m,i + h 2 ; d 1 = d(x); c 1 = c(x); k 1 = (d 1 c 1 )/2; k 2 = (d 1 + c 1 )/2. Step 4 For j = 1, 2,..., n do Steps 5 7. Step 5 Set JY = 0; y = k 1 r n,j + k 2 ; β 1 = β(x, y); α 1 = α(x, y); l 1 = (β 1 α 1 )/2; l 2 = (β 1 + α 1 )/2. Step 6 For k = 1, 2,..., p do set z = l 1 r p,k + l 2 ; Q = f (x, y, z); JY = JY + c p,k Q. Step 7 Set JX = JX + c n,j l 1 JY. (End Step 4) Step 8 Set J = J + c m,i k 1 JX. (End Step 2) Step 9 Set J = h 1 J. Step 10 OUTPUT (J); STOP.

39 Chpter 4.9: Improper Integrls 38 Left Endpoint Singulrity Consider the sitution when the integrnd is unbounded t the left endpoint of the intervl of integrtion, s shown in Figure In this cse we sy tht f hs singulrity t the endpoint. We will then show how other improper integrls cn be reduced to problems of this form. y y 5 f(x) b x Figure: Figure 4.25

40 Chpter 4.9: Improper Integrls 39 Left Endpoint Singulrity It is shown in clculus tht the improper integrl with singulrity t the left endpoint, b dx (x ) p, converges if nd only if 0 < p < 1, nd in this cse, we define b 1 dx = lim (x ) p M + (x ) 1 p 1 p x=b x=m = (b )1 p. 1 p

41 Chpter 4.9: Improper Integrls 40 Right-Endpoint Singulrity To pproximte the improper integrl with singulrity t the right endpoint, we could develop similr technique but expnd in terms of the right endpoint b insted of the left endpoint. Alterntively, we cn mke the substitution z = x, dz = dx to chnge the improper integrl into one of the form b f (x) dx = b f ( z) dz,

42 Chpter 4.9: Improper Integrls 41 Right-Endpoint Singulrity which hs its singulrity t the left endpoint. Then we cn pply the left endpoint singulrity technique we hve lredy developed. y For z 5 2x y y 5 f (x) y 5 f (2z) b x 2b 2 z Figure: Figure 4.26

43 Chpter 4.9: Improper Integrls 42 Infinite Singulrity The other type of improper integrl involves infinite limits of integrtion. The bsic integrl of this type hs the form 1 x p dx, for p > 1. This is converted to n integrl with left endpoint singulrity t 0 by mking the integrtion substitution t = x 1, dt = x 2 dx, so dx = x 2 dt = t 2 dt. Then 1 0 1/ x p dx = tp 1/ t 2 dt = 0 1 t 2 p dt.

44 Chpter 4.9: Improper Integrls 43 Infinite Singulrity In similr mnner, the vrible chnge t = x 1 converts the improper integrl f (x) dx into one tht hs left endpoint singulrity t zero: f (x) dx = 1/ 0 t 2 f ( ) 1 t It cn now be pproximted using qudrture formul of the type described erlier. dt.