You are on page 1of 10
Spline Interpolation ‘We have already discussed how an interpolation polynomial of degree n can be Constructed and used given a set of values of functions. There are situations in Which this approach is likely to face problems and produce incorrect estimates. This is because the interpolation takes a global rather than a local view of data. It hhas been proved that when m is large compared to the order of the ‘true’ function, the interpolation polynomial of degree nm does not provide accurate results at the ends of the range. This is illustrated in Fig. 1. Note that the interpolation polyriomial contains undesirable maxima and minima between the data points. This only shows that increasing the order of polynomials does not necessarily increase the accuracy. Fig, 1 Interpolation polynomial of degree 11 of the function zw + ‘One approach to overcome this problem isto divide the entire range of points into subintervals and use local low-order polynomials to interpolate each subinterval. Such polynomials are called piecewise polynomials. Subintervals are usually taken as [x,, x,,;], 7=0, 1, 2, --+, 2 as illustrated in Fig. 2. Fig. 2 Piecewise polynomial interpolation GEE spire tnterpolation M Mica Raman Notice that the piecewise polynomials shown in Fig. 2, exhibit discontinuity at the interpolating points (which connect these polynomials). It is possible to construct piecewise polynomials that prevent such discontinuities at the connecting points, Such piecewise polynomials are called spline functions (or simply splines). Spline functions, therefore, look smooth at the connecting points as shown in Fig, 3. The connecting points are called knots or nodes ( because this is where the polynomial pieces are tied together). Fig .3 : Second degree spline polynomials. The connecting polynomials (spline functions) could be of any degree and, therefore, we have a different types of splines : linear, quadratic, cubic, quantic, et. Of these, the cubic spline (spline of degree three, or order four) has been found to be the most popular in engineering applications. © A spline function s(x) of degree m must satisfy the following conditions : 1. s(x) is a polynomial of degree atmost m in each of the subintervals [x sah f= 001, 2. s(x) and its derivatives of orders 1,2, --+, m-I are continuous in the range [9 *]- According to the first condition, each interval will have a different polynomial of degree m or less. Then the set of all polynomials form a spline interpolation polynomial, if s(x,)= f,, for . n. The process of constructing such polynomials for a given set of function points is known as spline interpolation. ©. GED spline Interpolation Me Micaniee Rahman Example : State whether the following piecewise polynomials are splines or not. xt -1“ Solution: Here =3; xy=4, 4 =9, x, =16 At De har fied h=4 I= xx) =9-4=5 Ig = Xy-¥, =16-9=7 We know, Mya, +2(y +My) a, + hy, = [fant (a) tel For i=1, we can write (1) as 2 Iya +2(h, +h), + hy, -( AL Le f) Q h We know, ay = a, = 0. Thus, from (2) 2(5+7)a, = 2-2) > a= (-2) _ _ 9.9143 3 (35)(24) Since n= 3, there are two cubic splines, namely, S() Hy SxSH Hx) SxSX The target point x =7 is in the domain of s,(x) and, therefore, we need to use only 5,(x) for estimation. We know that, the spline function is given by, ss) = SE (Hayat) + (Wa Ba) rg tere) ® Here, s(x) = ae 1) +5 (ito fot) (4) Ug=x—%) and my =x-% From (4) we have, si) = =O ray? S844) ]+ 190-4) -264-9)] AMET 547 -4)] +4374) -20-9)] = 2.6229 cansy 6 - (7) = Spline Interpolation M. Mizanur Rahman Example ® : A natural cubic spline s on [0, 2] is defined by oe So(X) =1+2x-2°, O 23x? = + 2e(x-1)+3d(x-1)? At x=, 2-3=b ==> b=-1 Again, sol (m= 5%) = — 6x, = 2c + 6d(x-1) At x= x -6=2¢ >c=33 Since s,(x) is natural cubic spline, we have, sf(%) =0 => 2c+6d(x-1)=0 => 2c+6d(2-1)=0 => 6d =-2c =-2(-3) - Answer: b=-1, c=-3 and d=1. 0

You might also like