c17-4 (779604)

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

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

772Chapter 17.Two Point Boundary Value Problems}“Algebraically Difficult” Sets of Differential EquationsRelaxation methods allow you to take advantage of an additional opportunity that, whilenot obvious, can speed up some calculations enormously. It is not necessary that the setof variables yj,k correspond exactly with the dependent variables of the original differentialequations. They can be related to those variables through algebraic equations. Obviously, itis necessary only that the solution variables allow us to evaluate the functions y, g, B, C thatare used to construct the FDEs from the ODEs. In some problems g depends on functions ofy that are known only implicitly, so that iterative solutions are necessary to evaluate functionsin the ODEs. Often one can dispense with this “internal” nonlinear problem by defininga new set of variables from which both y, g and the boundary conditions can be obtaineddirectly.

A typical example occurs in physical problems where the equations require solutionof a complex equation of state that can be expressed in more convenient terms using variablesother than the original dependent variables in the ODE. While this approach is analogous toperforming an analytic change of variables directly on the original ODEs, such an analytictransformation might be prohibitively complicated.

The change of variables in the relaxationmethod is easy and requires no analytic manipulations.CITED REFERENCES AND FURTHER READING:Eggleton, P.P. 1971, Monthly Notices of the Royal Astronomical Society, vol. 151, pp. 351–364.[1]Keller, H.B. 1968, Numerical Methods for Two-Point Boundary-Value Problems (Waltham, MA:Blaisdell).Kippenhan, R., Weigert, A., and Hofmeister, E.

1968, in Methods in Computational Physics,vol. 7 (New York: Academic Press), pp. 129ff.17.4 A Worked Example: Spheroidal HarmonicsThe best way to understand the algorithms of the previous sections is to seethem employed to solve an actual problem. As a sample problem, we have selectedthe computation of spheroidal harmonics. (The more common name is spheroidalangle functions, but we prefer the explicit reminder of the kinship with sphericalharmonics.) We will show how to find spheroidal harmonics, first by the methodof relaxation (§17.3), and then by the methods of shooting (§17.1) and shootingto a fitting point (§17.2).Spheroidal harmonics typically arise when certain partial differentialequations are solved by separation of variables in spheroidal coordinates.

Theysatisfy the following differential equation on the interval −1 ≤ x ≤ 1: dSm2d(1 − x2 )+ λ − c2 x 2 −S=0(17.4.1)dxdx1 − x2Sample 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).for (j=jz1;j<=jz2;j++) {Loop over columns to be zeroed.for (l=jm1;l<=jm2;l++) {Loop over columns altered.vx=c[ic][l+loff][kc];for (i=iz1;i<=iz2;i++) s[i][l] -= s[i][j]*vx;Loop over rows.}vx=c[ic][jcf][kc];for (i=iz1;i<=iz2;i++) s[i][jmf] -= s[i][j]*vx;Plus final element.ic += 1;}17.4 A Worked Example: Spheroidal Harmonics773S = (1 ± x)α∞Xak (1 ± x)k(17.4.2)k=0in equation (17.4.1), we find that the regular solution has α = m/2.

(Without lossof generality we can take m ≥ 0 since m → −m is a symmetry of the equation.)We get an equation that is numerically more tractable if we factor out this behavior.Accordingly we setS = (1 − x2 )m/2 y(17.4.3)We then find from (17.4.1) that y satisfies the equation(1 − x2 )d2 ydy+ (µ − c2 x2 )y = 0− 2(m + 1)x2dxdx(17.4.4)whereµ ≡ λ − m(m + 1)(17.4.5)Both equations (17.4.1) and (17.4.4) are invariant under the replacementx → −x. Thus the functions S and y must also be invariant, except possibly for anoverall scale factor.

(Since the equations are linear, a constant multiple of a solutionis also a solution.) Because the solutions will be normalized, the scale factor canonly be ±1. If n − m is odd, there are an odd number of zeros in the interval (−1, 1).Thus we must choose the antisymmetric solution y(−x) = −y(x) which has a zeroat x = 0. Conversely, if n − m is even we must have the symmetric solution. Thusymn (−x) = (−1)n−m ymn (x)(17.4.6)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).Here m is an integer, c is the “oblateness parameter,” and λ is the eigenvalue. Despitethe notation, c2 can be positive or negative. For c2 > 0 the functions are called“prolate,” while if c2 < 0 they are called “oblate.” The equation has singular pointsat x = ±1 and is to be solved subject to the boundary conditions that the solution beregular at x = ±1. Only for certain values of λ, the eigenvalues, will this be possible.If we consider first the spherical case, where c = 0, we recognize the differentialequation for Legendre functions Pnm (x). In this case the eigenvalues are λmn =n(n + 1), n = m, m + 1, . .

. . The integer n labels successive eigenvalues forfixed m: When n = m we have the lowest eigenvalue, and the correspondingeigenfunction has no nodes in the interval −1 < x < 1; when n = m + 1 we havethe next eigenvalue, and the eigenfunction has one node inside (−1, 1); and so on.A similar situation holds for the general case c2 6= 0. We write the eigenvaluesof (17.4.1) as λmn (c) and the eigenfunctions as Smn (x; c).

For fixed m, n =m, m + 1, . . . labels the successive eigenvalues.The computation of λmn (c) and Smn (x; c) traditionally has been quite difficult.Complicated recurrence relations, power series expansions, etc., can be foundin references [1-3]. Cheap computing makes evaluation by direct solution of thedifferential equation quite feasible.The first step is to investigate the behavior of the solution near the singularpoints x = ±1. Substituting a power series expansion of the form774Chapter 17.Two Point Boundary Value Problemsand similarly for Smn .The boundary conditions on (17.4.4) require that y be regular at x = ±1. Inother words, near the endpoints the solution takes the formy = a0 + a1 (1 − x2 ) + a2 (1 − x2 )2 + .

. .(17.4.7)µ − c2a04(m + 1)(17.4.8)µ − c2y(1)2(m + 1)(17.4.9)a1 = −Equivalently,y0 (1) =A similar equation holds at x = −1 with a minus sign on the right-hand side.The irregular solution has a different relation between function and derivative atthe endpoints.Instead of integrating the equation from −1 to 1, we can exploit the symmetry(17.4.6) to integrate from 0 to 1. The boundary condition at x = 0 isy(0) = 0,n − m oddy0 (0) = 0,n − m even(17.4.10)A third boundary condition comes from the fact that any constant multipleof a solution y is a solution.

We can thus normalize the solution. We adopt thenormalization that the function Smn has the same limiting behavior as Pnm at x = 1:lim (1 − x2 )−m/2 Smn (x; c) = lim (1 − x2 )−m/2 Pnm (x)x→1x→1(17.4.11)Various normalization conventions in the literature are tabulated by Flammer [1].Imposing three boundary conditions for the second-order equation (17.4.4)turns it into an eigenvalue problem for λ or equivalently for µ. We write it in thestandard form by settingy1 = yy2 = y0y3 = µ(17.4.12)(17.4.13)(17.4.14)Theny10 = y2(17.4.15)y20(17.4.16)1 =2x(m + 1)y2 − (y3 − c2 x2 )y121−xy30 = 0(17.4.17)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.

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

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

Тип файла PDF

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

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

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

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