c16-7 (779599), страница 2

Файл №779599 c16-7 (Numerical Recipes in C) 2 страницаc16-7 (779599) страница 22017-12-27СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 2)

Theaim is to advance the solution and obtain the expansion coefficients at the next pointxn+1 . This is in contrast to multistep methods, where the data are the values ofthe solution at xn , xn−1, . . . . We’ll illustrate the idea by considering a four-valuemethod, for which the basic data areyn hy0(16.7.5)yn ≡  2 n 00 (h /2)yn(h3 /6)yn000It is also conventional to scale the derivatives with the powers of h = xn+1 − xnas shown. Note that here we use the vector notation y to denote the solution andits first few derivatives at a point, not the fact that we are solving a system ofequations with many components y.In terms of the data in (16.7.5), we can approximate the value of the solutiony at some point x:y(x) = yn + (x − xn )yn0 +(x − xn )2 00 (x − xn )3 000yn +yn26(16.7.6)Set x = xn+1 in equation (16.7.6) to get an approximation to yn+1 .

Differentiate0, and similarly forequation (16.7.6) and set x = xn+1 to get an approximation to yn+100000eyn+1 and yn+1 . Call the resulting approximation yn+1 , where the tilde is a reminderthat all we have done so far is a polynomial extrapolation of the solution and itsderivatives; we have not yet used the differential equation. You can easily verify thateyn+1 = B · yn(16.7.7)where the matrix B is10B=00110012101331(16.7.8)We now write the actual approximation to yn+1 that we will use by adding acorrection to eyn+1 :yn+1 = eyn+1 + αr(16.7.9)Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use.

Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).• Starting and stopping present problems. For starting, we need the initialvalues plus several previous steps to prime the pump. Stopping is aproblem because equal steps are unlikely to land directly on the desiredtermination point.Older implementations of PC methods have various cumbersome ways ofdealing with these problems.

For example, they might use Runge-Kutta to startand stop. Changing the stepsize requires considerable bookkeeping to do somekind of interpolation procedure. Fortunately both these drawbacks disappear withthe multivalue approach.16.7 Multistep, Multivalue, and Predictor-Corrector Methods751Here r will be a fixed vector of numbers, in the same way that B is a fixed matrix.We fix α by requiring that the differential equation0yn+1= f(xn+1 , yn+1 )(16.7.10)0hyn+1= hey 0n+1 + αr2(16.7.11)and this will be consistent with (16.7.10) providedr2 = 1,α = hf(xn+1 , yn+1 ) − hey 0n+1(16.7.12)The values of r1 , r3 , and r4 are free for the inventor of a given four-value method tochoose.

Different choices give different orders of method (i.e., through what orderin h the final expression 16.7.9 actually approximates the solution), and differentstability properties.An interesting result, not obvious from our presentation, is that multivalue andmultistep methods are entirely equivalent. In other words, the value yn+1 given bya multivalue method with given B and r is exactly the same value given by somemultistep method with given β’s in equation (16.7.2). For example, it turns outthat the Adams-Bashforth formula (16.7.3) corresponds to a four-value method withr1 = 0, r3 = 3/4, and r4 = 1/6.

The method is explicit because r1 = 0. TheAdams-Moulton method (16.7.4) corresponds to the implicit four-value method withr1 = 5/12, r3 = 3/4, and r4 = 1/6. Implicit multivalue methods are solved thesame way as implicit multistep methods: either by a predictor-corrector approachusing an explicit method for the predictor, or by Newton iteration for stiff systems.Why go to all the trouble of introducing a whole new method that turns outto be equivalent to a method you already knew? The reason is that multivaluemethods allow an easy solution to the two difficulties we mentioned above inactually implementing multistep methods.Consider first the question of stepsize adjustment.

To change stepsize from hto h0 at some point xn , simply multiply the components of yn in (16.7.5) by theappropriate powers of h0 /h, and you are ready to continue to xn + h0 .Multivalue methods also allow a relatively easy change in the order of themethod: Simply change r. The usual strategy for this is first to determine the newstepsize with the current order from the error estimate. Then check what stepsizewould be predicted using an order one greater and one smaller than the currentorder.

Choose the order that allows you to take the biggest next step. Being able tochange order also allows an easy solution to the starting problem: Simply start witha first-order method and let the order automatically increase to the appropriate level.For low accuracy requirements, a Runge-Kutta routine like rkqs is almostalways the most efficient choice. For high accuracy, bsstep is both robust andefficient. For very smooth functions, a variable-order PC method can invoke veryhigh orders. If the right-hand side of the equation is relatively complicated, so thatthe expense of evaluating it outweighs the bookkeeping expense, then the best PCpackages can outperform Bulirsch-Stoer on such problems. As you can imagine,however, such a variable-stepsize, variable-order method is not trivial to program.

IfSample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited.

To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).be satisfied. The second of the equations in (16.7.9) is752Chapter 16.Integration of Ordinary Differential Equationsyou suspect that your problem is suitable for this treatment, we recommend use of acanned PC package. For further details consult Gear [1] or Shampine and Gordon [2].Our prediction, nevertheless, is that, as extrapolation methods like BulirschStoer continue to gain sophistication, they will eventually beat out PC methods inall applications.

We are willing, however, to be corrected.Gear, C.W. 1971, Numerical Initial Value Problems in Ordinary Differential Equations (EnglewoodCliffs, NJ: Prentice-Hall), Chapter 9. [1]Shampine, L.F., and Gordon, M.K. 1975, Computer Solution of Ordinary Differential Equations.The Initial Value Problem. (San Francisco: W.H Freeman). [2]Acton, F.S. 1970, Numerical Methods That Work; 1990, corrected edition (Washington: Mathematical Association of America), Chapter 5.Kahaner, D., Moler, C., and Nash, S. 1989, Numerical Methods and Software (Englewood Cliffs,NJ: Prentice Hall), Chapter 8.Hamming, R.W. 1962, Numerical Methods for Engineers and Scientists; reprinted 1986 (NewYork: Dover), Chapters 14–15.Stoer, J., and Bulirsch, R. 1980, Introduction to Numerical Analysis (New York: Springer-Verlag),Chapter 7.Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use.

Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).CITED REFERENCES AND FURTHER READING:.

Характеристики

Тип файла
PDF-файл
Размер
137,04 Kb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
7021
Авторов
на СтудИзбе
260
Средний доход
с одного платного файла
Обучение Подробнее