Linear interpolation online. How to do interpolation

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 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 can 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 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).

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

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 for finding points outside specified interval(curve extension)
  • Approximation - methods for constructing approximate curves

see also

  • Experimental Data Smoothing

Wikimedia Foundation.

2010.:

Synonyms

Big Encyclopedic Dictionary There is a situation when in an array of known values ​​you need to find intermediate results . In mathematics this is called interpolation. IN Excel given

The method can be used both for tabular data and for plotting 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 28 . This data is shown in the table below. We need to find the corresponding function for the argument . The easiest way to do this is using the operator.


PREDICTION

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 as tabular data using the function . The easiest way to do this is using the operator, 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.

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 appears available options graphs. 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, click right click mouse over the diagram and in the list that appears, stop at 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 « Extra options trend lines".
  9. The trendline format window opens. In chapter "Trend Line Options" there is a settings block "Forecast". As in 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 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 . The easiest way to do this is using the operator, and in the second - the trend line. But based on these examples, you can decide much more complex tasks forecasting.

This is a chapter from Bill Jelen's book.

Challenge: Some engineering design problems require the use of tables to calculate parameter values. Since the tables are discrete, the designer uses linear interpolation to obtain an intermediate parameter value. The table (Fig. 1) includes height above the ground (control parameter) and wind speed (calculated parameter). For example, if you need to find the wind speed corresponding to a height of 47 meters, then you should apply the formula: 130 + (180 – 130) * 7 / (50 – 40) = 165 m/sec.

Download the note in or format, examples in format

What if there are two control parameters? Is it possible to perform calculations using one formula? The table (Fig. 2) shows the wind pressure values ​​for various heights and spans of structures. It is required to calculate the wind pressure at a height of 25 meters and a span of 300 meters.

Solution: We solve the problem by extending the method used for the case with one control parameter. Follow these steps:

Start with the table shown in Fig. 2. Add source cells for height and span in J1 and J2 respectively (Figure 3).

Rice. 3. Formulas in cells J3:J17 explain the operation of the megaformula

For ease of use of formulas, define names (Fig. 4).

Watch the formula work by moving sequentially from cell J3 to cell J17.

Use reverse sequential substitution to construct the megaformula. Copy the formula text from cell J17 to J19. Replace the reference to J15 in the formula with the value in cell J15: J7+(J8-J7)*J11/J13. And so on. The result is a formula consisting of 984 characters, which cannot be perceived in this form. You can look at it in the attached Excel file. I'm not sure that this kind of megaformula is useful to use.

Summary: linear interpolation is used to obtain an intermediate parameter value if table values specified only for range boundaries; A calculation method using two control parameters is proposed.