



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Let a = x 0 < x 1 <... < xn− 1 < xn = b. A spline of degree m is a function
S(x) which satisfies the following conditions:
(m−1) exists and continuous at the interior points x 1 ,... , xn− 1 , i.e.
limx→x− i
(m−1) i− 1 (x) = limx→x
i
(m−1) i (x)
S(x) =
0 , − 1 ≤ x ≤ 0
x
2 , 0 ≤ x ≤ 1
x 0 = − 1 , x 1 = 0, x 2 = 1
S(x) is a spline of degree m = 2 (quadratic spline).
S(x) =
0 , − 1 ≤ x ≤ 0
1 − (x − 1)
2 , 0 ≤ x ≤ 1
S(x) is not a quadratic spline because limx→ 0 −^ S
′ (x) 6 = limx→0+ S
′ (x).
Given f , x 0 ,... , xn as above, find a cubic spline S such that S(xi) = f (xi),
i = 0,... , n.
n + 1 points ⇒ n intervals ⇒ 4 n coefficients
2 n conditions needed to interpolate f (x 0 ),... , f (xn)
2(n − 1) conditions needed to ensure S
′ , S
′′ are continuous at the interior
points
This leaves 2 free conditions. Popular choices are:
(i) S
′′ (x 0 ) = S
′′ (xn) = 0: the natural cubic spline interpolant
(ii) S
′ (x 0 ) = f
′ (x 0 ), S
′ (xn) = f
′ (xn): the clamped cubic spline interpolant
Given f (x); x 0 ,... , xn, how to find S(x)?
EXAMPLE
xi = ih, h = 1/n, x 0 = 0, xn = 1
STEP 1 (2nd derivative conditions)
Since Si(x) is a cubic polynomial, S
′′ i (x) is linear for^ x
′′ i (x) =^ ai
xi+1 − x
h
x − xi
h
, i = 0,... , n − 1
(using Lagrange 1st order interpolating polynomial).
Then
′′ i (xi) =^ ai
′′ i (xi+1) =^ ai+
′′ i− 1 (xi) =^ ai^ =^ S
′′ i (xi)
Thus, S
′′ (x) is continuous at the interior nodes.
STEP 2 (function values)
Integrate twice
Si(x) =
ai(xi+1 − x)
3
6 h
ai+1(x − xi)
3
6 h
the last two terms are written in this special form just for convenience
Si(xi) = ai
h^2 6
Si(xi+1) = ai+
h^2 6
bih = fi − ai
h^2 6
cih = fi+1 − ai+
h^2 6
Substitute
Si(x) =
ai(xi+1 − x)
3
6 h
ai+1(x − xi)
3
6 h
fi − ai
h
2
xi+1 − x
h
fi+1 − ai+
h
2
x − xi
h
STEP 3 (1st derivative conditions).
′ i(x) =^ −
ai(xi+1 − x)
2
2 h
ai+1(x − xi)
2
2 h
fi
h
− ai
h
fi+
h
− ai+
h
Notes:
and an.
See the handout about natural cubic spline interpolation.
Recall
A = (aij ) is strictly diagonally dominant if
|aii| >
∑^ n
j= j 6 =i
|aij | for all i = 1,... , n
Theorem If A is strictly diagonally dominant, then A is invertible.
Proof. Suppose A is not invertible. Then there exists a vector x 6 = 0 such
that Ax = 0. Choose index i such that |xi| = ||x||∞ = maxj |xj |. Then
0 = (Ax)i =
∑^ n
j=
aij xj = aiixi +
∑^ n
j= j 6 =i
aij xj
⇒ |aiixi| =
∑^ n
j= j 6 =i
aij xj
∑^ n
j= j 6 =i
|aij ||xj |
⇒ |aii| ≤
∑^ n
j= j 6 =i
|aij |
|xj |
|xi|
∑^ n
j= j 6 =i
|aij |
This contradicts the assumption that A is strictly diagonally dominant.
Note
In practice, the values ai = S
′′ (xi) are found by Gaussian elimination for a
tridiagonal system.
Theorem Let f be defined on [a, b], a = x 0 < x 1 <... < xn− 1 < xn = b and
let S be the natural cubic spline interpolant of f (or clamped cubic spline).
max a≤x≤b
|f
(4) (x)| · h
4
where h = maxi |xi+1 − xi|
∫ (^) b
a
′′ (x)]
2 dx ≤
∫ (^) b
a
[f
′′ (x)]
2 dx Minimum curvature property of cubic splines
Note
th order accurate.
smooth functions satisfying interpolation condition + BC (natural BC
or clamped spline S
′ (x 0 ) = y
′ 0 ,^ S
′ (xn) = y
′ n).
Curvature
κ(x) =
|f
′′ (x)|
(1 + [f ′(x)]^2 )
3 / 2
≈ |f
′′ (x)|
∫ (^) b
a
[f
′′ (x)]
2 dx is a crude measure of the total curvature over an inter-
val.
∫ (^) b
a
′′ (x)]
2 dx ≤
∫ (^) b
a
[f
′′ (x)]
2 dx :
any smooth interpolating function must have a total curvature at least
as large as that of the cubic spline (natural or clamped)
Proof of (2) for natural splines
algebraic identity: F
2 − S
2 = (F − S)
2 − 2 S(S − F )
Let F = f
′′ (x), S = S
′′ (x), integrate over [a, b].
∫ (^) b
a
[f
′′ (x)]
2 dx −
∫ (^) b
a
′′ (x)]
2 dx =
∫ (^) b
a
[f
′′ (x) − S
′′ (x)]
2 dx
∫ (^) b
a
′′ (x)(S
′′ (x) − f
′′ (x))dx