Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(lu) #1

NUMERICAL METHODS


The difference between the estimate of the integral and the exact answer is 1/12. Equation
(27.38) estimates this error as 2× 0. 25 ×〈f′′〉/12. Our (deliberately chosen!) integrand is
one for which〈f′′〉can be evaluated trivially. Becausef(x) is a quadratic function ofx,
its second derivative is constant, and equal to 2 in this case. Thus〈f′′〉has value 2 and
(27.38) estimates the error as 1/12; that the estimate is exactly right should be no surprise
since the Taylor expansion for a quadratic polynomial about any point always terminates
after three terms and so no higher-order terms inhhave been ignored in (27.38).


27.4.2 Simpson’s rule

Whereas the trapezium rule makes a linear interpolation off, Simpson’s rule


effectively mimics the local variation off(x) using parabolas. The strips are


treated two at a time (figure 27.4(c)) and therefore their number,N, should be


made even.


In the neighbourhood ofxi,foriodd, it is supposed thatf(x) can be adequately

represented by a quadratic form,


f(xi+y)=fi+ay+by^2. (27.39)

In particular, applying this toy=±hyields two expressions involvingb


fi+1=f(xi+h)=fi+ah+bh^2 ,

fi− 1 =f(xi−h)=fi−ah+bh^2 ;

thus


bh^2 =^12 (fi+1+fi− 1 − 2 fi).

Now, in the representation (27.39), the area of the double strip fromxi− 1 to

xi+1is given by


Ai(estim.) =

∫h

−h

(fi+ay+by^2 )dy=2hfi+^23 bh^3.

Substituting forbh^2 then yields, for the estimated area,


Ai(estim.) = 2hfi+^23 h×^12 (fi+1+fi− 1 − 2 fi)

=^13 h(4fi+fi+1+fi− 1 ),

an expression involving only given quantities. It should be noted that the values


of neitherbnoraneed be calculated.


For the full integral,

I(estim.) =^13 h

(

f 0 +fN+4


modd

fm+2


meven

fm

)

. (27.40)


It can be shown, by following the same procedure as in the trapezium rule case,


that the error in the estimated area is approximately


∆I(estim.)≈

(b−a)
180

h^4 〈f(4)〉.
Free download pdf