Page 276 - Excel for Scientists and Engineers: Numerical Methods
P. 276

CHAPTER 11  ORDINARY DIFFERENTIAL EOUATIONS. PART I1                 253



               RK formulas to calculate z, columns H through M a similar series to calculate y.
               The RK formulas in cells C7 through G7 are, respectively
                   =B6*( A7-A6)
                   =( B6+C7/2)*(A7-A6)

                   =( B6+ D7/2)*( A7-A6)
                   =( B6+E7)*(A7-A6)

                   =G6+(C7+2*D7+2*E7+F7)/6
                   As  expected,  application of the RK method reduces the errors significantly.
               The results from the more precise calculation  are shown in Figure  11-9.  Every
               fifth data point has been plotted.
                   Even better accuracy can be obtained by using the RK method with a smaller
               kc.  When a kc value of 0.0 1 is used instead of 0.1, the maximum error is 0.25%






























                                       0          1         2          3
                                                       x

                 Figure 11-9.  Solution of the differential equationy" -y = 0  by the shooting method,
                        using the RK method to calculate y' and y.  Maximum error is ca. 1%.
                       (folder 'Chapter 1 1 Examples', workbook 'ODE-BVP', worksheet 'y"-y=O (RK)')
   271   272   273   274   275   276   277   278   279   280   281