Tham khảo tài liệu 'lập trình c# all chap "numerical recipes in c" part 114', công nghệ thông tin phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 722 Chapter 16. Integration of Ordinary Differential Equations rkqs y dydx nvar x h eps yscal hdid hnext derivs if hdid h nok else nbad if x-x2 x2-x1 Are we done for i 1 i nvar i ystart i y i if kmax xp kount x Save final step. for i 1 i nvar i yp i kount y i free_vector dydx 1 nvar free_vector y 1 nvar free_vector yscal 1 nvar return Normal exit. if fabs hnext hmin nrerror Step size too small in odeint h hnext nrerror Too many steps in routine odeint CITED REFERENCES AND FURTHER READING Gear . 1971 Numerical Initial Value Problems in Ordinary Differential Equations Englewood Cliffs NJ Prentice-Hall . 1 Cash . and Karp . 1990 ACM Transactions onMathematical Software vol. 16 pp. 201222. 2 Shampine . and Watts . 1977 in Mathematical Software III . Rice ed. New York Academic Press pp. 257-275 1979 Applied Mathematics and Computation vol. 5 pp. 93-121. Forsythe . Malcolm . and Moler . 1977 Computer Methods for Mathematical Computations Englewood Cliffs NJ Prentice-Hall . Modified Midpoint Method This section discusses the modified midpoint method which advances a vector of dependent variables y x from a point x to a point x H by a sequence of n substeps each of size h h H n In principle one could use the modified midpoint method in its own right as an ODE integrator. In practice the method finds its most important application as a part of the more powerful Bulirsch-Stoer technique treated in . You can therefore consider this section as a preamble to . The number of right-hand side evaluations required by the modified midpoint method is n 1. The formulas for the method are zo y x Z1 zo hf x zo Sample page from NUMERICAL RECIPES IN C THE ART OF SCIENTIFIC COMPUTING ISBN 0-521-43108-5 zm i zm-i 2hf x mh zm for m 1 2 . n 1 y x H yn 2 z zn-i hf x H zn Modified Midpoint Method 723 Here the z s are intermediate approximations which march along in steps of h while yn is the final approximation to y x H . The method