• Give me an interpolation. Determining an intermediate value using linear interpolation

    There is a situation when you need to find intermediate results in an array of known values. In mathematics this is called interpolation. In Excel this method can be used both for tabular data and for building graphs. Let's look at each of these methods.

    The main condition under which interpolation can be used is that the desired value must be inside the data array and not outside its limit. For example, if we have a set of arguments 15, 21, and 29, then we can use interpolation to find the function for argument 25. But there is no longer any way to find the corresponding value for argument 30. This is the main difference between this procedure and extrapolation.

    Method 1: Interpolation for Tabular Data

    First of all, let's look at the applications of interpolation for data that is located in a table. For example, let's take an array of arguments and their corresponding function values, the relationship of which can be described linear equation. This data is shown in the table below. We need to find the corresponding function for the argument 28 . The easiest way to do this is using the operator PREDICTION.


    Method 2: Interpolate the graph using its settings

    The interpolation procedure can also be used when constructing function graphs. It is relevant if the table on which the graph is based does not indicate the corresponding function value for one of the arguments, as in the image below.


    As you can see, the graph has been corrected, and the gap has been removed using interpolation.

    Method 3: Interpolate the graph using a function

    You can also interpolate the graph using special function ND. It returns undefined values ​​in the specified cell.


    You can do it even easier without running Function Wizard, and just use the keyboard to enter the value into an empty cell "#N/A" without quotes. But it depends on what is more convenient for which user.

    As you can see, in Excel you can interpolate like tabular data using the function PREDICTION, and graphics. In the latter case, this can be done using the chart settings or using the function ND causing an error "#N/A". The choice of which method to use depends on the problem statement, as well as the personal preferences of the user.

    This term has other meanings, see Interpolation. About the function, see: Interpolant.

    Interpolation, interpolation (from lat. inter-polis - « smoothed, renewed, renewed; converted") - in computational mathematics, a method of finding intermediate values ​​of a quantity from an existing discrete set of known values. The term “interpolation” was first used by John Wallis in his treatise “The Arithmetic of the Infinite” (1656).

    In functional analysis, interpolation linear operators is a section that considers Banach spaces as elements of a certain category.

    Many of those who deal with scientific and engineering calculations often have to operate with sets of values ​​obtained empirically or by random sampling. As a rule, based on these sets, it is necessary to construct a function into which other obtained values ​​could fall with high accuracy. This problem is called approximation. Interpolation is a type of approximation in which the curve of the constructed function passes exactly through the available data points.

    There is also a task close to interpolation, which consists in approximating some complex function another, simpler function. If a certain function is too complex for productive calculations, you can try to calculate its value at several points, and from them build, that is, interpolate, more simple function. Of course, using a simplified function will not produce results as accurate as the original function. But in some classes of problems, the achieved gain in simplicity and speed of calculations may outweigh the resulting error in the results.

    Also worth mentioning is a completely different type of mathematical interpolation known as operator interpolation. Classic works on operator interpolation include the Riesz-Thorin theorem and the Marcinkiewicz theorem, which are the basis for many other works.

    Definitions

    Consider a system of non-coinciding points x i (\displaystyle x_(i)) (i ∈ 0 , 1 , … , N (\displaystyle i\in (0,1,\dots ,N))) from some region D (\displaystyle D) . Let the values ​​of the function f (\displaystyle f) be known only at these points:

    Y i = f (x i) , i = 1 , … , N . (\displaystyle y_(i)=f(x_(i)),\quad i=1,\ldots ,N.)

    The interpolation problem is to find a function F (\displaystyle F) from a given class of functions such that

    F (x i) = y i, i = 1, …, N. (\displaystyle F(x_(i))=y_(i),\quad i=1,\ldots ,N.)

    • Points x i (\displaystyle x_(i)) are called interpolation nodes, and their totality is interpolation grid.
    • Pairs (x i , y i) (\displaystyle (x_(i),y_(i))) are called data points or base points.
    • The difference between “neighboring” values ​​Δ x i = x i − x i − 1 (\displaystyle \Delta x_(i)=x_(i)-x_(i-1)) - interpolation grid step. It can be either variable or constant.
    • Function F (x) (\displaystyle F(x)) - interpolating function or interpolant.

    Example

    1. Let us have a table function, like the one described below, which for several values ​​of x (\displaystyle x) determines the corresponding values ​​of f (\displaystyle f):

    X (\displaystyle x) f (x) (\displaystyle f(x))

    0
    1 0,8415
    2 0,9093
    3 0,1411
    4 −0,7568
    5 −0,9589
    6 −0,2794

    Interpolation helps us to know what value such a function might have at a point other than the specified points (for example, when x = 2,5).

    By now there are many in various ways interpolation. The choice of the most appropriate algorithm depends on the answers to the questions: how accurate is the chosen method, what is the cost of using it, how smooth is the interpolation function, how many data points does it require, etc.

    2. Find the intermediate value (by linear interpolation).

    6000 15.5
    6378 ?
    8000 19.2

    15.5 + (6378 − 6000) 8000 − 6000 ∗ (19.2 − 15.5) 1 = 16.1993 (\displaystyle ?=15.5+(\frac ((6378-6000))(8000-6000))*(\frac ((19.2- 15.5))(1))=16.1993)

    In programming languages

    An example of linear interpolation for the function y = 3 x + x 2 (\displaystyle y=3x+x^(2)) . The user can enter a number from 1 to 10.

    Fortran

    program interpol integer i real x, y, xv, yv, yv2 dimension x(10) dimension y(10) call prisv(x, i) call func(x, y, i) write(*,*) "enter number: " read(*,*) xv if ((xv >= 1).and.(xv xv)) then yv2 = ((xv - x(i)) * (y(i+1) - y(i)) / (x(i+1) - x(i))) + y(i) end if end do end subroutine

    C++

    int main() ( system("COLOR 0A"); double ob, x1, x2, y1, y2, p1, p2, pi, skolko, status; system("echo Interpolation X1 - X2 "); system("echo Enter number: "); cin >> ob; system("echo For example 62, C1 = 60, L1 = 1.31, C2 = 80, L2 = 1.29"); cout > x1; cout > x2; cout > y1; cout > y2 ; p1 = y1 - x1; pi = p2 / p1; status = x2 + (pi * skolko);

    Interpolation methods

    Nearest neighbor interpolation

    The simplest method of interpolation is the nearest neighbor interpolation method.

    Interpolation by polynomials

    In practice, interpolation by polynomials is most often used. This is primarily due to the fact that polynomials are easy to calculate, their derivatives are easy to find analytically, and the set of polynomials is dense in the space of continuous functions (Weierstrass theorem).

    • Linear interpolation
    • Newton's interpolation formula
    • Finite difference method
    • IMN-1 and IMN-2
    • Lagrange polynomial (interpolation polynomial)
    • Aitken scheme
    • Spline function
    • Cubic spline

    Inverse interpolation (calculating x given y)

    • Lagrange polynomial
    • Reverse interpolation using Newton's formula
    • Inverse interpolation using the Gauss formula

    Interpolation of a function of several variables

    • Bilinear interpolation
    • Bicubic interpolation

    Other Interpolation Methods

    • Rational interpolation
    • Trigonometric interpolation

    Related Concepts

    • Extrapolation - methods of finding points outside a given interval (curve extension)
    • Approximation - methods for constructing approximate curves

    Reverse interpolation

    on the class of functions from the space C2 whose graphs pass through the points of the array (xi, yi), i = 0, 1, . . . , m.

    Solution. Among all the functions that pass through the reference points (xi, f(xi)) and belong to the mentioned space, it is the cubic spline S(x), satisfying the boundary conditions S00(a) = S00(b) = 0, that provides the extremum (minimum) functional I(f).

    Often in practice the problem arises of searching for the value of an argument using a given value of a function. This problem is solved by inverse interpolation methods. If the given function is monotonic, then reverse interpolation is most easily accomplished by replacing the function with an argument and vice versa and then interpolating. If the given function is not monotonic, then this technique cannot be used. Then, without changing the roles of the function and the argument, we write down one or another interpolation formula; Using the known values ​​of the argument and, assuming the function is known, we solve the resulting equation with respect to the argument.

    The evaluation of the remainder term when using the first technique will be the same as with direct interpolation, only the derivatives of the direct function need to be replaced with derivatives of inverse function. Let's estimate the error of the second method. If we are given a function f(x) and Ln (x) is a Lagrange interpolation polynomial constructed for this function from nodes x0, x1, x2, . . . , xn, then

    f (x) − Ln (x) =(n + 1)! (x− x0) . . . (x− xn) .

    Suppose we need to find the value of x¯ for which f (¯x) = y¯ (y¯ is given). We will solve the equation Ln (x) = y¯. Let's get some value x¯. Substituting into the previous equation, we get:


    Mn+1

    f (x¯) − Ln (x¯) = f (x¯) − y¯ = f (x¯) − f (¯x) =

    Applying Langrange's formula, we get

    (x¯ − x¯) f0 (η) =

    where η is between x¯ and x¯. If is an interval that contains x¯ and x¯ and min

    From the last expression it follows:

    |x¯ − x¯| 6m1(n+1)! |$n(x¯)| .

    In this case, of course, it is assumed that we have solved the equation Ln (x) = y¯ exactly.

    Using interpolation to create tables

    Interpolation theory has applications in the compilation of tables of functions. Having received such a problem, the mathematician must solve a number of questions before starting the calculations. A formula must be chosen by which the calculations will be carried out. This formula may vary from site to site. Typically, formulas for calculating function values ​​are cumbersome and therefore they are used to obtain some reference values ​​and then, by subtabulation, the table is condensed. The formula that gives the reference values ​​of the function must provide the required accuracy of the tables, taking into account the following subtabulation. If you need to create tables with a constant step, then you first need to determine its step.

    Back First Previous Next Last Go To Index


    Most often, function tables are compiled so that linear interpolation is possible (that is, interpolation using the first two terms of the Taylor formula). In this case, the remainder term will have the form

    R1 (x) =f00 (ξ)h2t(t − 1).

    Here ξ belongs to the interval between two adjacent table values ​​of the argument, in which x is located, and t is between 0 and 1. The product t(t − 1) takes the largest modulo

    value at t = 12. This value is 14. So,

    It must be remembered that along with this error - the error of the method - in the practical calculation of intermediate values, an irremovable error and rounding error will also arise. As we saw earlier, the fatal error in linear interpolation will be equal to the error in the tabulated function values. The rounding error will depend on the computing means and the calculation program.

    Back First Previous Next Last Go To Index


    Subject index

    separated differences of second order, 8 first order, 8

    spline, 15

    interpolation nodes, 4

    Back First Previous Next Last Go To Index

    / Material_studentam_po_RGR_BZhD / How to perform interpolation

    Formula for interpolating tabular data

    Used in the 2nd action, when the amount of NHR (Q, t) from the condition is intermediate between 100 t and 300 t.

    (Exception: if Q by condition is equal to 100 or 300, then interpolation is not needed).

    y o- Your initial quantity of NHR from the condition, in tons

    (corresponds to the letter Q)

    y 1 smaller

    (from tables 11-16, usually equals 100).

    y 2 more the value of the quantity of NHR closest to yours, in tons

    (from tables 11-16, usually equals 300).

    x 1 y 1 (x 1 located opposite y 1 ), km.

    x 2 table value depth of distribution of a cloud of contaminated air (G t), respectively y 2 (x 2 located opposite y 2 ), km.

    x 0 – required value G T appropriate y o(according to the formula).

    Example.

    NHR – chlorine; Q = 120 t;

    Type of SVSP (degree of vertical air resistance) – inversion.

    Find G T- table value of the depth of distribution of a cloud of contaminated air.

      We look through tables 11-16 and find data that matches your condition (chlorine, inversion).

    Table 11 is suitable.

      Selecting values y 1 , y 2, x 1 , x 2 . Important – take the wind speed to be 1 m/s, take the temperature to be 20 °C.

      We substitute the selected values ​​into the formula and find x 0 .

    Important – the calculation is correct if x 0 will have a value somewhere between x 1 , x 2 .

    1.4. Lagrange interpolation formula

    The algorithm proposed by Lagrange for constructing interpolating

    functions from tables (1) provides for the construction of an interpolation polynomial Ln(x) in the form

    Obviously, the fulfillment of conditions (11) for (10) determines the fulfillment of conditions (2) for setting the interpolation problem.

    The polynomials li(x) are written as follows

    Note that not a single factor in the denominator of formula (14) is equal to zero. Having calculated the values ​​of the constants ci, you can use them to calculate the values ​​of the interpolated function at given points.

    The formula for the Lagrange interpolation polynomial (11), taking into account formulas (13) and (14), can be written as

    qi (x − x0)(x − x1) K (x − xi −1)(x − xi +1) K (x − xn)

    1.4.1.Organization of manual calculations using the Lagrange formula

    Direct application of the Lagrange formula leads to a large number of similar calculations. For small tables, these calculations can be performed either manually or in software

    At the first stage, we will consider an algorithm for manual calculations. In the future, these same calculations should be repeated in the environment

    Microsoft Excel or OpenOffice.org Calc.

    In Fig. Figure 6 shows an example of the original table of an interpolated function defined by four nodes.

    Fig.6. Table containing initial data for four nodes of the interpolated function

    In the third column of the table we write the values ​​of the coefficients qi calculated using formulas (14). Below is a record of these formulas for n=3.


    q0=Y0/(x0-x1)/(x0-x2)/(x0-x3)q1=Y1/(x1-x0)/(x1-x2)/(x1-x3)(16) q2=Y2/( x2-x0)/(x2-x1)/(x2-x3)q3=Y3/(x3-x0)/(x3-x1)/(x3-x2)

    The next step in the implementation of manual calculations is the calculation of the values ​​of li(x) (j=0,1,2,3), performed according to formulas (13).

    Let's write these formulas for the version of the table with four nodes we are considering:

    l0(x)=q0(x-x1)·(x-x2)·(x-x3),

    l1(x)=q1(x-x0)·(x-x2)·(x-x3),

    l2(x)=q2(x-x0)·(x-x1)·(x-x3),(17) l3(x)=q3(x-x0)·(x-x1)·(x-x2) .

    Let's calculate the values ​​of the polynomials li(xj) (j=0,1,2,3) and write them in the table cells. The values ​​of the function Ycalc(x), according to formula (11), will be obtained as a result of summing the values ​​li(xj) by row.

    The format of the table, including columns of calculated values ​​li(xj) and a column of values ​​Ycalc(x), is shown in Fig. 8.

    Rice. 8. Table with the results of manual calculations performed using formulas (16), (17) and (11) for all values ​​of the argument xi

    Having generated the table shown in Fig. 8, using formulas (17) and (11) you can calculate the value of the interpolated function for any value of the argument X. For example, for X=1 we calculate the values ​​li(1) (i=0,1,2,3):

    l0(1)= 0.7763; l1(1)= 3.5889; l2(1)=-1.5155;l3(1)= 0.2966.

    Summing up the values ​​of li(1) we obtain the value Yinterp(1)=3.1463.

    1.4.2. Implementation of an interpolation algorithm using Lagrange formulas in the Microsoft Excel program environment

    The implementation of the interpolation algorithm begins, as with manual calculations, by writing formulas for calculating the coefficients qi In Fig. 9 shows the table columns with given values argument, interpolated function and coefficients qi. To the right of this table are the formulas written in the cells of column C to calculate the values ​​of the coefficients qi.

    ВС2: "=B2/((A2-A3)*(A2-A4)*(A2-A5))" Ж q0

    ВС3: "=B3/((A3-A4)*(A3-A5)*(A3-A2))" Ж q1

    ВС4: "=B4/((A4-A5)*(A4-A2)*(A4-A3))" Ж q2

    ВС5: "=B5/((A5-A2)*(A5-A3)*(A5-A4))" Ж q3

    Rice. 9 Table of coefficients qi and calculation formulas

    After entering the formula q0 in cell C2, it is extended through cells C3 to C5. After which the formulas in these cells are adjusted in accordance with (16) to the form shown in Fig. 9.


    Ycalc(xi),

    Implementing formulas (17), we write formulas for calculating the values ​​li(x) (i=0,1,2,3) in the cells of columns D, E, F and G. In cell D2 for calculating the value l0(x0) we write the formula:

    =$C$2*($A2-$A$3)*($A2-$A$4)*($A2-$A$5),

    we obtain the values ​​l0 (xi) (i=0,1,2,3).

    The $A2 link format allows you to stretch the formula across columns E, F, G to form computational formulas for calculating li(x0) (i=1,2,3). When you drag a formula across a row, the index of the arguments column does not change. To calculate li(x0) (i=1,2,3) after drawing the formula l0(x0), it is necessary to correct them according to formulas (17).

    In column H we place Excel formulas to sum li(x) using the formula

    (11)algorithm.

    In Fig. Figure 10 shows a table implemented in the environment Microsoft programs Excel. A sign of the correctness of the formulas written in the cells of the table and the computational operations performed are the resulting diagonal matrix li(xj) (i=0,1,2,3),(j=0,1,2,3), repeating the results shown in Fig. 8, and a column of values ​​that coincide with the values ​​of the interpolated function in the nodes of the source table.

    Rice. 10. Table of values ​​li(xj) (j=0,1,2,3) and Ycalc(xj)

    To calculate values ​​at some intermediate points it is enough

    In the cells of column A, starting from cell A6, enter the values ​​of argument X for which you want to determine the values ​​of the interpolated function. Select

    in the last (5th) row of the table, cells from l0(xn) to Ycalc(xn) and stretch the formulas written in the selected cells to the line containing the last

    the specified value of the argument x.

    In Fig. 11 shows a table in which the function value is calculated at three points: x=1, x=2 and x=3. An additional column has been introduced into the table with the row numbers of the source data table.

    Rice. 11. Calculation of values ​​of interpolated functions using Lagrange formulas

    For greater clarity in displaying the results of interpolation, we will build a table that includes a column of argument X values ​​ordered in ascending order, a column of initial values ​​of the function Y(X), and a column

    Tell me how to use the interpolation formula and which one in solving problems in thermodynamics (heat engineering)

    Ivan Shestakovich

    The simplest, but often not enough precise interpolation- this is linear. When you already have two known points (X1 Y1) and (X2 Y2) and you need to find the values ​​Y of the day of some X which is located between X1 and X2. Then the formula is simple.
    Y=(U2-U1)*(X-X1)/(X2-X1)+U1
    By the way, this formula also works for X values ​​outside the interval X1..X2, but this is already called extrapolation and at a significant distance from this interval it gives a very large error.
    There are many other swear words. interpolation methods - I advise you to read a textbook or scour the Internet.
    The method of graphic interpolation is also possible - manually draw a graph through known points and find Y from the graph for the required X. ;)

    Novel

    You have two meanings. And approximately the dependence (linear, quadratic, ..)
    The graph of this function passes through your two points. You need a value somewhere in between. Well, you express it!
    For example. In the table, at a temperature of 22 degrees, the saturated vapor pressure is 120,000 Pa, and at 26, 124,000 Pa. Then at a temperature of 23 degrees 121000 Pa.

    Interpolation (coordinates)

    There is a coordinate grid on the map (image).
    There are some well-known reference points (n>3) on it, each having two x,y values- coordinates in pixels, and coordinates in meters.
    It is necessary to find intermediate coordinate values ​​in meters, knowing the coordinates in pixels.
    Linear interpolation is not suitable - the error outside the line is too large.
    Like this: (Xc is the coordinate in meters along ox, Xp is the coordinate in pixels along ox, Xc3 is the desired value in ox)
    Xc3= (Xc1-Xc2)/(Xp1-Xp2)*(Xp3-Xp2)+Xc2
    Yc3= (Yc1-Yc2)/(Yp1-Yp2)*(Yp3-Yp2)+Yc2

    How to find the same formula for finding Xc and Yc, taking into account not two (as here), but N known reference points?

    Joka fern lowd

    Judging by the written formulas, the axes of the coordinate systems in pixels and in meters coincide?
    That is, Xp -> Xc is interpolated independently and Yp -> Yc is independently interpolated. If not, then you need to use two-dimensional interpolation Xp,Yp->Xc and Xp,Yp->Yc, which somewhat complicates the task.
    It is further assumed that the coordinates Xp and Xc are related by some dependence.
    If the nature of the dependence is known (or is assumed, for example, we assume that Xc=a*Xp^2+b*Xp+c), then we can obtain the parameters of this dependence (for the given dependence a, b, c) using regression analysis(Method of least squares). In this method, if you specify a certain dependence Xc(Xp), you can obtain a formula for the parameters of the dependence on the reference data. This method allows, in particular, to find and linear dependence, in the best possible way satisfying this set data.
    Disadvantage: In this method, the Xc coordinates obtained from the data of the Xp control points may differ from the specified ones. For example, an approximation line drawn through experimental points does not pass exactly through these points themselves.
    If an exact correspondence is required and the nature of the dependence is unknown, interpolation methods must be used. The simplest mathematically is the Lagrange interpolation polynomial, which passes exactly through the reference points. However, due to the high degree of this polynomial with a large number of reference points and poor quality interpolation, it is better not to use it. The advantage is the relatively simple formula.
    It is better to use spline interpolation. The essence of this method is that in each section between two neighboring points, the dependence under study is interpolated by a polynomial, and smoothness conditions are written at the joining points of the two intervals. The advantage of this method is the quality of interpolation. Disadvantages - it is almost impossible to derive a general formula; you have to find the coefficients of the polynomial in each section algorithmically. Another disadvantage is the difficulty of generalizing to two-dimensional interpolation.

    There are cases when you need to know the results of a function calculation outside the known area. Particularly relevant this question for the forecasting procedure. In Excel there are several ways you can do this operation. Let's look at them with specific examples.

    Method 2: Extrapolation for graph

    You can perform an extrapolation procedure for a graph by plotting a trend line.

    1. First of all, we build the chart itself. To do this, use the cursor while holding down the left mouse button to select the entire area of ​​the table, including the arguments and corresponding function values. Then, moving to the tab "Insert", click on the button "Schedule". This icon is located in the block "Diagrams" on the tool belt. A list of available chart options appears. We choose the most suitable one at our discretion.
    2. After the graph is constructed, remove the additional argument line from it by selecting it and clicking on the button Delete on the computer keyboard.
    3. Next, we need to change the divisions of the horizontal scale, since it does not display the values ​​of the arguments as we need. To do this, right-click on the diagram and in the list that appears, select the value "Select data".
    4. In the data source selection window that opens, click on the button "Change" in the horizontal axis label editing block.
    5. The window for setting the axis signature opens. Place the cursor in the field of this window, and then select all the data in the column "X" without its name. Then click on the button "OK".
    6. After returning to the data source selection window, we repeat the same procedure, that is, click on the button "OK".
    7. Now our chart is prepared and we can directly begin to build a trend line. Click on the chart, after which it will be activated on the ribbon additional set tabs – "Working with diagrams". Moving to the tab "Layout" and press the button "Trend line" in the block "Analysis". Click on the item "Linear approximation" or "Exponential Approximation".
    8. The trend line has been added, but it is completely below the line of the graph itself, since we have not specified the value of the argument to which it should tend. To do this, click on the button again. "Trend line", but now select the item « Additional options trend lines".
    9. The trendline format window opens. In the section "Trend Line Options" there is a settings block "Forecast". As in the previous method, let's take the argument for extrapolation 55 . As we can see, so far the graph has a length up to the argument 50 inclusive. It turns out that we will need to extend it for another 5 units. On the horizontal axis you can see that 5 units equals one division. So this is one period. In the field "Forward on" enter the value "1". Click on the button "Close" in the lower right corner of the window.
    10. As you can see, the chart has been extended by the specified length using the trend line.

    So, we have looked at the simplest examples of extrapolation for tables and graphs. In the first case, the function is used PREDICTION, and in the second - the trend line. But based on these examples, much more complex forecasting problems can be solved.

    The simplest and most commonly used type of local interpolation is linear interpolation. It consists in the fact that given points ( x i , y i) at ( i = 0. 1, ..., n) are connected by straight segments, and the function f(x) a polyline with vertices at these points is approaching.

    The equations of each segment of the broken line are generally different. Since there are n intervals ( x i - 1, x i), then for each of them the equation of a straight line passing through two points is used as the equation of the interpolation polynomial. In particular, for the i-th interval we can write the equation of a straight line passing through the points ( x i -1, y i -1 ) And ( x i , y i), in the form

    y=a i x+b i , x i-1 xx i

    a i =

    Therefore, when using linear interpolation, you first need to determine the interval in which the value of the argument x falls, and then substitute it into the formula (*) and find the approximate value of the function at this point

    Figure 3-3-Linear interpolation graph.

    1. Solving a professional problem

    We maintain experimental data

    ORIGIN:=0 Beginning of the data array - counting from scratch

    i:=1..6 Number of elements in the array

    Experimental data is organized into two vectors

    Let's perform interpolation using built-in MathCad functions

    Linear interpolation

    Lf(x i):=linterp(x,y,x)

    Cubic pine interpolation

    CS:=cspline(x,y)

    Constructing a cubic spline using experimental data

    Lf(x i):=linterp(x,y,x i)

    B-spline interpolation

    Set the interpolation order. The vector u must have (n-1) fewer elements than the vector x, and the first element must be less than or equal to the first element x, and the last one is greater than or equal to the last element of x.

    BS:=bspline(x,y,u,n)

    We construct a B-spline based on experimental data

    BSf(x i):=(BS, x,y,x i)

    We build a graph of all approximation functions on one coordinate plane.

    Figure 4.1-Graph of all approximation functions on one coordinate plane.

    Conclusion

    In computational mathematics, interpolation of functions plays a significant role, i.e. Using a given function, constructing another (usually simpler) function whose values ​​coincide with the values ​​of the given function at a certain number of points. Moreover, interpolation has both practical and theoretical significance. In practice, the problem often arises of restoring a continuous function from its tabulated values, for example, obtained in the course of some experiment. To evaluate many functions, it turns out that it is effective to approximate them by polynomials or fractional rational functions. Interpolation theory is used in the construction and study of quadrature formulas for numerical integration, to obtain methods for solving differential and integral equations. The main disadvantage of polynomial interpolation is that it is unstable on one of the most convenient and commonly used grids - the grid with equidistant nodes. If the task allows, this problem can be solved by choosing a mesh with Chebyshev nodes. If we cannot freely choose interpolation nodes, or we simply need an algorithm that is not too demanding in the choice of nodes, then rational interpolation may be a suitable alternative to polynomial interpolation.

    The advantages of spline interpolation include the high processing speed of the computational algorithm, since a spline is a piecewise polynomial function and during interpolation, data is simultaneously processed for a small number of measurement points belonging to the fragment that is considered in at the moment. The interpolated surface describes spatial variability of different scales and at the same time is smooth. The latter circumstance makes it possible to directly analyze the geometry and topology of the surface using analytical procedures

    Interpolation is a type of approximation in which the curve of the constructed function passes exactly through the available data points.

    There is also a task close to interpolation, which consists in approximating a complex function by another, simpler function. If a certain function is too complex for productive calculations, you can try to calculate its value at several points, and from them construct, that is, interpolate, a simpler function. Of course, using a simplified function does not produce results as accurate as the original function. But in some classes of problems, the achieved gain in simplicity and speed of calculations may outweigh the resulting error in the results.

    Also worth mentioning is a completely different type of mathematical interpolation known as operator interpolation. Classic works on operator interpolation include the Riesz-Thorin theorem and the Marcinkiewicz theorem, which are the basis for many other works.

    Definitions

    Let's consider a system of non-coinciding points () from a certain region. Let the function values ​​be known only at these points:

    The interpolation problem is to find a function from a given class of functions such that

    Example

    1. Let us have a table function, like the one described below, which for several values ​​determines the corresponding values:

    0 0
    1 0,8415
    2 0,9093
    3 0,1411
    4 −0,7568
    5 −0,9589
    6 −0,2794

    Interpolation helps us find out what value such a function can have at a point other than those indicated (for example, at x = 2,5).

    To date, there are many different interpolation methods. The choice of the most appropriate algorithm depends on the answers to the questions: how accurate is the chosen method, what is the cost of using it, how smooth is the interpolation function, how many data points does it require, etc.

    2. Find the intermediate value (by linear interpolation).

    6000 15.5
    6378 ?
    8000 19.2

    Interpolation methods

    Nearest neighbor interpolation

    The simplest method of interpolation is nearest neighbor interpolation.

    Interpolation by polynomials

    In practice, interpolation by polynomials is most often used. This is primarily due to the fact that polynomials are easy to calculate, their derivatives are easy to find analytically, and the set of polynomials is dense in the space of continuous functions (Weierstrass theorem).

    • IMN-1 and IMN-2
    • Lagrange polynomial (interpolation polynomial)
    • According to Aitken's scheme

    Inverse interpolation (calculating x given y)

    • Reverse interpolation using Newton's formula

    Interpolation of a function of several variables

    Other Interpolation Methods

    • Trigonometric interpolation

    Related Concepts

    • Extrapolation - methods of finding points outside a given interval (curve extension)
    • Approximation - methods for constructing approximate curves

    See also

    • Experimental Data Smoothing

    Wikimedia Foundation. 2010.

    Synonyms:

    See what “Interpolation” is in other dictionaries:

      1) a way to determine, from a series of given values ​​of any mathematical expression, its intermediate values; so, for example, according to the flight range of the cannonball at an elevation angle of the cannon channel axis of 1°, 2°, 3°, 4°, etc., it can be determined using... ... Dictionary of foreign words of the Russian language

      Insertion, interpolation, inclusion, search Dictionary of Russian synonyms. interpolation, see box Dictionary of synonyms of the Russian language. Practical guide. M.: Russian language. Z. E. Alexandrova. 2... Dictionary of synonyms

      interpolation- Calculation of intermediate values ​​between two known points. For example: linear linear interpolation exponential exponential interpolation The process of outputting a color image when the pixels belonging to the region between two color... ... Technical Translator's Guide

      - (interpolation) Estimation of the value of an unknown quantity located between two points in a series of known quantities. For example, knowing the indicators of the country’s population obtained from a population census conducted at intervals of 10 years, you can... ... Dictionary of business terms

      From Latin, actually, “fake.” This is the name given to erroneous amendments or later insertions in manuscripts made by copyists or readers. This term is used especially often in criticism of manuscripts of ancient writers. In these manuscripts... ... Literary encyclopedia

      Finding intermediate values ​​of a certain pattern (function) based on a number of its known values. In English: Interpolation See also: Data transformations Financial Dictionary Finam... Financial Dictionary

      interpolation- and, f. interpolation f. lat. interpolatio change; alteration, distortion. 1. Insertion of later origin in which l. text that does not belong to the original. BAS 1. In ancient manuscripts there are many interpolations introduced by scribes. Ush. 1934. 2 … Historical Dictionary of Gallicisms of the Russian Language

      INTERPOLATION- (interpolatio), replenishment of empirical. a series of values ​​of a quantity with its missing intermediate values. Interpolation can be done in three ways: mathematical, graphical. and logical. They are based on a common hypothesis that... Great Medical Encyclopedia

      - (from the Latin interpolatio change, alteration), finding intermediate values ​​of a quantity based on some of its known values. For example, finding the values ​​of the function y = f(x) at points x lying between points x0 and xn, x0 ... Modern encyclopedia

      - (from the Latin interpolatio change alteration), in mathematics and statistics, finding intermediate values ​​of a quantity based on some of its known values. For example, finding the values ​​of the function f(x) at points x lying between points xo x1 ... xn, by... ... Big Encyclopedic Dictionary