0% found this document useful (0 votes)
56 views1 page

Spline

The document discusses cubic spline interpolation, which involves fitting a smooth curve through a set of points. Specifically: 1) The interval is divided into subintervals, and a cubic polynomial (degree 3) is fit to each subinterval to interpolate the values at the points. 2) The cubic spline and its first two derivatives must be continuous across each subinterval. 3) An equation is provided for the cubic spline function S(x) in each subinterval in terms of the points and second derivatives at each point (Mi). 4) Solving this system of equations results in a natural cubic spline when the end second derivatives are set to zero.

Uploaded by

aagam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views1 page

Spline

The document discusses cubic spline interpolation, which involves fitting a smooth curve through a set of points. Specifically: 1) The interval is divided into subintervals, and a cubic polynomial (degree 3) is fit to each subinterval to interpolate the values at the points. 2) The cubic spline and its first two derivatives must be continuous across each subinterval. 3) An equation is provided for the cubic spline function S(x) in each subinterval in terms of the points and second derivatives at each point (Mi). 4) Solving this system of equations results in a natural cubic spline when the end second derivatives are set to zero.

Uploaded by

aagam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CUBIC SPLINE INTERPOLATION

Given interval [a, b], subdivide it into n subintervals [x0 , x1 ], [x1 , x2 ], . . . , [xn−1 , xn ] where
a = x0 < x1 < · · · < xn = b. A spline function of degree m with nodes xi , i = 0, 1, . . . n
is a function S(x) satisfying the following properties:
(i) S(x) = f (xi ), for every xi , i = 0, 1, . . . n (interpolation conditions).
(ii) S(x) is a polynomial of degree m on each subinterval [xi−1 , xi ], i = 0, 1, . . . n.
(iii) S(x) and its first (m − 1) derivatives are continuous on [a, b].
In this course, we shall discuss only cubic spline. From above definition, a cubic spline
has the following properties:
(i) S(x) = f (xi ), for every xi , i = 0, 1, . . . n (interpolation conditions).
(ii) S(x) is a polynomial of degree 3 on each subinterval [xi−1 , xi ], i = 0, 1, . . . n.
(iii) S(x), S 0 (x) and S 00 (x) are continuous on [a, b].
The cubic spline interpolation S(x) in the interval [xi−1 , xi ] is given by
(xi − x){(xi − x)2 − h2i }
 
S(x) = Mi−1
6hi
(x − xi−1 ){(x − xi−1 )2 − h2i }
 
+ Mi
6hi
1 1
+ (xi − x)fi−1 + (x − xi−1 )fi
hi hi
00
where hi = xi − xi−1 , Mi = S (xi ), fi = f (xi ), and
hi hi + hi+1 hi+1 1 1
Mi−1 + Mi + Mi+1 = (fi+1 − fi ) − (fi − fi−1 ), i = 1, 2, . . . , n − 1.
6 3 6 hi+1 hi
This gives a system of (n − 1) linear equations with (n + 1) unknowns M0 , M1 , . . . , Mn .
To solve the above system, two additional conditions may be taken as M0 = 0 and Mn = 0.
In this case spline is called natural cubic spline.
For equally spaced data points, hi = h for all i, therefore we have
1 
(xi − x)3 Mi−1 + (x − xi−1 )3 Mi

S(x) =
6h
1 h2
+ (xi − x)(fi−1 − Mi−1 )
h 6
1 h2
+ (x − xi−1 )(fi − Mi )
h 6
and
6
Mi−1 + 4Mi + Mi+1 = 2 (fi−1 − 2fi + fi+1 ), i = 1, 2, . . . , n − 1.
h

You might also like