Example: dental hygienist

TRAPEZOIDAL METHOD: ERROR FORMULA

TRAPEZOIDAL METHOD: ERROR FORMULAT heoremAssumef(x) twice continuously differentiable on theinterval [a,b]. ThenETn(f) := baf(x)dx Tn(f) = h2(b a)12f (cn)for somecnin the interval [a,b].Later we will say something about the proof of this result, as itleads to some other useful formulas for the above FORMULA says that the ERROR decreases in a manner thatis roughly proportional toh2. Thus doublingn(and halvingh)should cause the ERROR to decrease by a factor of approximately is what we observed with some past examples from thepreceding evaluatingI= 20dx1 +x2using the TRAPEZOIDAL methodTn(f). Let us bound the errorETn(f) = h2(b a)12f (cn)Here,b a= 2.

The corrected trapezoidal rule is illustrated in the following table. n I T n Ratio I CT n Ratio 2 5.319 3.552E 1 4 1.266 4.20 2.474E 2 14.4 8 3.118E 1 4.06 1.583E 3 15.6

Tags:

  Errors

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of TRAPEZOIDAL METHOD: ERROR FORMULA

1 TRAPEZOIDAL METHOD: ERROR FORMULAT heoremAssumef(x) twice continuously differentiable on theinterval [a,b]. ThenETn(f) := baf(x)dx Tn(f) = h2(b a)12f (cn)for somecnin the interval [a,b].Later we will say something about the proof of this result, as itleads to some other useful formulas for the above FORMULA says that the ERROR decreases in a manner thatis roughly proportional toh2. Thus doublingn(and halvingh)should cause the ERROR to decrease by a factor of approximately is what we observed with some past examples from thepreceding evaluatingI= 20dx1 +x2using the TRAPEZOIDAL methodTn(f). Let us bound the errorETn(f) = h2(b a)12f (cn)Here,b a= 2.

2 We bound|f (cn)|by max0 x 2|f (x)|.Calculate the derivatives:f (x) = 2x(1 +x2)2,f (x) = 2 + 6x2(1 +x2)3,f (x) =24x(1 x2)(1 +x2)4 Forx (0,2),f (x) = 0 only whenx= 1. Somax0 x 2 f (x) = max{ f (0) , f (1) , f (2) }= 2 Therefore, ETn(f) h2(2)12 2 =h23 ETn(f) h23 How large shouldnbe chosen in order to ensure that ETn(f) 5 10 6(1)To ensure this, we choosehso small thath23 5 10 6 This is equivalent to choosinghandnto satisfyh .003873n=2h 517 will imply (1).DERIVING THE ERROR FORMULAT here are two stages in deriving the ERROR :(1) Obtain the ERROR FORMULA for the case of a single subinterval(n= 1);(2) Use this to obtain the general ERROR FORMULA given the TRAPEZOIDAL method with only a single subinterval, we have +h f(x)dx h2[f( ) +f( +h)] = h312f (c)for somecin the interval [ , +h].

3 This ERROR FORMULA can be derived through an application of Taylor stheorem or the Newton form of the linear interpolation general TRAPEZOIDAL ruleTn(f) was obtained by applying thesimple TRAPEZOIDAL rule to a subdivision of the original interval ofintegration. Recall the notationh=b an,xj=a+j h,j= 0,1,..,nI(f) = xnx0f(x)dx= x1x0f(x)dx+ x2x1f(x)dx+ + xnxn 1f(x)dxTn(f) =h2[f(x0) +f(x1)] +h2[f(x1) +f(x2)]+ +h2[f(xn 1) +f(xn)]Then the errorETn(f) baf(x)dx Tn(f)can be analyzed by adding together the errors over the subintervals[x0,x1], [x1,x2],..,[xn 1,xn]. Recall +h f(x)dx h2[f( ) +f( +h)] = h312f (c)Then on [xj 1,xj], xjxj 1f(x)dx h2[f(xj 1) +f(xj)] = h312f ( j)withxj 1 j xj.

4 Combining these errors , we obtainETn(f) = h312f ( 1) h312f ( n)This FORMULA can be further simplified, and we will do so in this ERROR asETn(f) = h3n12[f ( 1) + +f ( n)n]Denote the quantity inside the brackets by n. This numbersatisfiesmina x bf (x) n maxa x bf (x)Sincef (x) is a continuous function (by original assumption), wehave some numbercnin [a,b] for whichf (cn) = nRecall also thathn=b a. ThenETn(f) = h3n12[f ( 1) + +f ( n)n]= h2(b a)12f (cn)This is the ERROR FORMULA given on the first ERROR ESTIMATEWe now obtain a way to estimate the errorETn(f). Return to theformulaETn(f) = h312f ( 1) h312f ( n)and rewrite it asETn(f) = h212[f ( 1)h+ +f ( n)h]The quantityf ( 1)h+ +f ( n)his aRiemann sumfor the integral baf (x)dx=f (b) f (a)By this we meanlimn [f ( 1)h+ +f ( n)h]= baf (x)dxThusf ( 1)h+ +f ( n)h f (b) f (a)for larger values ofn.

5 Combining this with the earlier ERROR formulaETn(f) = h212[f ( 1)h+ +f ( n)h]we haveETn(f) h212[f (b) f (a)] ETn(f)This is a computable estimate of the ERROR in the numericalintegration. It is called anasymptotic ERROR evaluatingI(f) = 0excosx dx= e + this case,f (x) =ex(cosx sinx),f (x) = 2exsinxmax0 x f (x) = f (.75 ) = (f) = h2(b a)12f (cn)we have theerror bound ETn(f) h2 12 = (2)Also, we have theerror estimate ETn(f) = h212[f ( ) f (0)]=h212(e + 1).= (3)nTnETnRatioBound (2) 4In looking at the table, we see that the errorETn(f) and the errorestimate ETn(f) are quite close.

6 ThereforeI(f) Tn(f) h212(e + 1)I(f) Tn(f) +h212(e + 1)This last FORMULA is called thecorrected TRAPEZOIDAL rule,CTn(f).The corrected TRAPEZOIDAL rule is illustrated in the following TnRatioI corrected TRAPEZOIDAL ruleIn general,I(f) Tn(f) h212[f (b) f (a)]I(f) CTn(f) :=Tn(f) h212[f (b) f (a)]This is thecorrected TRAPEZOIDAL rule. It is easy to obtain from thetrapezoidal rule, and in most cases, it converges more rapidly thanthe TRAPEZOIDAL FORMULA FOR SIMPSON S RULER ecall the general Simpson s rule baf(x)dx Sn(f) :=h3[f(x0) + 4f(x1) + 2f(x2)+ 4f(x3) + 2f(x4) + + 2f(xn 2) + 4f(xn 1) +f(xn)]For its ERROR , we haveESn(f) baf(x)dx Sn(f) = h4(b a)180f(4)(cn)wherea cn b.

7 For an asymptotic ERROR estimate, baf(x)dx Sn(f) ESn(f) h4180[f (b) f (a)]DISCUSSIONFor Simpson s ERROR FORMULA , both formulas assume that theintegrandf(x) has four continuous derivatives on the interval[a,b]. What happens when this is not valid? We return later tothis formulas also say the ERROR should decrease by a factor ofaround 16 whennis these results with those for the TRAPEZOIDAL rule errorformulas:ETn(f) baf(x)dx Tn(f) = h2(b a)12f (cn)ETn(f) h212[f (b) f (a)] ETn(f)EXAMPLEC onsider evaluatingI= 20dx1 +x2using Simpson s ruleSn(f). Let us bound the by noting thatf(4)(x) = 245x4 10x2+ 1(1 +x2)5max0 x 1 f(4)(x) =f(4)(0) = 24 ThenESn(f) = h4(b a)180f(4)(cn) ESn(f) h4 2180 24 =4h415 How large shouldnbe chosen in order to ensure that ESn(f) 5 10 6 This is true if4h415 5 10 6h.

8 0658n , choosingn 32 will give the desired ERROR this with the earlier TRAPEZOIDAL example in whichn 517 was the asymptotic ERROR estimate, we havef (x) = 24xx2 1(1 +x2)4 ESn(f) h4180[f (2) f (0)]=h4180 144625=43125h4 INTEGRATING xConsider the numerical approximation of 10 x dx=23In the following table, we give the errors when using both thetrapezoidal and Simpson rate of convergence is slower because the functionf(x) = xis not sufficiently differentiable on [0,1]. Both methods convergewith a rate proportional ERROR FORMULASFor a numerical integration FORMULA , baf(x)dx n j=0wjf(xj)letEn(f) denote its ERROR ,En(f) = baf(x)dx n j=0wjf(xj)We say another FORMULA En(f) is an asymptotic ERROR FORMULA thisnumerical integration if it satisfieslimn En(f)En(f)= 1orlimn En(f) En(f)En(f)= 0 These conditions say that En(f) looks increasingly likeEn(f) asnincreases, and thusEn(f) En(f).

9 ExamplesFor the TRAPEZOIDAL rule, assumingf(x) has two continuousderivatives on [a,b],ETn(f) ETn(f) h212[f (b) f (a)]For Simpson s rule, assumingf(x) has four continuous derivativeson [a,b],ESn(f) ESn(f) h4180[f (b) f (a)]Example (cont.)Note that both of these formulas can be written in an equivalentform as En(f) =cnpfor appropriate constantcand exponentp. With the trapezoidalrule,p= 2 andc= (b a)212[f (b) f (a)]and for Simpson s rule,p= 4 andc= (b a)4180[f (b) f (a)]The FORMULA En(f) =cnp(4)occurs for many other numerical integration formulas that we havenot yet defined or studied. In addition, if we use the TRAPEZOIDAL orSimpson rules with an integrandf(x) which is not sufficientlydifferentiable, then (4) may hold with apless than the ConsiderI= 10x f(x)dxin which 0< <1 andf(x) is a smooth function withf(0)6= 0.

10 Then the convergence of the TRAPEZOIDAL rule can be shown to havean asymptotic ERROR formulaEn En=cn +1(5)for some constantcdependent on . A similar result holds forSimpson s rule, with 0< <3, not an integer. We can actuallyspecify a FORMULA forc; but the FORMULA is often less importantthan knowing that (4) is valid for OF ASYMPTOTIC ERROR FORMULASA ssume we know that an asymptotic ERROR formulaI In cnpis valid for some numerical integration rule denoted byIn. Initially,assume we know the exponentp. Then imagine calculating bothInandI2n. WithI2n, we haveI I2n c2pnpThis leads toI In 2p(I I2n)I 2pI2n In2p 1=I2n+I2n In2p 1 The formulaI I2n+I2n In2p 1(6)is calledRichardson s extrapolation the TRAPEZOIDAL rule and with the integrandf(x) having twocontinuous derivatives,p= 2 andI T2n+13(T2n Tn)With Simpson s rule and with the integrandf(x) having fourcontinuous derivatives,p= 4 andI S2n+115(S2n Sn)Richardson s ERROR estimateWe can also use the FORMULA (4) En(f) =cnpto obtain ERROR estimation formulas:I I2n I2n In2p 1(7)This is calledRichardson s ERROR estimate.


Related search queries