A NOTE ON SPLINE INTERPOLATION
SURESHA S P
Lecturer In Mathematics
Govt. First Grade College, Tumakuru, Karnataka India- 572102
Abstract
In the field of numerical analysis, we are concentrating on accuracy and cost of computation using different methods. Approximation of polynomial functions by using spline interpolation can be more accurate than polynomial interpolation. Here I’m explaining by taking one single example , through this you conclude that cubic spline interpolation is better and also explaining the need of spline using Runge’s function and illustrates that for approximating Runge’s function using cubic spline is better than polynomial interpolation.
Keywords: Interpolation, Runge’s phenomenon, Spline interpolation, comparisons.
INTRUDUCTION
We are all very familiar about polynomial interpolation. The process of finding the polynomial which fit or satisfies the given data is called interpolating polynomial and that process is called interpolation. There are two main uses of interpolation or interpolating polynomial. The first use is in reconstructing of the function when it is not given explicitly and only the values of and / or its certain order derivatives at a set of points called nodes, tabular points or arguments are known. The second use is to replace the function by interpolating polynomial say . So that many common operations such as determination of roots, differentiation and integration etc. Which are intended for the function may be performed using .
There are some methods to construct the interpolating polynomials to a given function . They are
These two methods are used when step size is unequispaced as well as equispaced.
These methods are used when step size must be equispaced.
|
|
|
|
|
|
|
|
Here maximum degree is two ,Now by using Lagrange’s interpolation ,
But we know that actual function is Now we check at then =0.48, and =1.002 .Therefore error is 0.522, now our intention is to reduce the error by SPLINE INTERPOLATION.
Spline interpolation gives the better approximation .Now we can see the another example to illustrates the need for spline interpolation as opposed to polynomial interpolation. In the year 1901 RUNGE tried to explain that higher order interpolation is bad idea.
Runge’s function Now we have to interpolated this function using polynomial interpolation and cubic spline interpolation
The points chosen in this example are 9 equidistant points in the interval [-1,1]. They are [-1, -0.75, -.05, -0.25, 0, 0.25, 0.5, 0.75, 1]
Polynomial interpolation: Now the function is interpolated using Interpolating polynomial to obtain 8th order polynomial. By looking at the plot of original function and 8th order polynomial, we can see that the polynomial interpolation doesn’t accurately represent function. One may think that choosing more points would help in alleviating this problem. But in fact it make it worse. See the below figure
Fig(a) Fig(b)
Cubic spline interpolation: The function is now interpolated using cubic splines for the same 9 equidistant data points in the range of [-1,1] as used in the polynomial interpolation. Cubic spline almost represent runge’s function . See the below figure
Now compute the value of at we get
Runge Interpolating 8thorder =0.303 Cubic spline at
Observation: In the above figures, we observe in Fig(a) 8th order polynomial oscillates more and more especially at the end points that is in (-1, -0.8) and (0.8, 1) but somehow less in the middle (-0.2, 0.2). similarly observe in Fig(b) oscillations occurs very minute and negligible in middle also when we use of cubic spline interpolation.
In the mathematical field of numerical analysis Runge’s phenomenon is a problem of oscillation at the edges of an interval that occurs when using “POLYNOMIAL INTERPOLATION” with the polynomial of high degree over a set of equispaced interpolation points.
The Runge’s phenomenon is very important , because it shows that going to higher degree doesn’t always improve accuracy.
Spline interpolation: It is the form ‘interpolation’ where the interpolate is a special type of “Piece wise polynomial ” called spline. Spline interpolation is offer preferred over a polynomial interpolation. Because interpolation error can be made small even when using low degree polynomials for the splines. Spline interpolation avoids the problem of ‘Runge’s phenomenon’ in which oscillation occur between the points when interpolating using high degree polynomials.
Types of spline interpolation:
Linear spline: Linear spline interpolation is same as linear piece interpolation. Let the given points be are the points in the XY- plane ,where and let . Further let be the spline of degree one defined in the interval . Obviously represents a straight line joining the points and . Hence we write ........ eqn1 where setting successively in eqn1 we obtain different splines of degree one, valid in the subinterval 1 to n respectively. It is easily seen that is continuous at both the end points.
Example:
0 |
1 |
3 |
|
1 |
3 |
55 |
We get liner splines as the following using above procedure
, but we know actual function is , at therefore and then error is 54.63
It is easy to check that splines are continuous in but their slopes are discontinuous. This is clearly a drawback of linear splines ,it is not used most of the time and therefore we next discuss quadratic splines which assume the continuity of slopes in addition to that of the function .
Quadratic splines: It satisfies the following properties
We denote, if the second derivative exists on each sub-interval we approximate by a second degree polynomial as there are unknowns to be determined which are
Example: Given data points |
0 |
1 |
3 |
|
1 |
3 |
55 |
Fit a quadratic spline with ,hence find an estimate of
We get ,now at 1.2 and interpolating polynomial , and actual function
Quadratic splines has two disadvantages :
For these reasons quadratic splines are not often used
Cubic spline interpolation: A cubic spline satisfies the following properties
Cubic spline doesn’t have the disadvantage of the quadratic splines on each sub-interval we approximate by cubic polynomial as
We have unknowns , to determine using the continuity of , and we have the following equations
,
At the end points and we have the interpolating conditions
So out of we have find out equations, we need two more equations to obtain polynomial uniquely . In most cases we prescribe at the two end points ,that is and .The end conditions and lead to a ‘natural spline’. That is spline are turns into a straight line at the end points .
Now if the above two conditions are imposed ,then we have equations in unknowns. These equations can be written in the matrix form and solution can be obtained.
Example: Given data points |
0 |
1 |
3 |
|
1 |
3 |
55 |
Fit a cubic spline with the conditions and and estimate and
We will get according to above procedure as s
But actual function and interpolating polynomial
|
|
||
|
|
||
|
|
The following figures shows piece wise interpolation using 0 order ,linear, quadratic, cubic spline
Conclusion:
Acknowledgements: I would like to express my gratitude towards to all my beloved teachers for their encouragement. I would like thank to Department of Mathematics GFGC Tumakuru for giving opportunity. Finally, I’m very grateful for support from my lovely parents and friends.
Reference: