How to interpolate table values. Determination of the intermediate value using linear interpolation

Instructions

Often, when conducting empirical research, one has to deal with a set of values \u200b\u200bobtained by the method of random sampling. From this series of values, it is required to plot a function graph, into which other obtained values \u200b\u200bwill also fit with maximum accuracy. This method, or rather the solution of this problem, is a curve approximation, i.e. replacement of some objects or phenomena with others that are close in terms of the initial parameter. Interpolation, in turn, is a kind of approximation. Curve interpolation refers to the process by which the curve of a built function passes through the available data points.

There is a problem very close to interpolation, the essence of which will be to approximate the original complex function by another, much simpler function. If a separate function is very computable, then you can try to calculate its value at several points, and from the obtained ones, construct (interpolate) a simpler function. However, a simplified function will not provide the same accurate and reliable data as the original function.

Interpolation via an algebraic binomial, or linear interpolation
In general form: some given function f (x) is interpolated, taking a value at the points x0 and x1 of the segment by the algebraic binomial P1 (x) \u003d ax + b. If more than two values \u200b\u200bof the function are specified, then the sought linear function is replaced by a linear-piecewise function, each part of the function is contained between two specified values \u200b\u200bof the function at these points on the interpolated segment.

Finite Difference Interpolation
This method is one of the simplest and most widely used interpolation methods. Its essence is to replace the differential coefficients of the equation with the difference coefficients. This action will allow you to go to the solution of the differential equation by its difference analogue, in other words, to build its finite-difference scheme

Building a spline function
A spline in mathematical modeling is called a piecewise-given function, which is with functions that have their domain of definition that is simpler on each partition element. A spline of one variable is constructed by dividing the domain of definition into a finite number of segments, and, on each of them, the spline will coincide with some algebraic polynomial. The maximum degree used is the spline.
Spline functions for defining and describing surfaces in various computer modeling systems.

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

There is also a problem close to interpolation, which consists in approximating some complex function with another, simpler function. If some function is too complicated for performance calculations, you can try to calculate its value at several points, and from them build, that is, interpolate, a simpler function. Of course, using a simplified function does not produce the same exact results as the original function. But in some classes of problems, the achieved gain in simplicity and speed of computations can outweigh the resulting error in the results.

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

Definitions

Consider a system of non-coincident points () from a certain area. Let the values \u200b\u200bof the function be known only at these points:

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

Example

1. Suppose we have a table function, like the one described below, which determines the corresponding values \u200b\u200bfor several 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 different from the indicated ones (for example, when x = 2,5).

By now, there are many different interpolation methods. The choice of the most appropriate algorithm depends on the answers to the questions: how accurate the chosen method is, what are the costs of using it, how smooth the interpolation function is, how many data points it requires, etc.

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

6000 15.5
6378 ?
8000 19.2

Interpolation methods

Nearest Neighbor Interpolation

The simplest interpolation method 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, it is easy to find their derivatives 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

Reverse interpolation (calculating x given y)

  • Reverse interpolation using Newton's formula

Interpolating a function of several variables

Other interpolation methods

  • Trigonometric interpolation

Related concepts

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

see also

  • Smoothing experimental data

Wikimedia Foundation. 2010.

Synonyms:

See what "Interpolation" is in other dictionaries:

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

    Insert, interpolation, inclusion, retrieval of the Dictionary of Russian synonyms. interpolation see inset Dictionary of Russian Synonyms. Practical guide. M .: Russian language. Z.E. Aleksandrova. 2 ... Synonym dictionary

    interpolation - Calculation of intermediate values \u200b\u200bbetween two known points. For example: linear linear interpolation exponential exponential interpolation The process of displaying a color image when the pixels referring to the area between two color ... ... Technical translator's guide

    - (interpolation) An estimate of the value of an unknown quantity located between two points of a series of known quantities. For example, knowing the indicators of the country's population obtained during the population census conducted with an interval of 10 years, you can ... ... Business glossary

    From Latin, actually "fake". This is the name of erroneous corrections or later insertions in manuscripts made by scribes or readers. This term is especially often used in criticism of the manuscripts of ancient writers. In these manuscripts ... ... Literary encyclopedia

    Finding intermediate values \u200b\u200bof some regularity (function) for a number of its known values. In English: Interpolation See also: Data Conversions Financial Dictionary Finam ... Financial vocabulary

    interpolation - and, w. interpolation f. lat. interpolatio change; alteration, distortion. 1. Insert of later origin in which sheet. text that does not belong to the original. ALS 1. There are many scribal interpolations in ancient manuscripts. Ush. 1934.2 ... Historical Dictionary of Russian Gallicisms

    INTERPOLATION - (interpolatio), empiric replenishment a number of values \u200b\u200bof any quantity by the missing intermediate values \u200b\u200bof it. Interpolation can be done in three ways: mathematical, graphic. and logical. They are based on a common hypothesis that ... Big medical encyclopedia

    - (from the Latin interpolatio change, alteration), finding intermediate values \u200b\u200bof a quantity according to some of its known values. For example, finding the values \u200b\u200bof the function y \u003d f (x) at the points x lying between the points x0 and xn, x0 ... Modern encyclopedia

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

Many of us have come across incomprehensible terms in various sciences. But there are very few people who are not frightened by incomprehensible words, but on the contrary, are encouraged and forced to delve deeper into the subject being studied. Today we will talk about such a thing as interpolation. This is a method of plotting graphs by known points, which allows predicting its behavior on specific parts of the curve with a minimum amount of information about a function.

Before moving on to the essence of the definition itself and tell about it in more detail, let's delve into the story a little.

History

Interpolation has been known since ancient times. However, this phenomenon owes its development to several of the most prominent mathematicians of the past: Newton, Leibniz and Gregory. It was they who developed this concept using the more advanced mathematical methods available at the time. Before that, interpolation, of course, was applied and used in calculations, but they did it in completely inaccurate ways, requiring a large amount of data to build a model that is more or less close to reality.

Today we can even choose which of the interpolation methods is more suitable. Everything has been translated into a computer language that can predict the behavior of a function with great accuracy in a certain area, limited by known points.

Interpolation is a rather narrow concept, so its history is not so rich in facts. In the next section, we will figure out what interpolation really is and how it differs from its opposite - extrapolation.

What is interpolation?

As we already said, this is the general name for methods that allow you to build a graph by points. At school, this is mainly done by drawing up a table, identifying points on a graph and roughly drawing lines that connect them. The last action is done based on considerations of the similarity of the investigated function to others, the type of graphs of which we know.

However, there are other, more complex and accurate ways to accomplish the task of plotting a graph by points. So, interpolation is actually a "prediction" of the behavior of a function in a specific area, limited by known points.

There is a similar concept associated with the same area - extrapolation. It is also a prediction of the graph of a function, but outside the known points of the graph. With this method, prediction is made based on the behavior of a function for a known interval, and then this function is applied for an unknown interval. This method is very convenient for practical application and is actively used, for example, in economics to predict ups and downs in the market and to predict the demographic situation in the country.

But we have moved away from the main topic. In the next section, we'll figure out what kind of interpolation is and what formulas can be used to perform this operation.

Interpolation types

The simplest form is nearest neighbor interpolation. With this method, we get a very rough plot of rectangles. If you have seen at least once an explanation of the geometric meaning of an integral on a graph, then you will understand what kind of graphical form we are talking about.

In addition, there are other interpolation methods. The most famous and popular are related to polynomials. They are more accurate and allow predicting the behavior of a function with a rather meager set of values. The first interpolation method we will look at will be linear interpolation by polynomials. This is the easiest way from this category, and for sure each of you used it at school. Its essence lies in the construction of straight lines between known points. As you know, a single straight line passes through two points of the plane, the equation of which can be found based on the coordinates of these points. Having built these lines, we get a broken graph, which at the very least, but reflects the approximate values \u200b\u200bof the functions and, in general terms, coincides with reality. This is how linear interpolation is performed.

Advanced types of interpolation

There is a more interesting, but at the same time more complicated way of interpolation. It was invented by the French mathematician Joseph Louis Lagrange. That is why the calculation of interpolation by this method is named after him: interpolation by the Lagrange method. The trick here is this: if the method described in the previous paragraph uses only a linear function for calculation, then the Lagrange expansion also involves the use of polynomials of higher degrees. But it is not so easy to find the interpolation formulas themselves for different functions. And the more points are known, the more accurate the interpolation formula is. But there are many other methods.

There is also a more perfect and realistic calculation method. The interpolation formula used in it is a collection of polynomials, the application of each of which depends on the section of the function. This method is called a spline function. In addition, there are also ways to do such a thing as interpolation of functions of two variables. There are only two methods. Among them are bilinear or double interpolation. This method allows you to easily plot a graph from points in three-dimensional space. We will not touch on other methods. In general, interpolation is a universal name for all these methods of plotting graphs, but the variety of ways in which this action can be carried out forces them to be divided into groups depending on the type of function that is subject to this action. That is, interpolation, an example of which we have considered above, refers to direct methods. There is also inverse interpolation, which differs in that it allows you to calculate not the direct, but the inverse function (that is, x from y). We will not consider the latter options, since it is quite difficult and requires a good mathematical knowledge base.

Let's move on to perhaps one of the most important sections. From it, we learn how and where the set of methods we are discussing is applied in life.

Application

As you know, mathematics is the queen of sciences. Therefore, even if at first you do not see the point in certain operations, this does not mean that they are useless. For example, it seems that interpolation is a useless thing with the help of which only graphs can be built, which few people need now. However, for any calculations in technology, physics and many other sciences (for example, biology), it is extremely important to present a fairly complete picture of the phenomenon, while having a certain set of values. The values \u200b\u200bthemselves, scattered across the graph, do not always give a clear idea of \u200b\u200bthe behavior of a function in a specific area, the values \u200b\u200bof its derivatives and points of intersection with the axes. And this is very important for many areas of our life.

And how is it useful in life?

This question can be very difficult to answer. But the answer is simple: nothing. It is this knowledge that will not be useful to you. But if you understand this material and the methods by which these actions are carried out, you will practice your logic, which will be very useful in life. The main thing is not the knowledge itself, but the skills that a person acquires in the process of learning. After all, it is not for nothing that there is a saying: "Live and learn".

Related concepts

You can see for yourself how important this area of \u200b\u200bmathematics was (and still does not lose its importance) by looking at the variety of other concepts associated with this one. We have already talked about extrapolation, but there is also an approximation. You may have already heard this word. In any case, we also discussed what it means in this article. Approximation, like interpolation, are concepts related to plotting functions. But the difference between the first and the second is that it is an approximate plotting based on similar known graphs. These two concepts are very similar to each other, and the more interesting it is to study each of them.

Conclusion

Mathematics is not as difficult a science as it seems at first glance. It is rather interesting. And in this article we tried to prove it to you. We looked at the concepts related to plotting, learned what double interpolation is, and discussed with examples where it is applied.

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 graphing. Let's take a look at each of these methods.

The main condition under which you can apply interpolation is that the desired value must be inside the data array, and not go beyond its limit. For example, if we have a set of arguments 15, 21 and 29, then we can use interpolation when finding a function for argument 25. And to find the corresponding value for argument 30 - no longer. This is the main difference between this procedure and extrapolation.

Method 1: interpolation for tabular data

First of all, consider the application of interpolation to 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 by a linear equation. These data are 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 FORECAST.


Method 2: interpolate a graph using its settings

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


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

Method 3: interpolate the graph using a function

You can also interpolate the graph using the special ND function. It returns undefined values \u200b\u200bto the specified cell.


It can be made even easier without starting Function wizard, but simply from the keyboard to drive into an empty cell the value "# N / A" without quotes. But it already depends on which user is more convenient.

As you can see, in Excel, you can interpolate as tabular data using the function FORECASTand graphics. In the latter case, this can be done using the schedule settings or using the function NDcausing the error "# N / A"... The choice of which method to use depends on the setting of the problem, as well as on the user's personal preferences.

Interpolation. Introduction. General problem statement

When solving various practical problems, the research results are presented in the form of tables showing the dependence of one or more measured quantities on one determining parameter (argument). Tables of this kind are usually presented in the form of two or more rows (columns) and are used to form mathematical models.

Functions specified in mathematical models are usually written in tables of the form:

Y1 (X)

Y (X0)

Y (X1)

Y (Xn)

Ym (X)

Y (X0)

Y (X1)

Y (Xn)

The limited information presented by such tables, in some cases requires obtaining the values \u200b\u200bof the functions Y j (X) (j \u003d 1,2, ..., m) at points X that do not coincide with the nodal points of the table X i (i \u003d 0,1,2, ... , n). In such cases, it is necessary to determine some analytical expression φ j (X) to calculate the approximate values \u200b\u200bof the investigated function Y j (X) at arbitrary points X. The function φ j (X) used to determine the approximate values \u200b\u200bof the function Y j (X) is called the approximating function (from the Latin approximo - approximate). The proximity of the approximating function φ j (X) to the approximated function Y j (X) is ensured by the choice of the appropriate approximation algorithm.

We will make all further considerations and conclusions for tables containing the initial data of one investigated function (i.e., for tables with m \u003d 1).

1. Interpolation methods

1.1 Statement of the interpolation problem

Most often, to determine the function φ (X), a statement is used, called the statement of the interpolation problem.

In this classical formulation of the interpolation problem, it is required to determine an approximate analytical function φ (X), the values \u200b\u200bof which at the nodal points X i match the valuesY (X i) of the original table, i.e. conditions

ϕ (X i) \u003d Y i (i \u003d 0,1,2, ..., n)

The thus constructed approximating function φ (X) allows obtaining a sufficiently close approximation to the interpolated function Y (X) within the range of values \u200b\u200bof the argument [X 0; X n], determined by the table. When specifying the values \u200b\u200bof the argument X, not ownedthis interval, the interpolation problem is converted to an extrapolation problem. In these cases, the accuracy

values \u200b\u200bobtained when calculating the values \u200b\u200bof the function φ (X) depends on the distance of the value of the argument X from X 0, if X<Х 0 , или отХ n , еслиХ >X n.

In mathematical modeling, the interpolating function can be used to calculate the approximate values \u200b\u200bof the investigated function at intermediate points of the subintervals [X i; X i + 1]. This procedure is called compaction table.

The interpolation algorithm is determined by the method of calculating the values \u200b\u200bof the function φ (X). The simplest and most obvious implementation of the interpolating function is to replace the investigated function Y (X) on the interval [X i; X i + 1] by a straight line segment connecting points Y i, Y i + 1. This method is called the linear interpolation method.

1.2 Linear interpolation

With linear interpolation, the value of the function at point X, located between nodes X i and X i + 1, is determined by the formula of a straight line connecting two adjacent points of the table

Y (X) \u003d Y (Xi) +

Y (Xi + 1) - Y (Xi)

(X - Xi) (i \u003d 0,1,2, ..., n),

X i + 1− X i

In fig. 1 shows an example of a table obtained as a result of measurements of a certain quantity Y (X). The rows of the source table are highlighted with fill. To the right of the table is a scatter plot corresponding to this table. The table is compacted by calculating the formula

(3) the values \u200b\u200bof the approximated function at points X corresponding to the midpoints of the subintervals (i \u003d 0, 1, 2,…, n).

Fig. 1. Condensed Y (X) function table and corresponding diagram

When considering the graph in Fig. 1 that the points obtained as a result of compaction of the table using the linear interpolation method lie on the line segments connecting the points of the original table. Linear accuracy

interpolation, essentially depends on the nature of the interpolated function and on the distance between the nodes of the table X i,, X i + 1.

Obviously, if the function is smooth, then, even with a relatively large distance between the nodes, the graph constructed by connecting the points with line segments makes it possible to fairly accurately estimate the nature of the function Y (X). If the function changes quickly enough, and the distances between the nodes are large, then the linear interpolating function does not allow obtaining a sufficiently accurate approximation to the real function.

The linear interpolation function can be used for general preliminary analysis and assessment of the correctness of interpolation results, which are then obtained by other more accurate methods. Such an assessment becomes especially relevant in cases where calculations are performed manually.

1.3 Interpolation by canonical polynomial

The method of interpolating a function by a canonical polynomial is based on the construction of an interpolating function as a polynomial in the form [1]

ϕ (x) \u003d Pn (x) \u003d c0 + c1 x + c2 x2 + ... + cn xn

The coefficients with i of the polynomial (4) are free interpolation parameters, which are determined from the Lagrange conditions:

Pn (xi) \u003d Yi, (i \u003d 0, 1, ..., n)

Using (4) and (5), we write down the system of equations

C x + c x2

C xn \u003d Y

C x + c x2

C xn

C x2

C xn \u003d Y

The solution vector with i (i \u003d 0, 1, 2,…, n) of the system of linear algebraic equations (6) exists and can be found if there are no coinciding nodes among the nodes i. The determinant of system (6) is called the Vandermonde determinant1 and has an analytical expression [2].

1 Vandermonde's qualifier called the determinant

It is equal to zero if and only if xi \u003d xj for some. (From Wikipedia - the free encyclopedia)

To determine the values \u200b\u200bof the coefficients with i (i \u003d 0, 1, 2, ..., n)

equations (5) can be written in vector-matrix form

A * C \u003d Y,

where A, the matrix of coefficients determined by the table of powers of the vector of arguments X \u003d (x i 0, x i, x i 2, ..., x i n) T (i \u003d 0, 1, 2, ..., n)

x0 2

x0 n

xn 2

xn n

C is a column vector of coefficients with i (i \u003d 0, 1, 2,…, n), and Y is a column vector of values \u200b\u200bY i (i \u003d 0, 1, 2,…, n) of the interpolated function at the interpolation nodes.

The solution to this system of linear algebraic equations can be obtained by one of the methods described in [3]. For example, according to the formula

С \u003d A− 1 Y,

where A -1 - matrix inverse to matrix A. To obtain the inverse matrix A -1, you can use the INOV () function, which is part of the set of standard functions of Microsoft Excel.

After the values \u200b\u200bof the coefficients with i have been determined using function (4), the values \u200b\u200bof the interpolated function for any value of the arguments can be calculated.

Let's write the matrix A for the table shown in Fig. 1, excluding the rows that compact the table.

Fig. 2 Matrix of the system of equations for calculating the coefficients of the canonical polynomial

Using the function MOBR (), we obtain the matrix A -1 inverse to the matrix A (Fig. 3). Then, according to the formula (9), we obtain the vector of coefficients C \u003d (c 0, c 1, c 2, ..., c n) T, shown in Fig. 4.

To calculate the values \u200b\u200bof the canonical polynomial in the cell of the column Y canonical corresponding to the values \u200b\u200bx 0, we introduce the formula transformed to the following form, corresponding to the zero row of system (6)

\u003d ((((c 5

* x 0 + c 4) * x 0 + c 3) * x 0 + c 2) * x 0 + c 1) * x 0 + c 0

C0 + x * (c1 + x * (c2 + x * (c3 + x * (c4 + x * c5))))

Instead of writing "c i" in the formula entered into the cell of the Excel spreadsheet, there must be an absolute reference to the corresponding cell containing this coefficient (see Fig. 4). Instead of "x 0" - a relative reference to the cell of the column X (see Fig. 5).

Y is the canonical (0) value that matches the value in cell Y lin (0). When extending the formula written into the cell Y canonical (0), the values \u200b\u200bof Y canonical (i) corresponding to the nodal points of the original

tables (see Fig. 5).

Figure: 5. Diagrams based on tables of linear and canonical interpolation

Comparison of the graphs of functions constructed from tables calculated by the formulas of linear and canonical interpolation, we see in a number of intermediate nodes a significant deviation of the values \u200b\u200bobtained by the formulas of linear and canonical interpolation. It is more reasonable to judge the accuracy of interpolation based on obtaining additional information about the nature of the modeled process.