How to interpolate

Author: Eric Farmer
Date Of Creation: 3 March 2021
Update Date: 1 May 2024
Anonim
How to do the "Interpolation" ??
Video: How to do the "Interpolation" ??

Content

Linear interpolation (or simply interpolation) is the process of finding intermediate values ​​of a quantity from its known values. Many people can do interpolation purely on intuition, but this article describes a formalized mathematical approach to doing interpolation.

Steps

  1. 1 Determine the value for which you want to find the corresponding value. Interpolation can be done to calculate logarithms or trigonometric functions, or to calculate the corresponding volume or pressure of a gas at a given temperature. Scientific calculators have largely replaced logarithmic and trigonometric tables; therefore, as an example of interpolation, we will calculate the gas pressure at a temperature that is not listed in the lookup tables (or graphs).
    • In the equation that we will derive, "x" stands for a known quantity and "y" for an unknown quantity (interpolated value). When constructing a graph, these values ​​are plotted according to their designations - the "x" value - along the X axis, the "y" value - along the Y axis.
    • In our example, "x" will mean a gas temperature of 37 ° C.
  2. 2 In the table or graph, find the nearest values ​​below and above the "x" value. Our reference table does not show the gas pressure at 37 ° C, but the pressures at 30 ° C and 40 ° C. Gas pressure at 30 ° C = 3 kPa, and gas pressure at 40 ° C = 5 kPa.
    • Since we marked the temperature of 37 ° С as "x", now we will designate the temperature at 30 ° С as x1, and the temperature at 40 ° С as x2.
    • Since we designated the unknown (interpolated) gas pressure as "y", now we will designate the pressure of 3 kPa (at 30 ° C) as1, and a pressure of 5 kPa (at 40 ° C) as in2.
  3. 3 Find the interpolated value. The equation for finding the interpolated value can be written as y = y1 + ((x - x1) / (x2 - x1) * (y2 - y1))
    • Substitute the values ​​x, x1, x2 and we get: (37 - 30) / (40 - 30) = 7/10 = 0.7.
    • Substitute the values ​​for1, at2 and we get: (5 - 3) = 2.
    • Multiply 0.7 by 2 to get 1.4. Add 1.4 and y1: 1.4 + 3 = 4.4 kPa. Let's check the answer: the found value of 4.4 kPa lies between 3 kPa (at 30 ° C) and 5 kPa (at 40 ° C), and since 37 ° C is closer to 40 ° C than to 30 ° C, then the final the result (4.4 kPa) should be closer to 5 kPa than 3 kPa.

Tips

  • If you know how to work with graphs, you can make a rough interpolation by plotting a known value on the X-axis and finding the corresponding value on the Y-axis. In the example above, you can plot a graph that plots the temperature along the X-axis (in tens of degrees), and Y-axis - pressure (in units of kPa). On this graph, you can plot a 37 degree point and then find the point on the Y axis corresponding to that point (it will lie between the 4 and 5 kPa points). The above equation simply formalizes the thinking process and provides an accurate value.
  • Unlike interpolation, extrapolation calculates approximate values ​​for quantities outside the range of values ​​shown in tables or displayed in graphs.