Главная » Все файлы » Просмотр файлов из архивов » PDF-файлы » Thompson - Computing for Scientists and Engineers

Thompson - Computing for Scientists and Engineers, страница 13

PDF-файл Thompson - Computing for Scientists and Engineers, страница 13 Численные методы (775): Книга - 6 семестрThompson - Computing for Scientists and Engineers: Численные методы - PDF, страница 13 (775) - СтудИзба2013-09-15СтудИзба

Описание файла

PDF-файл из архива "Thompson - Computing for Scientists and Engineers", который расположен в категории "". Всё это находится в предмете "численные методы" из 6 семестр, которые можно найти в файловом архиве . Не смотря на прямую связь этого архива с , его также можно найти и в других разделах. Архив можно найти в разделе "книги и методические указания", в предмете "численные методы и алгоритмы" в общих файлах.

Просмотр PDF-файла онлайн

Текст 13 страницы из PDF

Notice that the statement of thetheorem contains a, but y (x) does not depend on a.The most direct proof of Taylor’s theorem, although not an obvious proof, is bythe method of induction, a simple example of which is given in Exercise 3.1. Wewill show that if the theorem is true for n, then it must be true for n + 1. Byshowing that the theorem indeed holds for n = 0, we will then know that it is truefor all values of n. The proof proceeds as follows.Since the statement of the theorem, (3.6), claims that y (x) is independent of n,we should be able to prove that the difference between yn+1 and yn is zero.Exercise 3.7(a) Use (3.6) applied for n and then for n + 1 to show that(3.10)Now use integration by parts to show that the difference between the two remainders exactly cancels the first term on the right side of this equation, so thatthe result is zero and the value of the expansion is indeed independent of n.(b) Show that for n = 0 the expression (3.10) becomes, including the calculation of the remainder,(3.11)so that the theorem holds for n = 0.

Therefore, byfor n = 0+l, and therefore for n = 1+1, … . nabove induction, it holdsThus we have proved Taylor’s theorem. In order to be mathematically punctilious,we should enquire more carefully into the conditions for the required derivatives toexist at the point x = a. Rather than delve into these points here, you may followup on them in texts such as Protter and Morrey or Taylor and Mann.

In the nextsubsection we consider some general aspects of interpreting Taylor series before wederive Taylor expansions of some common and useful functions.Interpreting Taylor seriesTaylor’s theorem may well be true, but what’s the point of it? The first puzzle maybe to understand the meaning and use of the quantity a in a Taylor series. Formally,this quantity is arbitrary, apart from the requirement of being able to compute thefirst n derivatives at x = a. Practically, we want the power series in the variable(x - a) that appears in (3.6) to converge rapidly for the range of x that is of interestfor a particular problem. Therefore, a should preferably be chosen in the midrangeof x values concerned.60POWER SERIESYour second question may well be, what is to be done with the remainder after nterms, R n? If it could be calculated exactly, one might as well have computed y (x )itself. One therefore usually wants to choose the parameters a and n in the Taylorseries so that, according to some estimate of R n, its effect on the value of y (x ) issuitably negligible.A common choice of a is that a = 0, in which case the Taylor series is called aMaclaurin series.

An example will clarify the relations between n and theremainder term Rn .Exercise 3.8Suppose that y (x) is a polynomial of degree N in the variable x(3.12)Show that the coefficients ak and the derivatives of the polynomial are related by(3.13)in accordance with the general formula (3.6). Show also that the remainder Rnin the Taylor expansion of this polynomial is, in general, nonzero for n < N andis identically zero for nN. nWith this introduction to the interpretation of Taylor’s theorem, we are ready todevelop specific Taylor expansions.

From these examples we will further clarifyour interpretation of Taylor and Maclaurin series. Further, they serve as the basisfor many other numerical developments that we make.3.2 TAYLOR EXPANSIONS OF USEFUL FUNCTIONSIn this section we discuss the Taylor expansions of useful functions, starting withthe exponential, exp (x), which will be our paradigm for the other functions considered. These are: the circular functions cos x and sin x, the inverse circularfunction arcsin x, the natural logarithm 1n (1+x), the function x1 n (x), and thehyperbolic functions cosh x and sinh x . The exponential will be developed inenough detail that the techniques of Taylor expansions will become clear to you,then the other functions will be considered in a more cursory way.The exponential function also serves as the model for distinguishing betweenanalytical and numerical convergence properties of power series.

Testing the numerical convergence of series for the other functions that we are about to discuss is thetopic of Project 3 in Section 3.5.3.2 TAYLOR EXPANSIONS OF USEFUL FUNCTIONS61Expansion of exponentialsThe ingredients of the analytical recipes for expanding functions by using Taylor’stheorem, (3.6), are the choice of a and the values of the derivatives of the functionevaluated at the point x = a. For the exponential function, y ( X ) = exp (X ), thesederivatives are especially simple because they are all equal(3.14)Therefore in (3.6) there is a common factor of ea in every term of the series.

Thepower-series expansion of the exponential can therefore be written(3.15)in which the remainder after n terms of the expansion, Rn , is given by substitutingthe derivative (3.14) into (3.6):(3.16)Exercise 3.9Show that an upper bound on this remainder can be obtained by substituting theupper bound on the exponential in the range x to a, to obtain(3.17)which shows that the series will gradually converge because of the factorialterm. nNotice in (3.15) that division throughout by the factor exp (a) produces a powerseries for exp (x-a) in terms of the variable (x-a). Thus, apart from the relabeling of the variable (a shift of origin from zero to a), the parameter a is of no significance here. Henceforth, we discuss only the Maclaurin expansion, which hasa = 0.

In compact form the Maclaurin expansion of the exponential function is(3.18)By comparison with the geometric series in Section 3.1, whose range of convergence is strictly limited (as shown in Figure 3.1), the exponential function Maclaurin series converges (at least analytically) for all values of the argument x.

Weshow examples of this convergence in Figure 3.2 for the same numerical values ofthe arguments as used in the geometric series in Figure 3.1.62POWER SERIESFIGURE 3.2 Convergence of the Maclaurin series for the exponential function. Compare withFigure 3.1 for the geometric series with the same values of the arguments.For all three arguments of the exponential, x = -1, 0.6, and 1.01, the powerseries converges to within 0.1% of the exponential function value by n = 5 terms.Note the key difference between the geometric series (3.1) and the exponential series(3.18), namely that the latter has factorials in the denominator that inexorably diminish the contributions of successive terms.We should not be completely sanguine about this rapid convergence, because wehave restricted the three examples in Figure 3.2 to small values of the argument x,small enough that the powers of x in (3.18) do not initially overwhelm the factorials.It is therefore worthwhile to investigate the series numerically by using a computerprogram that we now devise.Computing the exponential seriesThe C-language function that we write for the power-series expansion of the exponential according to (3.18) also serves as the paradigm for the other power-seriesfunctions in Project 3 in Section 3.5.The power-series expansion of the exponential is given in Program 3.2.3.2 TAYLOR EXPANSIONS OF USEFUL FUNCTIONSPROGRAM 3.2 Power-series expansion for the exponential function.#include#include<stdio.h><math.h>/* Power Series for Exponential */doublexmin,dx,xmax,x,series,error;int int-kmax;double PSexp();printf("Power Series for Exponential\n");xmax = 2;while(xmax ! .= 0)printf("\n\nInput xmin,dx,xmax (xmax=0 to end),kmax:\n");scanf("%lf%lf%lf%i",&xmin,&dx,&xmax,&kmax);if ( xmax == 0 ){ printf("\nEnd Power Series for Exponential"); exit(O); }for ( x = xmin; x <= xmax; x = x+dx ){series = PSexp(x,kmax);error = exp(x)-series;printf("\n%g %g %g",x,series,error);double PSexp(x,kmax)/* Power Series function for exponential */double x;int kmax;double term,sum;int k;term=1; sum=l; /* initialize terms & sum */for ( k = 1; k <= kmax; k++ )term = x*term/k;sum= sum+term;return sum;6364POWER SERIESThe program Power Series for Exponential has a very straightforwardstructure.

The input variables xmin, dx, and xmax control the range and step sizesof the x values. For each x value the input variable kmax controls the range ofsummation for the exponential series (3.18). If the maximum x value, xmax, is input as zero, then program execution terminates gracefully. Otherwise, a for loopover the x values is run. For each x the series value is computed as series, then itis compared with the mathematical library function value exp (x) to calculate variable error.The power-series expansion for the exponential is in function PSexp.

This hasa loop over the k values in the sum (3.18), in which each term is computed by recurrence from the immediately preceding term before being added into the partial sum.Program Power Series for Exponential can now be used to explore thenumerical convergence of the exponential series. Since the exponential function alsoserves as a test function for numerical derivatives in Section 4.5, it is worthwhile tounderstand its numerical properties at this stage.Exercise 3.10(a) Code and test Power Series for Exponential as given in Program 3.2. Tests may be made against tabulated values of the exponential function. The kmax you choose for a given test x value should be large enough thatconvergence to significant accuracy is achieved.

Therefore, start with small xvalues (say 0.1) and small kmax values (say 5) before testing with larger values.(b) For input x values in the range zero to 2, check the convergence of the exponential series as a function of varying kmax. Compare your results with those inFigure 3.2. What do you conclude about the rate of convergence of this series,and what is the reason for this convergence property?(c) Modify the program so that for a given x the power-series expansions ofboth exp (-x) and exp (x) are computed. The program should then multiplytogether the series from the two expansions and subtract the result from unity.For positive x which series do you expect to converge faster? Is this what youobserve by changing kmax ? (Recall the discussion of alternating series in Section 3.1.) nFigure 3.3 shows representative values of the series expansion results comparedwith the exponential function calculated with the mathematical library function exp.By kmax = 10 agreement at parts per million is achieved even for x = 2.

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