Data Analysis:
Interpolation and Curve
Fitting II
Dr. Cem Özdo
˘
gan
LOGIK
Divided Differences
Spline Curves
The Equation for a Cubic
Spline
Least-Squares
Approximations
Nonlinear Data (Curve
Fitting)
Least-Squares Polynomials
Millikan oil-drop experiment
13.19
The Equation for a Cubic Spline II
•
Thus, the cubic spline function is of the form
g(x) = g
i
(x) on the interval[x
i
, x
i+1
], for i = 0, 1, . . . , n − 1
•
and meets these conditions:
g
i
(x
i
) = y
i
, i = 0, 1, . . . , n − 1 and g
n−1
(x
n
) = y
n
(1)
g
i
(x
i+1
) = g
i+1
(x
i+1
), i = 0, 1, . . . , n − 2 (2)
g
′
i
(x
i+1
) = g
′
i+1
(x
i+1
), i = 0, 1, . . . , n − 2 (3)
g
′′
i
(x
i+1
) = g
′′
i+1
(x
i+1
), i = 0, 1, . . . , n − 2 (4)
•
Equations say that the cubic spline fits to each of the
points Eq. 1, is continuous Eq. 2, and is continuous in
slope and curvature Eq. 3 and Eq. 4, throughout the
region spanned by the points.