c17-0 (779600)

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

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

17.0 IntroductionWhen ordinary differential equations are required to satisfy boundary conditionsat more than one value of the independent variable, the resulting problem is called atwo point boundary value problem. As the terminology indicates, the most commoncase by far is where boundary conditions are supposed to be satisfied at two points —usually the starting and ending values of the integration. However, the phrase “twopoint boundary value problem” is also used loosely to include more complicatedcases, e.g., where some conditions are specified at endpoints, others at interior(usually singular) points.The crucial distinction between initial value problems (Chapter 16) and twopoint boundary value problems (this chapter) is that in the former case we are ableto start an acceptable solution at its beginning (initial values) and just march it alongby numerical integration to its end (final values); while in the present case, theboundary conditions at the starting point do not determine a unique solution to startwith — and a “random” choice among the solutions that satisfy these (incomplete)starting boundary conditions is almost certain not to satisfy the boundary conditionsat the other specified point(s).It should not surprise you that iteration is in general required to meld thesespatially scattered boundary conditions into a single global solution of the differentialequations.

For this reason, two point boundary value problems require considerablymore effort to solve than do initial value problems. You have to integrate your differential equations over the interval of interest, or perform an analogous “relaxation”procedure (see below), at least several, and sometimes very many, times. Only inthe special case of linear differential equations can you say in advance just howmany such iterations will be required.The “standard” two point boundary value problem has the following form: Wedesire the solution to a set of N coupled first-order ordinary differential equations,satisfying n1 boundary conditions at the starting point x1 , and a remaining set ofn2 = N − n1 boundary conditions at the final point x2 .

(Recall that all differentialequations of order higher than first can be written as coupled sets of first-orderequations, cf. §16.0.)The differential equations aredyi (x)= gi (x, y1 , y2 , . . . , yN )dx753i = 1, 2, . . . , N(17.0.1)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).Chapter 17.

Two Point BoundaryValue Problems754Chapter 17.Two Point Boundary Value Problems1desiredboundaryvalue2requiredboundaryvaluexFigure 17.0.1. Shooting method (schematic). Trial integrations that satisfy the boundary condition at oneendpoint are “launched.” The discrepancies from the desired boundary condition at the other endpoint areused to adjust the starting conditions, until boundary conditions at both endpoints are ultimately satisfied.At x1 , the solution is supposed to satisfyB1j (x1 , y1 , y2 , . . .

, yN ) = 0j = 1, . . . , n1(17.0.2)k = 1, . . . , n2(17.0.3)while at x2 , it is supposed to satisfyB2k (x2 , y1 , y2 , . . . , yN ) = 0There are two distinct classes of numerical methods for solving two pointboundary value problems. In the shooting method (§17.1) we choose values for allof the dependent variables at one boundary. These values must be consistent withany boundary conditions for that boundary, but otherwise are arranged to dependon arbitrary free parameters whose values we initially “randomly” guess. We thenintegrate the ODEs by initial value methods, arriving at the other boundary (and/or anyinterior points with boundary conditions specified). In general, we find discrepanciesfrom the desired boundary values there.

Now we have a multidimensional rootfinding problem, as was treated in §9.6 and §9.7: Find the adjustment of the freeparameters at the starting point that zeros the discrepancies at the other boundarypoint(s). If we liken integrating the differential equations to following the trajectoryof a shot from gun to target, then picking the initial conditions corresponds to aiming(see Figure 17.0.1). The shooting method provides a systematic approach to takinga set of “ranging” shots that allow us to improve our “aim” systematically.As another variant of the shooting method (§17.2), we can guess unknown freeparameters at both ends of the domain, integrate the equations to a common midpoint,and seek to adjust the guessed parameters so that the solution joins “smoothly” atthe fitting point.

In all shooting methods, trial solutions satisfy the differentialequations “exactly” (or as exactly as we care to make our numerical integration),but the trial solutions come to satisfy the required boundary conditions only afterthe iterations are finished.Relaxation methods use a different approach. The differential equations arereplaced by finite-difference equations on a mesh of points that covers the range ofSample 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).3y75517.0 Introductioni nitrue solutionti alguessrequiredboundaryvaluerequiredboundaryvalueFigure 17.0.2. Relaxation method (schematic). An initial solution is guessed that approximately satisfiesthe differential equation and boundary conditions.

An iterative process adjusts the function to bring itinto close agreement with the true solution.the integration. A trial solution consists of values for the dependent variables at eachmesh point, not satisfying the desired finite-difference equations, nor necessarily evensatisfying the required boundary conditions. The iteration, now called relaxation,consists of adjusting all the values on the mesh so as to bring them into successivelycloser agreement with the finite-difference equations and, simultaneously, with theboundary conditions (see Figure 17.0.2).

For example, if the problem involves threecoupled equations and a mesh of one hundred points, we must guess and improvethree hundred variables representing the solution.With all this adjustment, you may be surprised that relaxation is ever an efficientmethod, but (for the right problems) it really is! Relaxation works better thanshooting when the boundary conditions are especially delicate or subtle, or wherethey involve complicated algebraic relations that cannot easily be solved in closedform. Relaxation works best when the solution is smooth and not highly oscillatory.Such oscillations would require many grid points for accurate representation.

Thenumber and position of required points may not be known a priori. Shooting methodsare usually preferred in such cases, because their variable stepsize integrations adjustnaturally to a solution’s peculiarities.Relaxation methods are often preferred when the ODEs have extraneoussolutions which, while not appearing in the final solution satisfying all boundaryconditions, may wreak havoc on the initial value integrations required by shooting.The typical case is that of trying to maintain a dying exponential in the presenceof growing exponentials.Good initial guesses are the secret of efficient relaxation methods.

Often onehas to solve a problem many times, each time with a slightly different value of someparameter. In that case, the previous solution is usually a good initial guess whenthe parameter is changed, and relaxation will work well.Until you have enough experience to make your own judgment between the twomethods, you might wish to follow the advice of your authors, who are notoriouscomputer gunslingers: We always shoot first, and only then relax.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).1 st it e r a t i o n2 n d it e r a ti o n756Chapter 17.Two Point Boundary Value ProblemsProblems Reducible to the Standard Boundary Problemdyi (x)= gi (x, y1 , . .

. , yN , λ)dx(17.0.4)and one has to satisfy N + 1 boundary conditions instead of just N . The problemis overdetermined and in general there is no solution for arbitrary values of λ. Forcertain special values of λ, the eigenvalues, equation (17.0.4) does have a solution.We reduce this problem to the standard case by introducing a new dependentvariableyN+1 ≡ λ(17.0.5)dyN+1=0dx(17.0.6)and another differential equationAn example of this trick is given in §17.4.The other case that can be put in the standard form is a free boundary problem.Here only one boundary abscissa x1 is specified, while the other boundary x2 is tobe determined so that the system (17.0.1) has a solution satisfying a total of N + 1boundary conditions.

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

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

Тип файла PDF

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

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

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

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