10991

Numerical Integration

Лекция

Математика и математический анализ

2. Numerical Integration 2.1. Introduction Numerical integration which is also called quadrature has a history extending back to the invention of calculus and before. The fact that integrals of elementary functions could not in general be computed analytically while derivatives could be served to give the field a certain panache and to set it a cut above the arithmetic drudgery of numerical analysis during the whole of the 18th and 19th centuries. With the invention of automa...

Английский

2013-04-03

156.5 KB

0 чел.

2. Numerical Integration

2.1. Introduction

Numerical integration, which is also called quadrature, has a history extending back to the invention of calculus and before. The fact that integrals of elementary functions could not, in general, be computed analytically, while derivatives could be, served to give the field a certain panache, and to set it a cut above the arithmetic drudgery of numerical analysis during the whole of the 18th and 19th centuries.

With the invention of automatic computing, quadrature became just one numerical task among many, and not a very interesting one at that. Automatic computing, even the most primitive sort involving desk calculators and rooms full of “computers” (that were, until the 1950s, people rather than machines), opened to feasibility the much richer field of numerical integration of differential equations. Quadrature is merely the simplest special case: The evaluation of the integral

    (2.1)

is precisely equivalent to solving for the value I = y(b) the differential equation

     (2.2)

with the boundary condition y(a) = 0.

The quadrature methods in this chapter are based, in one way or another, on the obvious device of adding up the value of the integrand at a sequence of abscissas within the range of integration. The game is to obtain the integral as accurately as possible with the smallest number of function evaluations of the integrand. Just as in the case of interpolation, one has the freedom to choose methods of various orders, with higher order sometimes, but not always, giving higher accuracy.

There are yet other methods for obtaining integrals. One important class is based on function approximation. Some integrals related to Fourier transforms can be calculated using the fast Fourier transform (FFT) algorithm. There is the important technique of Monte-Carlo integration for multidimensional integrals.

2.2. Classical Formulas for Equally Spaced Abscissas

Where would any book on numerical analysis be without Mr. Simpson and his “rule”? The classical formulas for integrating a function whose values are known at equally spaced steps have certain elegance about them, and they are redolent of historical association. Through them, the modern numerical analyst communes with the spirits of his or her predecessors back across the centuries, as far as the time of Newton, if not farther. Alas, times do change; with the exception of two of the most modest formulas (“extended trapezoidal rule,” and “extended midpoint rule”), the classical formulas are almost entirely useless.

The Newton – Cotes formulas are the most common numerical integration schemes. They are based on the strategy of replacing a complicated function or tabulated date with an approximating function that is easy to integrate:

.    (2.3)

In this formula fn(x) is a polynomial of the form

,

where n is the order of polynomial.

Some notation: We have a sequence of abscissas, denoted x0, x1, … xN, xN+1 which are spaced apart by a constant step h,

.   (2.4)

A function f(x) has known values at the xi’s,  f(xi) = fi. We want to integrate the function f(x) between a lower limit a and an upper limit b, where a and b are each equal to one or the other of the xi’s.

Figure 2.1. Quadrature formulas with equally spaced abscissas compute the integral of a function between x0 and xN+1.

An integration formula that uses the values of the function at the endpoints, f(a) or f(b), is called a closed formula. Closed formulas evaluate the function on the boundary points, while open formulas refrain from doing so (useful if the evaluation algorithm breaks down on the boundary points).

Occasionally, we want to integrate a function whose value at one or both endpoints is difficult to compute (e.g., the computation of f goes to a limit of zero over zero there, or worse yet has an integrable singularity there). In this case we want an open formula, which estimates the integral using only xi’s strictly between a and b. The basic building blocks of the classical formulas are rules for integrating a function over a small number of intervals. As that number increases, we can find rules that are exact for polynomials of increasingly high order. (Keep in mind that higher order does not always imply higher accuracy in real cases.) A sequence of such closed formulas is now given.

2.3. Closed Newton-Cotes Formulas

Trapezoidal rule

The trapezoidal rule is the first of the Newton-Cotes closed integration formulas. It corresponds to the case where the polynomial in (2.3) is first-order:

 (2.5)

Geometrically, the trapezoidal rule is equivalent to approximating the area of the trapezoid under the straight line connecting f1 and f2. Here the error term O( ) signifies that the true answer differs from the estimate by an amount that is the product of some numerical coefficient h3 times the value of the function’s second derivative somewhere in the interval of integration. The coefficient is knowable, and it can be found in all the standard references on this subject. The point at which the second derivative is to be evaluated is, however, unknowable. If we knew it, we could evaluate the function there and have a higher-order method! Since the product of a knowable and an unknowable is unknowable, we will streamline our formulas and write only O( ), instead of the coefficient. Equation (2.5) is a two-point formula (x1 and x2). It is exact for polynomials up to and including degree 1, i.e., f(x) = x. One anticipates that there is a three-point formula exact up to polynomials of degree 2. This is true; moreover, by a cancellation of coefficients due to left-right symmetry of the formula, the three-point formula is exact for polynomials up to and including degree 3, i.e., f(x) = x3.

Simpson’s rule:

Consider the area under the graph of y = f(x) between x = a - h and x = a + h. In Simpson's method, this area is approximated by the area under the parabola passing through the points (a - h, f(a - h)), (a, f(a)),
(a + h, f(a + h)). Now we need to get an expression for the area under the parabola.

Figure 2.2. Simpson’s formula with equally spaced abscissas compute the integral of a function between a - h and a + h.

If we reliable the x-coordinate of the points as x1, x2 and x3 we have

(2.6)

Here f(4) is the fourth derivative of the function f evaluated at an unknown point in the interval. Note also that the formula gives the integral over an interval of size 2h, so the coefficients add up to 2. There is no lucky cancellation in the four-point formula, so it is also exact for polynomials up to and including degree 3.

2.4. Extrapolative Formulas for a Single Interval

We are going to depart from historical practice for a moment. Many texts would give, at this point, a sequence of “Newton-Cotes Formulas of Open Type.” Here is an example:

(2.7)

Notice that the integral from a = x0 to b = x5 is estimated, using only the interior points x1; x2; x3; x4. Instead of the Newton-Cotes open formulas, let us set out the formulas for estimating the integral in the single interval from x0 to x1, using values of the function f at x1; x2; …. These will be useful building blocks for the “extended” open formulas:

 (2.8)

PAGE  1


EMBED PBrush  

EMBED Word.Picture.8  


 

А также другие работы, которые могут Вас заинтересовать

59515. Геній Івана Франка 70.5 KB
  Ведучий. Мабуть, твори Івана Франка народилися з пилинки вогню. Незбагненна клітинка божественного пломеню, «правдива іскра Прометея», залетіла з батьківського ковадла ще в дитяче серце поета, вибухнула вулканом любові до праці, до правди, до свободи...
59516. Як ми знаємо творчість Т.Г.Шевченка 70.5 KB
  Добрий день юні шанувальники творчості Кобзаря дорогі глядачі вболівальники судді Сьогодні ми присутні з вами на конкурсі знавців творчості Тараса Григоровича Шевченка. Кожна команда повинна за 10 хвилин розповісти про Тараса Шевченка...
59517. Свято Андрія 43 KB
  Добрий вечір хазяєчко А чи можна до вас на вечорниці Господиня: Заходьте заходьте дівчата. 2 Дівчина. Чули щось грюкнуло за дверима 3 Дівчина. Всі: Дівчаточка відпустіть мене Що хочете зроблю будьяке бажання виконаю 1 Дівчина: Відгадай загадку...
59518. Палац культурної людини (мовний етикет) 53.5 KB
  Обладнання: Картки правил поведінки; картки завдань для команд; музика; картина. Продовжувати мандрівку від однієї зупинки до іншої можна тільки тоді коли чергова команда виконає всі завдання зупинки.
59519. Виготовлення новорічних ялинкових прикрас (гірлянди “Сніговики”, “Ялинки”, “Дзвоники”, “Зірочки”) 54 KB
  Організація дітей до роботи Привітання Сьогодні до нас на заняття діти завітали гості. Вступна бесіда Чи вірите ви діти у дива Відповідь учнів Я запитала про дива саме тому бо сьогоднішнє заняття наше буде незвичайним. Ми діти знаємо що в передноворічні...
59520. Інтелектуальна гра “Чи знаєш ти свій край” 55 KB
  Обладнання: історія України портрет гетьманів України. Для того щоб їхня участь у змаганні дала бажані результати їм треба знати: а український алфавіт; б міста гори ріки та озера природоохоронні зони України...
59521. Виховна година: “Батькова криниця” 42 KB
  Учитель. Вітцівська хата, мамина пісня, дідусева казка, бабусина вишиванка, незамулена батькова криниця, з якої пив воду філософ чи мандрівник; старі жорна, що годували в тяжке лихоліття дітей, портрет на стіні найдорожчої людини...
59522. Свято козацького роду (у дошкільному закладі) 79.5 KB
  Гостей дорогих ми вітаємо щиро Покозацьки стрічаємо з хлібом і миром. 2й учень: Для гостей відкрита Наша хата біла Тільки б чужа кривда До нас не забігла. 3й учень: Хліб духмяний в хаті Сяють очі щирі Хай живеться в правді Хай живеться в мирі.
59523. Сценарій до Дня української писемності й мови: “Рідна мова чиста, як роса” 70.5 KB
  1й учень О слово рідне Пращура молитво Громи Перука Велеса поля Софія Київська творіння Ярослава Словяномовна праведна земля. 2й учень В мені в тобі Бояна віщим співом Воно живе здолавши тьму віків Воно Мстиславича Романа голос і ратний клич Данилових полків.