c16-0 (779592)

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

Текст из файла

16.0 IntroductionProblems involving ordinary differential equations (ODEs) can always bereduced to the study of sets of first-order differential equations. For example thesecond-order equationdyd2 y= r(x)+ q(x)2dxdx(16.0.1)can be rewritten as two first-order equationsdy= z(x)dxdz= r(x) − q(x)z(x)dx(16.0.2)where z is a new variable. This exemplifies the procedure for an arbitrary ODE.

Theusual choice for the new variables is to let them be just derivatives of each other (andof the original variable). Occasionally, it is useful to incorporate into their definitionsome other factors in the equation, or some powers of the independent variable,for the purpose of mitigating singular behavior that could result in overflows orincreased roundoff error. Let common sense be your guide: If you find that theoriginal variables are smooth in a solution, while your auxiliary variables are doingcrazy things, then figure out why and choose different auxiliary variables.The generic problem in ordinary differential equations is thus reduced to thestudy of a set of N coupled first-order differential equations for the functionsyi , i = 1, 2, .

. . , N , having the general formdyi (x)= fi (x, y1 , . . . , yN ),dxi = 1, . . . , N(16.0.3)where the functions fi on the right-hand side are known.A problem involving ODEs is not completely specified by its equations. Evenmore crucial in determining how to attack the problem numerically is the nature ofthe problem’s boundary conditions.

Boundary conditions are algebraic conditions707Sample 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).Chapter 16.

Integration of OrdinaryDifferential Equations708Chapter 16.Integration of Ordinary Differential EquationsSample 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).on the values of the functions yi in (16.0.3). In general they can be satisfied atdiscrete specified points, but do not hold between those points, i.e., are not preservedautomatically by the differential equations.

Boundary conditions can be as simple asrequiring that certain variables have certain numerical values, or as complicated asa set of nonlinear algebraic equations among the variables.Usually, it is the nature of the boundary conditions that determines whichnumerical methods will be feasible. Boundary conditions divide into two broadcategories.• In initial value problems all the yi are given at some starting value xs , andit is desired to find the yi ’s at some final point xf , or at some discrete listof points (for example, at tabulated intervals).• In two-point boundary value problems, on the other hand, boundaryconditions are specified at more than one x. Typically, some of theconditions will be specified at xs and the remainder at xf .This chapter will consider exclusively the initial value problem, deferring twopoint boundary value problems, which are generally more difficult, to Chapter 17.The underlying idea of any routine for solving the initial value problem isalways this: Rewrite the dy’s and dx’s in (16.0.3) as finite steps ∆y and ∆x, andmultiply the equations by ∆x.

This gives algebraic formulas for the change in thefunctions when the independent variable x is “stepped” by one “stepsize” ∆x. Inthe limit of making the stepsize very small, a good approximation to the underlyingdifferential equation is achieved. Literal implementation of this procedure resultsin Euler’s method (16.1.1, below), which is, however, not recommended for anypractical use. Euler’s method is conceptually important, however; one way oranother, practical methods all come down to this same idea: Add small incrementsto your functions corresponding to derivatives (right-hand sides of the equations)multiplied by stepsizes.In this chapter we consider three major types of practical numerical methodsfor solving initial value problems for ODEs:• Runge-Kutta methods• Richardson extrapolation and its particular implementation as the BulirschStoer method• predictor-corrector methods.A brief description of each of these types follows.1. Runge-Kutta methods propagate a solution over an interval by combiningthe information from several Euler-style steps (each involving one evaluation of theright-hand f’s), and then using the information obtained to match a Taylor seriesexpansion up to some higher order.2.

Richardson extrapolation uses the powerful idea of extrapolating a computedresult to the value that would have been obtained if the stepsize had been verymuch smaller than it actually was. In particular, extrapolation to zero stepsize isthe desired goal. The first practical ODE integrator that implemented this idea wasdeveloped by Bulirsch and Stoer, and so extrapolation methods are often calledBulirsch-Stoer methods.3. Predictor-corrector methods store the solution along the way, and usethose results to extrapolate the solution one step advanced; they then correct theextrapolation using derivative information at the new point.

These are best forvery smooth functions.16.0 Introduction709We have organized the routines in this chapter into three nested levels. Thelowest or “nitty-gritty” level is the piece we call the algorithm routine. Thisimplements the basic formulas of the method, starts with dependent variables yi atx, and calculates new values of the dependent variables at the value x + h. Thealgorithm routine also yields up some information about the quality of the solutionafter the step. The routine is dumb, however, and it is unable to make any adaptivedecision about whether the solution is of acceptable quality or not.That quality-control decision we encode in a stepper routine. The stepperroutine calls the algorithm routine.

It may reject the result, set a smaller stepsize, andcall the algorithm routine again, until compatibility with a predetermined accuracycriterion has been achieved. The stepper’s fundamental task is to take the largeststepsize consistent with specified performance. Only when this is accomplished doesthe true power of an algorithm come to light.Above the stepper is the driver routine, which starts and stops the integration,stores intermediate results, and generally acts as an interface with the user. There isnothing at all canonical about our driver routines. You should consider them to beexamples, and you can customize them for your particular application.Of the routines that follow, rk4, rkck, mmid, stoerm, and simpr are algorithmroutines; rkqs, bsstep, stiff, and stifbs are steppers; rkdumb and odeintare drivers.Section 16.6 of this chapter treats the subject of stiff equations, relevant both toordinary differential equations and also to partial differential equations (Chapter 19).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).Runge-Kutta is what you use when (i) you don’t know any better, or (ii) youhave an intransigent problem where Bulirsch-Stoer is failing, or (iii) you have a trivialproblem where computational efficiency is of no concern. Runge-Kutta succeedsvirtually always; but it is not usually fastest, except when evaluating fi is cheap and−5moderate accuracy (<∼ 10 ) is required. Predictor-corrector methods, since theyuse past information, are somewhat more difficult to start up, but, for many smoothproblems, they are computationally more efficient than Runge-Kutta.

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

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

Тип файла PDF

PDF-формат наиболее широко используется для просмотра любого типа файлов на любом устройстве. В него можно сохранить документ, таблицы, презентацию, текст, чертежи, вычисления, графики и всё остальное, что можно показать на экране любого устройства. Именно его лучше всего использовать для печати.

Например, если Вам нужно распечатать чертёж из автокада, Вы сохраните чертёж на флешку, но будет ли автокад в пункте печати? А если будет, то нужная версия с нужными библиотеками? Именно для этого и нужен формат PDF - в нём точно будет показано верно вне зависимости от того, в какой программе создали PDF-файл и есть ли нужная программа для его просмотра.

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

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