Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(Darren Dugan) #1

27.4 NUMERICAL INTEGRATION


This provides a very simple expression for estimating integral (27.34); its accuracy


is limited only by the extent to whichhcan be made very small (and henceN


very large) without making the calculation excessively long. Clearly the estimate


provided is exact only iff(x) is a linear function ofx.


The error made in calculating the area of the strip when the trapezium rule is

used may be estimated as follows. The values used arefiandfi+1, as in (27.36).


These can be expressed accurately in terms offi+1/ 2 and its derivatives by the


Taylor series


fi+1/ 2 ± 1 / 2 =fi+1/ 2 ±

h
2

f′i+1/ 2 +

1
2!

(
h
2

) 2
f′′i+1/ 2 ±

1
3!

(
h
2

) 3
f(3)i+1/ 2 +···.

Thus


Ai(estim.) =^12 h(fi+fi+1)

=h

[

fi+1/ 2 +

1
2!

(
h
2

) 2
fi′′+1/ 2 +O(h^4 )

]

,

whilst, from the first few terms of the exact result (27.35),


Ai(exact) =hfi+1/ 2 +

2
3!

(
h
2

) 3
f′′i+1/ 2 +O(h^5 ).

Thus the error ∆Ai=Ai(estim.)−Ai(exact) is given by


∆Ai=

( 1
8 −

1
24

)
h^3 f′′i+1/ 2 +O(h^5 )

≈ 121 h^3 f′′i+1/ 2.

The total error inI(estim.) is thus given approximately by


∆I(estim.)≈ 121 nh^3 〈f′′〉= 121 (b−a)h^2 〈f′′〉, (27.38)

where〈f′′〉represents an average value for the second derivative offover the


intervalatob.


Use the trapezium rule withh=0. 5 to evaluate

I=


∫ 2


0

(x^2 − 3 x+4)dx,

and, by evaluating the integral exactly, examine how well (27.38) estimates the error.

Withh=0.5, we will need five values off(x)=x^2 − 3 x+ 4 for use in formula (27.37).
They aref(0) = 4,f(0.5) = 2.75,f(1) = 2,f(1.5) = 1.75 andf(2) = 2. Putting these into
(27.37) gives


I(estim.) =

0. 5


2


(4 + 2× 2 .75 + 2×2+2× 1 .75 + 2) = 4. 75.


The exact value is


I(exact) =

[


x^3
3


3 x^2
2

+4x

] 2


0

=4^23.

Free download pdf