{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CubicSplines - Cubic Splines James Keesling 1 Denition of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Cubic Splines James Keesling 1 Definition of Cubic Spline Given a function f ( x ) defined on an interval [ a, b ] we want to fit a curve through the points { ( x 0 , f ( x 0 )) , ( x 1 , f ( x 1 )) , . . . , ( x n , f ( x n )) } as an approximation of the function f ( x ). We assume that the points are given in order a = x 0 < x 1 < x 2 < · · · < x n = b and let h i = x i +1 - x i . The method of approximation we describe is called cubic spline interpolation . The cubic spline is a function S ( x ) on [ a, b ] with the following properties. S ( x ) [ x i ,x i +1 ] = S i ( x ) is a cubic polynomial for i = 0 , 1 , 2 , . . . , n - 1 S i ( x i ) = f ( x i ) for i = 0 , 1 , 2 , . . . , n - 1 S i ( x i +1 ) = f ( x i +1 ) for i = 0 , 1 , 2 , . . . , n - 1 S 0 i ( x i +1 ) = S 0 i +1 ( x i +1 ) for i = 0 , 1 , 2 , . . . , n - 2 S 00 i ( x i +1 ) = S 00 i +1 ( x i +1 ) for i = 0 , 1 , 2 , . . . , n - 2 S 00 0 ( x 0 ) = S 00 n - 1 ( x n ) [ free boundary condition ] or S 0 0 ( x 0 ) = f 0 ( x 0 ) and S 0 n - 1 ( x n ) = f 0 ( x n ) [ clamped boundary condition ] 2 Determining the Coefficients of the Cubic Polynomials Since each S i ( x ) = a i + b i · ( x - x i ) + c i · ( x - x i ) 2 + d i · ( x - x i ) 3 has four constants to be determined, we have 4 n unknowns and the above conditions give us 4 n equations. For the free boundary case we can simplify the solutions of the equations to the following.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}