Wednesday, 11 September 2013

Interpolation



INTERPOLATION

In the mathematical field of numerical analysis, interpolation is the method of constructing or formulating new data points within the range of a discrete set of known data points. In engineering and science, one often ha a number of data points, obtained by sampling or experimentation (e.g., values in the four-figure table); which represents the values of a function (dependent variable) for a limited number of values of the independent variable. It is often required to interpolate (estimate) the value of that function for an intermediate value of the independent variable. This may be achieved by curve-fitting or regression analysis.
It is noteworthy that in a situation where we are required to obtain a new value outside the range of known values for the dependent and independent variables, we refer to it as extrapolation. This is beyond our scheme and shall not be delved into.

Generally, in interpolation, there exist different methods used to achieve our sole purpose/aim of interpolating. The simplest method of interpolation is the piece-wise constant or the nearest-neighbour interpolation. In this method, we locate the nearest data value and assign the same value. In simple problems, this method is unlikely to be used.
The best and recommended interpolation method for simple problems is the linear spline interpolation method and we shall solely concentrate on this type for our study. Generally, linear interpolation usually takes two data points into consideration. These data points are the direct points just above and below the data point of interest. We usually represent these points thus:

              (xa,ya) and (xb,yb)

While the points xa and xb represent the independent variables, the points ya and yb represent the dependent variable. Ya and yb can also be written as f(xa) and f(xb) respectively.

Thus, in interpolating, we must have the values of xa, ya, xb, yb and x which is the desired point. With these values, one can easily obtain y. the formula below can be used to do this most effectively:


Y = ya + (yb-ya)*[(x-xa)/(xb-xa)]     At point (x,y)


Other methods of interpolation include the direct method, newton’s differential polynomial method and the langrangian interpolation methods. For our study though, we shall concentrate solely on the linear spline method of interpolation.

Example:

Given the following data points; find the value of y when x = 2.5


X
Y
0
0
1
0.8415
2
0.9093
3
0.1411
4
-0.7568
5
-0.9589
6
-0.2794

Solution

Recall the formula:


Y = ya + (yb-ya)*[(x-xa)/(xb-xa)]    


Now, we identify out parameters

Y = desired point = ??
Ya = data point before y = 0.9093
Yb = data point after y = 0.1411
X = desired point = 2.5
Xa = data point before x = 2
Xb = data point after x = 3

Thus, applying the formula,

Y = 0.9093 + (0.1411-0.9093)*[(2.5-2)/(3-2)]
Therefore, Y = 0.9093 – 0.7682(0.5)
Y = 0.9093-0.3841
Finally, Y = 0.5252

1 comment: