Newton's interpolation polynomials. Interpolation polynomial in Newton form Practical assessment of errors of Newton's interpolation formulas

Let the function y=f(x) be given on the segment, which is divided into n identical segments (the case of equidistant argument values). x=h=const. For each node x 0, x 1 =x 0 +h,..., x n =x 0 +n h the function values ​​are defined in the form: f(x 0)=y 0, f(x 1)=y 1,.. ., f(x n)=y n.


First order finite differences y 0 = y 1 – y 0 y 1 = y 2 – y y n-1 = y n – y n-1. Finite differences of the second order 2 y 0 = y 1 – y 0 2 y 1 = y 2 – y y n-2 = y n-1 – y n-2 Finite differences of higher orders are defined similarly: k y 0 = k-1 y 1 – k-1 y 0 k y 1 = k-1 y 2 – k-1 y k y i = k-1 y i+1 – k-1 y i, i = 0,1,...,n-k.






Let the function y = f(x) be given the values ​​y i = f(x i) for equal values ​​of the independent variables: x n = x 0 +nh, where h is the interpolation step. It is necessary to find a polynomial P n (x) of degree no higher than n, taking at points (nodes) x i the values: P n (x i) = y i, i=0,...,n. Let us write the interpolating polynomial in the form:


The problem of constructing a polynomial comes down to determining the coefficients a i from the conditions: P n (x 0)=y 0 P n (x 1)=y P n (x n)=y n






Other coefficients can be found similarly. The general formula is: Substituting these expressions into the polynomial formula, we obtain: where x i,y i – interpolation nodes; x – current variable; h – difference between two interpolation nodes h – constant value, i.e. interpolation nodes are equally spaced from each other.
































The peculiarity of interpolation was that the interpolating function strictly passes through the nodal points of the table, i.e. the calculated values ​​coincided with the table ones: y i =f(x i). This feature was due to the fact that the number of coefficients in the interpolating function (m) was equal to the number of tabular values ​​(n)














4. It is impossible to describe tabular data in which there are several points with the same argument value using an interpolating function. This situation is possible if the same experiment is carried out several times with the same initial data. However, this is not a limitation for the use of approximation, where the condition of the function graph passing through each point is not set.

Hi all. Quite recently I encountered a problem on my new phone, to solve which I needed to get some APK files from the firmware. After searching the Internet for ways to solve this problem, I came across an interesting utility that helped me solve this problem.

For work we will need: ext4_unpacker_exe.zipext2explore-2.2.71.zip
We disassemble the Android firmware. Unpack the *.zip archive with the firmware into any folder. Launch the utility ext4_unpacker.exe and select the file system.img.

After opening the file, click on the save as button.

We write the file name with the extension .ext4(For example system.ext4).

After unpacking is complete, run the utility ext2explore.exe on behalf of the administrator ( important!).In the tab File choose...

The program is divided into two threads in one of which sorting is performed, and in the other the graphical interface is redrawn. After clicking on the “Sort” button, the program calls the “RunSorting” method, in which the sorting algorithm is defined and a new thread is created with the sorting process running in it.
private void RunSo…

Today I want to show my Kacher, which I did in the past winter holidays. I will not describe the entire manufacturing process, since there are many articles on the Internet. I will write only about its main parameters.

Below are a few photos taken during assembly of the device.

The coil is wound with approximately 2000 turns of 0.08 mm wire on a PVC pipe with a diameter of 50 mm and a height of 200 mm.

A plate from an old hard drive was used as a terminal. Everything else was assembled according to the diagram located at the very bottom of the page.

The first option was powered from the power supply of an old computer, with a voltage of 12 V. Then a separate power supply was made, with a voltage of 30 V and with built-in cooling.

Device diagram:

Cross-Country Resource Sharing (CORS) is a W3C specification that allows cross-domain communication in the browser. By building on top of the XMLHttpRequest object, CORS allows developers to work with the same idioms as requests with the same domain. The use case for CORS is simple. Imagine that alice.com has some data that bob.com wants to obtain. This type of request is traditionally not allowed under the same browser origin policy. However, by supporting CORS requests, alice.com can add some special response headers that allow bob.com to access the data. As you can see from this example, CORS support requires coordination between the server and client. Luckily, if you're a client-side developer, you're protected from most of these details. The rest of this article shows how clients can perform cross-origin requests and how servers can configure themselves to support CORS. Continued…

When obtaining Newton's interpolation formulas, which are used for the same purposes as the Lagrange formula, we make the additional assumption that equidistant values ​​of the argument are considered. So let the function values y = f(x) specified for equidistant values x 0 , x 1 = x 0 + h, …, x n = x 0 + nh. These argument values ​​will correspond to the function values: y 0 =f(x 0),y 1 =f(x 1), …, y n = f(x n).

Let us write the required polynomial in the form

F( x) = a 0 + a 1 (x- x 0) + a 2 (x- x 0)(x- x 1) + a 3 (x- x 0)(x- x 1)(x- x 2) + …

…+ a n ( x- x 0)(x- x 1)…(x- x n -1) (3.9)

To determine the coefficients a 0 , a 1 ,..., a n put in (3.9) x = x 0 . Then at 0 = F(x 0)=a 0 . Further, assuming x=x 1 , we get at 1 =F(x 1) = a 0 + a 1 h , where

a 1 =

Continuing the calculation of the coefficients, let us put X =x 2. Then

y 2 = y 0 + 2h + a 2 2hh, y 2 – 2Δ y 0 = a 2 2h 2 ;

y 2 – 2y 1 + 2y 0 – y 0 = y 2 – 2y 1 + y 0 = a 2 2h 2 .

Based on (3.8), we obtain y 2 – 2y 1 + y 0 = Δ 2 y 0.

In exactly the same way we get

Similar further calculations allow us to write general formula for any coefficient A k:

Substituting the found expressions for the coefficients into formula (3.9), we obtain

The resulting formula is called Newton's first interpolation formula.

For practical use Newton's formula (3.10) is usually written in a transformed form. To do this, we introduce the notation

from here x = x 0 + ht.

Let's express it through t factors included in formula (3.10):

………………………..

Substituting the resulting expressions into formula (3.10), we finally obtain

Expression (3.11) represents the final form of Newton's first interpolation formula.

Example. Taking a step h = 0.05, construct Newton’s interpolation polynomial for the function on the segment y = e x ,specified by the table. 3.3.

Table 3.3

Note that in the difference columns, following common practice, we do not separate the decimal places with a comma, which is clear from the function value column.

Since third-order differences are practically constant, in formula (3.11) we put n = 3. Having accepted X 0 = 3,50 And at 0 = 33,115, we will have:

Newton's first interpolation formula is inconvenient for interpolating a function at the end of a table where the number of difference values ​​is small. In this case, Newton's second interpolation formula is applied, which we will now consider.

Let us write the required interpolation polynomial in the form

As before, the coefficients A 0 , A 1 ,… An are determined from the condition F(x i) = y i. Let us put in (3.12) X = X n. Then a 0 = y n.

In the same way, assuming x = x n -1, we get y n -1 = y n+ a 1 (x n -1 - x n),

and since x n -1 – x n = - h, That

The numerator of the last expression can be represented as follows:

yn –yn -1 – (yn -1 -yn -2)= Δ yn -1 -Δ yn -2 =Δ 2 yn -2 .

Continuing similar calculations, we obtain a general formula for the coefficients

After substituting all coefficient values ​​into (3.12), this formula takes the form

This is Newton's second interpolation formula. For ease of use, it, like the first one, is transformed by introducing the notation

= t or x= xn+th.

Let us now express it through t factors in formula (3.13):

……………………………………………..

Having made this replacement, we finally get:

Example. According to the table 3.5 values ​​of seven-digit logarithms for numbers from 1000 in increments of 10 find log 1044.

Table 3.5

x y Δ y Δ2 y Δ3 y
3,0000000 3,0043214 3,0086002 3,0128372 3,0170333 3,0211893 -426 -418 -409 -401

Let's accept xn= 1050,yn= 3,0211893;Δ yn-1 = 0,0041560;

Δ2 yn -2 = - 0.0000401;Δ 3 y n -3 = 0.0000008.Then for x= 1044 we get

Both the first and second Newton interpolation formulas can be used to extrapolate functions, that is, to find the values ​​of functions for the values ​​of arguments X , lying outside the table. Ifvalue x< x 0 and meaning x close to x 0 , then it is advantageous to use Newton’s first interpolation formula, and

If x > x 0 And x close to X n , then it is more convenient to use Newton’s second interpolation formula, and

Thus, Newton's first interpolation formula is usually used for forward interpolation and backward extrapolation, and Newton's second interpolation formula, on the contrary, is used for backward interpolation and forward extrapolation.

Example. Having a table 3.6 values ​​and differences,y = sin X: ranging from X= 15° to X = 55° in steps h= 5° , find sin 14 ° and sin 56 ° .

Table 3.6

x(0 C) y Δ y Δ2 y Δ3 y
0,2588 0,3420 0,4226 0,5000 0,5736 0,6428 0,7071 0,7660 0,8192 832 532 -26 -32 -38 -44 -49 -54 -57 -6 -6 -6 -5 -5 -3

Solution. To calculate sin14 0 let's accept x 0 = 15 0 And x= 14 0 , from here t = (14–15)/5 = – 0,2.

Here we need to extrapolate backwards, so we apply Newton’s first interpolation formula and the finite differences underlined with a single line:

sin14 0 = 0,2588 + (– 0,2)0,0832+ (– 0,0026) +

+ (–0,0006) = 0,242.

To find sin56 0 let's accept xn= 55 0 And x= 56 0 , from here t= .

Applying Newton's second interpolation formula (3.14) and using the double-underlined differences, we will have:

sin56 0 = 0,8192+ 0.2·0.0532 + (- 0,0057)+ (- 0,0003)= 0,83.

Newton's first interpolation formula is practically inconvenient for interpolating a function near table nodes. In this case it is usually used .

Description of the task . Let us have a sequence of function values

for equidistant argument values, where is the interpolation step. Let's construct a polynomial of the following form:

or, using the generalized power, we get:

Then, if the equality holds, we get

Let's substitute these values ​​into formula (1). Then, finally, Newton's second interpolation formula has the form:

Let us introduce a more convenient notation for formula (2). Let it be then

Substituting these values ​​into formula (2), we obtain:

This is the usual view Newton's second interpolation formula. To approximate the calculation of the function values, assume:

Both Newton's first and second interpolation formulas can be used to extrapolate a function, that is, to find function values ​​for argument values ​​outside the table.

If it is close to, then it is advantageous to apply Newton’s first interpolation formula, and then. If it’s close to, then it’s more convenient to use Newton’s second interpolation formula, moreover.

Thus, Newton's first interpolation formula is usually used for forward interpolation And extrapolating backwards, and Newton’s second interpolation formula, on the contrary, for interpolating backwards And forward extrapolation.

Note that the extrapolation operation, generally speaking, is less accurate than the interpolation operation in the narrow sense of the word.

Example. Taking the step, construct the Newton interpolation polynomial for the function given by the table

Solution. We compile a table of differences (Table 1). Since third-order differences are practically constant, we assume in formula (3). Having accepted, we will have:

This is the desired Newton interpolation polynomial.

Table 1

  • 0,875
  • 0,7088
  • 0,5361
  • 0,3572
  • 0,173
  • -0,0156
  • -0,20
  • -0,1662
  • -0,1727
  • -0,1789
  • -0,1842
  • -0,1886
  • -0,1925
  • -0,0065
  • -0,0062
  • -0,0053
  • -0,0044
  • -0,0039
  • 0,0003
  • 0,0009
  • 0,0009
  • 0,0005