The Chemistry Maths Book, Second Edition

(Grace) #1

20.5 Numerical integration 575


The derivative of the integrand is


f′(x) 1 = 1 e


−x

2

(1 1 − 12 x


2

),


so thatf


0

′ 1 = 1 f′(0) 1 = 11 andf


n

′ 1 = 1 f′(1.2) 1 = 1 −0.445424. Thenε 1 = 1 0.120452h


2

. The results


are collected in Table 20.8.


Table 20.8 Values of


n 3612


T(h) 0.361939 0.376698 0.380330


ε 0.019272 0.004818 0.001205


T(h) 1 + 1 ε 0.381211 0.381516 0.381535


The exact value of the integral is (1 1 − 1 e


−1.44

) 1 = 1 0.381536.


0 Exercise 19


Simpson’s rule. Quadratic interpolation


Simpson’s rule has been one of the most popular simple numerical quadrature methods


for over two centuries.


6

It is obtained by dividing the intervala 1 ≤ 1 x 1 ≤ 1 binto an even


number of subintervals, 2 n, each with widthh 1 = 1 (b 1 − 1 a) 22 n, and approximating the


integrand by piecewise quadratic interpolation. Then


(20.35)


or


The error in Simpson’s rule behaves likeh


4

when his small, so that halving h(or


doubling the number of subintervals n) reduces the error by a factor of sixteen.


Simpson’s rule therefore usually converges much more quickly that the (uncorrected)


trapezoidal rule.


Z


a

b

fxdx


h


() ≈++( ) ( ) (


∑∑


3


end points 42 odd points eveen points)







Z


a

b

nn

fxdx


h


() ≈ ++++++fffff f f+



3


4242 4


01234 212












1

2

Ixedx


x

==


−−

Z


0

1.2 2

6

Thomas Simpson (1710–1761), professor of mathematics at the Royal Military Academy at Woolwich, was a


self-taught mathematician. He was brought up as a weaver and in 1735 he joined the Mathematical Society at


Spitalfields, a weaving community, of which it was the duty of every member ‘if he be asked any mathematical or


philosophical question by another member, to instruct him in the plainest and easiest manner he is able.’ The rule


named for him appeared in his Mathematical dissertations on a variety of physical and analytical subjectsof 1743,


but had appeared previously in work by Cavalieri (1639) and Gregory (1668).

Free download pdf