The Chemistry Maths Book, Second Edition

(Grace) #1

20.9 First-order differential equations 589


The computed values ofy(1) are 3.9766 for step sizeh 1 = 1 0.2and 4.1875 forh 1 = 1 0.1,


compared with the exact value 4.4366. The table shows that the error is approximately


halved when the step size is halved, as expected for a first-order method.


0 Exercises 34–37


Accuracy increases as the step size is decreased, but the larger number of steps


required leads to increasingly larger rounding errors. The practical methods of


solving differential equations are procedures for simulating the Taylor expansion to


some higher order in h, and the more sophisticated of these involve the use of variable


step sizes to control the accumulation of rounding errors and to optimize convergence.


The derivation and justification of these methods are beyond the scope of this book,


and we give here only a brief description of one popular family of methods.


Runge–Kutta methods


The Runge–Kutta methods are a family of methods of increasing order, with Euler’s


first-order method as the first member.


10

The second-order Runge–Kutta method is


obtained by replacingF


n

in (20.52) by an estimate of the gradient halfway between


points nand n 1 + 11. Thus, by Euler’s method, an approximate value of yat the


midpoint is


(20.55a)


and an approximate slope at the midpoint is


(20.55b)


The estimated value ofy(x


n+ 1

)is then


y


n+ 1

1 = 1 y


n

1 + 1 hk


2

(20.55c)


The procedure represented by equations (20.55) is of second order in the step size h.


One of the most widely used of all numerical methods for solving differential


equations is the fourth-order Runge–Kutta method, defined by the set of equations


(20.56)


yy


h


kkkk


nn+

=+ + + +


11234

6


[] 22


kfx


h


y


h


kkfxhyhk


32 nn 43 nn

22


=+,+







 =+,+()


kfxy kfx


h


y


h


k


12 nn n n 1

22


=, = +,+







() 


kfx


h


y


h


k


21 nn

22


=+,+








y


h


fx y y


h


k


nnnn

+,=+


22


1

()


10

Carl David Tolmé Runge (1856–1927) and Wilhelm Kutta (1867–1944), German mathematicians, published


systematic investigations of methods of ‘successive substitutions’ in 1895 (Runge) and 1901 (Kutta). This work has


been followed by many elaborations and extensions to give some of the most widely used modern methods.

Free download pdf