Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

(Texts in Applied Mathematics 12) J. Stoer, R. Bulirsch (Auth.) - Introduction To Numerical Analysis-Springer New York (1993) - 107-121

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

2.

4 Interpolation by Spline Functions 97


# h   
1 x 2 jh
cj (P f ) = 1− cos jx dx = 2 sin2 .
π 0
h j πh 2
With h = 2π/N the formula (2.3.4.10) gives
 2
sin z πj
τj = with z := , j = 0, ±1, . . . .
z N

Example 2. Let g := P f be the periodic cubic spline function [see Section 2.4]
with g(xk ) = fk , k = 0, ±1, . . . . Again, P is linear and translation invari-
ant. Using the same technique as in the previous example, we find the following
attenuation factors:
 4
sin z 3 πj
τj = , where z := .
z 1 + 2 cos2 z N

2.4 Interpolation by Spline Functions


Spline functions yield smooth interpolating curves which are less likely
to exhibit the large oscillations characteristic of high-degree polynomials.
They are finding applications in graphics and, increasingly, in numerical
methods. For instance, spline functions may be used as trial functions in
connection with the Rayleigh-Ritz-Galerkin method for solving boundary-
value problems of ordinary and partial differential equations. More recently,
they are also used in signal processing.
Spline functions (splines) are connected with a partition
∆ : a = x0 < x1 < · · · < xn = b
of an interval [a, b] by knots xi , i = 0, 1, . . . , n: They are piecewise polyno-
mial functions S: [a, b] → IR, with certain smoothness properties that are
composed of polynomials, the restrictions S|Ii of S to Ii := (xi−1 , xi ), i = 1,
2, . . . , n, are polynomials. In Sections 2.4.1 – 2.4.3 we describe only the
simple but already representative case of cubic splines functions (splines of
degree 3) that are composed of cubic polynomials, S|Ii ∈ Π3 . The general
case of splines of degree k and of arbitrary piecewise polynomial functions
are treated in Sections 2.4.4 and 2.4.5. The final Section 2.4.6 deals with
the basic ideas behind the application of splines in signal processing.
A detailed description of splines can be found in many monographs, for
instance in Greville (1969), Schultz (1973), Böhmer (1974), de Boor (1978),
Schumaker (1981), Korneichuk (1984), andNürnberger (1989).

2.4.1 Theoretical Foundations

Let ∆ := { a = x0 < x1 < · · · < xn = b } be a partition of the interval


[a, b].
98 2 Interpolation

(2.4.1.1) Definition. A cubic spline (function) S∆ on ∆ is a real function


S∆ : [a, b] → IR with the properties:
(a) S∆ ∈ C 2 [a, b], that is, S∆ is twice continuously differentiable on [a, b].
(b) S∆ coincides on every subinterval [xi , xi+1 ], i = 0, 1, . . . , n − 1, with
a polynomial of degree (at most) three.
Thus a cubic spline consists of cubic polynomials pieced together in such
a fashion that their values and those of their first two derivatives coincide
at the interior knots xi , i = 1, . . . , n − 1.
Consider a finite sequence Y := (y0 , y1 , . . . , yn ) of n + 1 real numbers.
We denote by
S∆ (Y ; .)
an interpolating spline function S∆ with S∆ (Y ; xi ) = yi for i = 0, 1, . . . ,
n.
Such an interpolating cubic spline function S∆ (Y ; .) is not uniquely de-
termined by the sequence Y of support ordinates. Roughly speaking, there
are still two degrees of freedom left, calling for suitable additional require-
ments. The following three additional requirements are most commonly
considered:
(2.4.1.2)
 
a) S∆ (Y ; a) = S∆ (Y ; b) = 0,
(k) (k)
b) S∆ (Y ; a) = S∆ (Y ; b) for k = 0, 1, 2: S∆ (Y ; .) is periodic,

c) S∆ (Y ; a) = y0 , S∆

(Y ; b) = yn for given numbers y0 , yn .
We will confirm that each of these three sets of conditions by itself ensures
uniqueness of the interpolating spline function S∆ (Y ; .). A prerequisite of
the condition (2.4.1.2b) is, of course, that yn = y0 .
For this purpose, and to establish a characteristic minimum property
of spline functions, we consider the sets

(2.4.1.3) Km [a, b],

m > 0 integer, of real functions f : [a, b] → IR for which f (m−1) is absolutely


continuous4 on [a, b] and f (m) ∈ L2 [a, b].5 By

Kpm [a, b]

we denote the set of all functions in Km [a, b] with f (k) (a) = f (k) (b) for
k = 0, 1, . . . , m − 1. We call such functions periodic, because they arise as
restrictions to [a, b] of functions which are periodic with period b − a.
4
See footnote 2 in Section 2.3.4.
5
The set L2 [a, b] denotes the set of all real functions whose squares are integrable
3b
on the interval [a, b], i.e., a |f (t)|2 dt exists and is finite.
2.4 Interpolation by Spline Functions 99

Note that S∆ ∈ K3 [a, b], and that S∆ (Y ; .) ∈ Kp3 [a, b] if (2.4.1.2b) holds.
If f ∈ K2 [a, b], then we can define
# b
f :=
2
|f  (x)|2 dx.
a

Note that f ≥ 0. However, . is not a norm [see (4.4.1)] but only a


seminorm, because f = 0 may hold for functions which are not identically
zero, for instance, for all linear functions f (x) ≡ cx + d.
We proceed to show a fundamental identity due to Holladay [see for
instance Ahlberg, Nilson, and Walsh (1967)].
(2.4.1.4) Theorem. If f ∈ K2 (a, b), ∆ = { a = x0 < x1 < · · · < xn = b }
is a partition of the interval [a, b], and if S∆ is a spline function with knots
xi ∈ ∆, then
f − S∆ 2 = f 2 − S∆ 2 −
 n 
b   −
 xi
− 2 (f  (x) − S∆
 
(x))S∆ (x)a − (f (x) − S∆ (x))S∆ x+
.
i−1
i=1

Here g(x)|uv stands for g(u) − g(v), as it is commonly understood in the



calculus of integrals. It should be realized, however, that S∆ (x) is piecewise
constant with possible discontinuities at the knots x1 , . . . , xn−1 . Hence we

have to use the left and right limits of S∆ (x) at the locations xi and xi−1 ,
respectively, in the above formula. This is indicated by the notation x− i ,
x+
i−1 .

Proof. By the definition of · ,


# b
f − S∆ 2 = |f  (x) − S∆

(x)|2 dx
a
# b
= f 2 − 2 f  (x)S∆

(x) dx + S∆ 2
a
# b
= f 2 − 2 (f  (x) − S∆
 
(x))S∆ (x) dx − S∆ 2 .
a

Integration by parts gives for i = 1, 2, . . . , n


# xi xi
(f  (x) − S∆
 
(x))S∆ (x) dx = (f  (x) − S∆
 
(x))S∆ (x)x
i−1
xi−1
# xi
− (f  (x) − S∆
 
(x))S∆ (x) dx
xi−1

xi x−
= (f  (x) − S∆
 
(x))S∆ (x)x i−1

− (f (x) − S∆ (x))S∆ (x)xi+
i−1
100 2 Interpolation
# xi
(4)
+ (f (x) − S∆ (x))S∆ (x) dx.
xi−1
Now S (4) (x) ≡ 0 on the subintervals (xi−1 , xi ), and f  , S∆ 
, S∆ are
continuous on [a, b]. Adding these formulas for i = 1, 2, . . . , n yields the
propositon of the theorem, since
n
 xi b
(f  (x) − S∆
 
(x))S∆ (x)x = (f  (x) − S∆
 
(x))S∆ (x)a . 

i−1
i=1

With the help of this theorem we will prove the important minimum-
norm property of spline functions.
(2.4.1.5) Theorem. Given a partition ∆ := { a = x0 < x1 < · · · <
xn = b } of the interval [a, b], values Y := (y0 , · · · , yn ) and a function
f ∈ K2 (a, b) with f (xi ) = yi for i = 0, 1, . . . , n, then f ≥ S∆ (Y ; .) ,
and more precisely
f − S∆ (Y ; .) 2 = f 2 − S∆ (Y ; .) 2 ≥ 0
holds for every spline function S∆ (Y ; .), provided one of the conditions
[compare (2.4.1.2)]
 
(a) S∆ (Y ; a) = S∆ (Y ; b) = 0,
(b) f ∈ Kp2 [a, b], S∆ (Y ; .) periodic,

(c) S∆ (Y ; a) = f  (a), S∆ 
(Y ; b) = f  (b),
is met. In each of these cases, the spline function S∆ (Y ; .) is uniquely
determined.
The existence of such spline functions will be shown in Section 2.4.2.
Proof. In each of the above three cases (2.4.1.5a, b, c), the expression
n
b  x−
(f  (x) − S∆
 
(x))S∆ (x)a − 
(f (x) − S∆ (x))S∆ (x)xi+ = 0,
i−1
i=1

vanishes in the Holladay identity (2.4.1.4) if S∆ ≡ S∆ (Y ; .). This proves


the minimum property of the spline function S∆ (Y ; .). Its uniqueness can
be seen as follows: suppose S̄∆ (Y ; .) is another spline function having the
same properties as S∆ (Y ; ·). Letting S̄∆ (Y ; .) play the role of the function
f ∈ K2 [a, b] in the theorem, the minimum property of S∆ (Y ; ·) requires
that
S̄∆ (Y ; .) − S∆ (Y ; .) 2 = S̄∆ (Y ; .) 2 − S∆ (Y ; .) 2 ≥ 0 ,
and since S∆ (Y ; ·) and S̄∆ (Y ; ·) may switch roles,
# b
 
S̄∆ (Y ; .) − S∆ (Y ; .) =
2
|S̄∆ (Y ; x) − S∆ (Y ; x)|2 dx = 0 .
a
2.4 Interpolation by Spline Functions 101

 
Since S∆ (Y ; ·) and S̄∆ (Y ; ·) are both continuous,
 
S̄∆ (Y ; x) ≡ S∆ (Y ; x),

from which
S̄∆ (Y ; x) ≡ S∆ (Y ; x) + cx + d
follows by integration. But S̄∆ (Y ; x) = S∆ (Y ; x) holds for x = a, b, and
this implies c = d = 0. 

The minimum-norm property of the spline function expressed in The-
orem (2.4.1.5) implies in case (2.4.1.2a) that, among all functions f in
K2 [a, b] with f (xi ) = yi , i = 0, 1, . . . , n, it is precisely the spline function

S∆ (Y ; ·) with S∆ (Y ; x) = 0 for x = a, b that minimizes the integral
# b
f =
2
|f  (x)|2 dx.
a

The spline function of case (2.4.1.2a) is therefore often referred to as the


natural spline function In cases (2.4.1.2b) and (2.4.1.2c), the corresponding
spline functions S∆ (Y ; ·) minimize f over the more restricted sets Kp2 [a, b]
and { f ∈ K2 [a, b] | f  (a) = y0 , f  (b) = yn } ∩ { f | f (xi ) = yi for i = 0, 1,
. . . , n }, respectively.
The expression f  (x)(1 + f  (x)2 )−3/2 indicates the curvature of the
function f (x) at x ∈ [a, b]. If |f  (x)| is small compared to 1, then the
curvature is approximately equal to f  (x). The value f provides us there-
fore with an approximate measure of the total curvature of the function
f in the interval [a, b]. In this sense, the natural spline function is the
“smoothest” function to interpolate given support points (xi , yi ), i = 0, 1,
. . . , n.

2.4.2 Determining Interpolating Cubic Spline Functions

In this section, we will describe computational methods for determining


cubic spline functions which assume prescribed values at their knots and
satisfy one of the side conditions (2.4.1.2). In the course of this, we will
have also proved the existence of such spline functions; their uniqueness
has already been established by Theorem (2.4.1.5).
In what follows, ∆ = { xi | i = 0, 1, . . . , n } will be a fixed partition
of the interval [a, b] by knots a = x0 < x1 < · · · < xn = b and Y =
(yi )i=0,1,...,n will be a sequence of n+1 prescribed real numbers. In addition
let Ij be the subinterval Ij := [xj−1 , xj ], j = 0, 1, . . . , n − 1, and hj+1 :=
xj+1 − xj its length.
We refer to the values of the second derivatives at knots xj ∈ ∆,

(2.4.2.1) Mj := S∆ (Y ; xj ), j = 0, 1, . . . , n,
102 2 Interpolation

of the desired spline function S∆ (Y ; ·) as the moments Mj of S∆ (Y ; ·). We


will show that spline functions are readily characterized by their moments,
and that the moments of the interpolating spline function can be calculated
as the solution of a system of linear equations.

Note that the second derivative S∆ (Y ; ·) of the spline function coincides
with a linear function in each interval [xj , xj+1 ], j = 0, . . . , n − 1, and that
these linear functions can be described in terms of the moments Mi of
S∆ (Y ; ·):

 xj+1 − x x − xj
S∆ (Y ; x) = Mj + Mj+1 for x ∈ [xj , xj+1 ].
hj+1 hj+1

By integration,
(2.4.2.2)
 (xj+1 − x)2 (x − xj )2
S∆ (Y ; x) = −Mj + Mj+1 + Aj ,
2hj+1 2hj+1
(xj+1 − x)3 (x − xj )3
S∆ (Y ; x) = Mj + Mj+1 + Aj (x − xj ) + Bj ,
6hj+1 6hj+1

for x ∈ [xj , xj+1 ], j = 0, 1, . . . , n − 1, where Aj , Bj are constants of inte-


gration. From S∆ (Y ; xj ) = yj , S∆ (Y ; xj+1 ) = yj+1 we obtain the following
equations for these constants Aj and Bj :

h2j+1
Mj +Bj = yj ,
6
h2j+1
Mj+1 + Aj hj+1 +Bj = yj+1 .
6

Consequently,

h2j+1
Bj = yj − Mj ,
6
(2.4.2.3)
yj+1 − yj hj+1
Aj = − (Mj+1 − Mj ).
hj+1 6

This yields the following representation of the spline function in terms


of its moments:
(2.4.2.4)
S∆ (Y ; x) = αj + βj (x − xj ) + γj (x − xj )2 + δj (x − xj )3 for x ∈ [xj , xj+1 ],

where
2.4 Interpolation by Spline Functions 103

Mj
αj :=yj , γj := ,
2
 Mj hj+1
βj :=S∆ (Y ; xj ) = − + Aj
2
yj+1 − yj 2Mj + Mj+1
= − hj+1 ,
hj+1 6

S∆ (Y ; x+
j ) Mj+1 − Mj
δj := = .
6 6hj+1
Thus S∆ (Y ; ·) has been characterized by its moments Mj . The task of
calculating these moments will now be addressed.

The continuity of S∆ (Y ; ·) at the interior knots x = xj , j = 1, 2, . . . ,
n − 1 [namely, the relations S∆ 
(Y ; x− 
j ) = S∆ (Y ; xj )] yields n − 1 equations
+

for the moments Mj . Substituting the values (2.4.2.3) for Aj and Bj in


(2.4.2.2) gives for x ∈ [xj , xj+1 ]

 (xj+1 − x)2 (x − xj )2
S∆ (Y ; x) = − Mj + Mj+1
2hj+1 2hj+1
yj+1 − yj hj+1
+ − (Mj+1 − Mj ).
hj+1 6
For j = 1, 2, . . . , n − 1, we have therefore

yj − yj−1 hj hj

S∆ (Y ; x−
j )= + Mj + Mj−1 ,
hj 3 6
 yj+1 − yj hj+1 hj+1
S∆ (Y ; x+
j )= − Mj − Mj+1 ,
hj+1 3 6
  −
and since S∆ (Y ; x+
j ) = S∆ (Y ; xj ),

hj hj + hj+1 hj+1 yj+1 − yj yj − yj−1


(2.4.2.5) Mj−1 + Mj + Mj+1 = −
6 3 6 hj+1 hj
for j = 1, 2, . . . , n − 1. These are n − 1 equations for the n + 1 unknown
moments. Two further equations can be gained separately from each of the
side conditions (a), (b) and (c) listed in (2.4.1.2).
 
Case (a) : S∆ (Y ; a) = M0 = 0 = Mn = S∆ (Y ; b),
 
Case (b) : S∆ (Y ; a) = S∆ (Y ; b) ⇒ M0 = Mn ,
  hn hn + h1 h1
S∆ (Y ; a) = S∆ (Y ; b) ⇒ Mn−1 + M n + M1
6 3 6
y1 − yn yn − yn−1
= − .
h1 hn
104 2 Interpolation

The latter condition is identical with (2.4.2.5) for j = n if we put

hn+1 := h1 , Mn+1 := M1 , yn+1 := y1 .

Recall that (2.4.1.2b) requires yn = y0 .

 h1 h1 y1 − y0
Case (c) : S∆ (Y ; a) = y0 ⇒ M0 + M1 = − y0 ,
3 6 h1
 hn hn yn − yn−1
S∆ (Y ; b) = yn ⇒ Mn−1 + Mn = yn − .
6 3 hn
The last two equations, as well as those in (2.4.2.5), can be written in
a common format:

µj Mj−1 + 2Mj + λj Mj+1 = dj , j = 1, 2, . . . , n − 1,

upon introducing the abbreviations (j = 1, 2, . . . , n − 1)

hj+1 hj
λj := , µj := 1 − λj = ,
hj + hj+1 hj + hj+1
(2.4.2.6)  1
6 yj+1 − yj yj − yj−1
dj := − .
hj + hj+1 hj+1 hj

In case (a), we define in addition

(2.4.2.7) λ0 := 0, d0 := 0, µn := 0, dn := 0,

and in case (c)


 
6 y1 − y0
λ0 := 1, d0 := − y0 ,
h1 h1
(2.4.2.8)  
6 yn − yn−1
µn := 1, dn := yn − .
hn hn

This leads in cases (a) and (c) to a system of linear equations for the
moments Mi that reads in matrix notation:
    
2 λ0 0 M0 d0
 µ1 2 λ1   M1   d 1 
    
 µ2 · ·  ·   · 
(2.4.2.9)    =  .
 · · ·  ·   · 
    
· 2 λn−1 · ·
0 µn 2 Mn dn

The periodic case (b) also requires further definitions,


2.4 Interpolation by Spline Functions 105

h1 hn
λn := , µn := 1 − λn = ,
hn + h1 hn + h1
(2.4.2.10)  1
6 y1 − yn yn − yn−1
dn := − ,
hn + h1 h1 hn
which then lead to the following linear system of equations for the moments
M1 , M2 , . . . , Mn (= M0 ):
    
2 λ1 µ1 M1 d1
 µ2 2 λ2   M2   d 2 
    
 µ3 · ·  ·   · 
(2.4.2.11)    =  .
 · · ·  ·   · 
    
· 2 λn−1 · ·
λn µn 2 Mn dn
The coefficients λi , µi , di in (2.4.2.9) and (2.4.2.11) are well defined by
(2.4.2.6) and the additional definitions (2.4.2.7), (2.4.2.8), and (2.4.2.10),
respectively. Note in particular that in (2.4.2.9) and (2.4.2.11)

(2.4.2.12) λi ≥ 0, µi ≥ 0, λi + µi = 1,

for all coefficients λi , µi , and that these coefficients depend only on the
location of the knots xj ∈ ∆ and not on the prescribed values yi ∈ Y or on
y0 , yn in case (c). We will use this observation when proving the following:
(2.4.2.13) Theorem. The systems (2.4.2.9) and (2.4.2.11) of linear equa-
tions are nonsingular for any partition ∆ of a, b.
This means that the above systems of linear equations have unique solu-
tions for arbitrary right-hand sides, and that consequently the problem of
interpolation by cubic splines has a unique solution in each of the three
cases (a), (b), (c) of (2.4.1.2).
Proof. Consider the (n + 1) × (n + 1) matrix
 
2 λ0 0
 µ1 2 λ1 
 
 µ2 · · 
A= 
 · · · 
 
· 2 λn−1
0 µn 2
of the linear system (2.4.2.9). This matrix has the following property:

(2.4.2.14) Az = w ⇒ max |zi | ≤ max |wi |.


i i

for every pair of vectors z = (z0 , . . . , zn )T , w = (w0 , . . . , wn )T , z, w ∈


IRn+1 . Indeed, let r be such that |zr | = maxi |zi |. From Az = w,
106 2 Interpolation

µr zr−1 + 2zr + λr zr+1 = wr (µ0 := λn := 0).

By the definiton of r and because µr + λr = 1,


max |wi | ≥ |wr | ≥ 2|zr | − µr |zr−1 | − λr |zr+1 |
i
≥ 2|zr | − µr |zr | − λr |zr |
= (2 − µr − λr )|zr |
= |zr | = max |zi |.
i

Suppose the matrix A were singular. Then there would exist a solution
z = 0 of Az = 0, and (2.4.2.14) would lead to the contradiction

0 < max |zi | ≤ 0.


i

The nonsingularity of the matrix in (2.4.2.11) is shown similarly. 



To solve the equations (2.4.2.9), we may proceed as follows: subtract
µ1 /2 times the first equation from the second, thereby annihilating µ1 , and
then a suitable multiple of the second equation from the third to annihilate
µ2 , and so on. This leads to a “triangular” system of equations which can be
solved in a straightforward fashion [note that this method is the Gaussian
elimination algorithm applied to (2.4.2.9); compare Section 4.1]:
q0 := −λ0 /2; u0 := d0 /2; λn := 0;
for k := 1 , 2, . . . , n:
pk := µk qk−1 + 2;
qk := −λk /pk ;
(2.4.2.15)
uk := (dk − µk uk−1 )/pk ;
Mn := un ;
for k := n − 1, n − 2, . . . , 0:
Mk := qk Mk+1 + uk ;
[It can be shown that pk > 0, so that (2.4.2.15) is well defined; see Exercise
25.] The linear system (2.4.2.11) can be solved in a similar, but not as
straightforward, fashion. An algol program by C. Reinsch can be found
in Bulirsch and Rutishauser (1968).
The reader can find more details in Greville (1969) and de Boor (1972),
algol programs in Herriot and Reinsch (1971), and fortran programs in
de Boor (1978). These references also contain information and algorithms
for the spline functions of degree k ≥ 3 and B-splines, which are treated
here in Sections 2.4.4 and 2.4.5.
2.4 Interpolation by Spline Functions 107

2.4.3 Convergence Properties of Cubic Spline Functions

Interpolating polynomials may not converge to a function f whose values


they interpolate, even if the partitions ∆ are chosen arbitrarily fine [see
Section 2.1.4]. In contrast, we will show in this section that, under mild
conditions on the function f and the partitions ∆, the interpolating spline
functions do converge towards f as the fineness of the underlying partitions
approaches zero.
We will show first that the moments (2.4.2.1) of the interpolating spline
function converge to the second derivatives of the given function. More
precisely, consider a fixed partition ∆ = { a = x0 < x1 < · · · < xn = b } of
[a, b], and let
 
M0
.
M =  .. 
Mn
be the vector of moments Mj of the spline function S∆ (Y ; ·) with f (xj ) = yi
for j = 0, . . . , n as well as

S∆ (Y ; a) = f  (a), 
S∆ (Y ; b) = f  (b).
We are thus dealing with case (c) of (2.4.1.2). The vector M of moments
satisfies the equation
AM = d,
which expresses the linear system of equations (2.4.2.9) in matrix form.
The components dj of d are given by (2.4.2.6) and (2.4.2.8). Let F and r
be the vectors
 f  (x ) 
0
 f  (x1 ) 
F := 
 .. ,
 r := d − AF = A(M − F ).
.
f  (xn )
Writing z := maxi |zi | for vectors z, and ∆ for the fineness
(2.4.3.1) ∆ := max |xj+1 − xj |
j

of the partion ∆, we have:


(2.4.3.2) If f ∈ C 4 [a, b] and |f (4) (x)| ≤ L for x ∈ [a, b], then
M − F ≤ r ≤ 34 L ∆ 2 .

Proof. By definition, r0 = d0 − 2f  (x0 ) − f  (x1 ) and by (2.4.2.8),


 
6 y1 − y0
r0 = − y0 −2f  (x0 ) − f  (x1 ).

h1 h1
108 2 Interpolation

Using Taylor’s theorem to express y1 = f (x1 ) and f  (x1 ) in terms of the


value and the derivatives of the function f at x0 yields
 
6  h1  h21  h31 (4) 
r0 = f (x0 ) + f (x0 ) + f (x0 ) + f (τ1 ) − f (x0 )
h1 2 6 24
 
   h21 (4)
− 2f (x0 ) − f (x0 ) + h1 f (x0 ) + f (τ2 )
2
h21 (4) h21 (4)
= f (τ1 ) − f (τ2 )
4 2
with τ1 , τ2 ∈ (x0 , x1 ). Therefore

|r0 | ≤ 34 L ∆ 2 .

Analogously, we find for

rn = dn − f  (xn−1 ) − 2f  (xn )

that
|rn | ≤ 34 L ∆ 2 .
For the remaining components of r = d − AF , we find similarly

rj =dj − µj f  (xj−1 ) − 2f  (xj ) − λj f  (xj+1 )


 
6 yj+1 − yj yj − yj−1
= −
hj + hj+1 hj+1 hj
hj hj+1
− f  (xj−1 ) − 2f  (xj ) − f  (xj+1 ).
hj + hj+1 hj + hj+1

Taylors’s formula at xj then gives



6 hj+1  h2j+1  h3j+1 (4)
rj = f  (xj ) + f (xj ) + f (xj ) + f (τ1 )
hj + hj+1 2 6 24

hj h2j h3j
− f  (xj ) + f  (xj ) − f  (xj ) + f (4) (τ2 )
2 6 24
 2 
hj h j
− f  (xj ) − hj f  (xj ) + f (4) (τ3 ) − 2f  (xj )
hj + hj+1 2
 
hj  
h2j+1 (4)
− f (xj ) + hj+1 f (xj ) + f (τ4 )
hj + hj+1 2
 3
1 hj+1 (4) h3j h3j
= f (τ1 ) + f (4) (τ2 ) − f (4) (τ3 )
hj + hj+1 4 4 2
3 
hj+1 (4)
− f (τ4 ) .
2
2.4 Interpolation by Spline Functions 109

Here τi ∈ [xj−1 , xj+1 ]. Therefore

1
|rj | ≤ 34 L [h3 + h3j ] ≤ 34 L ∆ 2
hj + hj+1 j+1

for j = 1, 2, . . . , n − 1. In sum,

r ≤ 34 L ∆ 2

and since r = A(M − F ), (2.4.2.14) implies

M − F ≤ r ≤ 34 L ∆ 2 . 


(2.4.3.3) Theorem.6 Suppose f ∈ C 4 [a, b] and |f (4) (x)| ≤ L for x ∈ [a, b].
Let ∆ be a partition ∆ = { a = x0 < x1 < · · · < xn = b } of the interval
[a, b], and K a constant such that


≤K for j = 0, 1, . . . , n − 1.
|xj+1 − xj |

If S∆ is the spline function which interpolates the values of the function f



at the knots x0 , · · · , xn ∈ ∆ and satisfies S∆ (x) = f  (x) for x = a, b, then
there exist constants ck ≤ 2, which do not depend on the partition ∆, such
that for x ∈ [a, b],

(k) ck L ∆ 4−k for k = 0, 1, 2,
|f (x) − S∆ (x)| ≤
(k)
c3 LK ∆ for k = 3.

Note that the constant K ≥ 1 bounds the deviation of the partition ∆


from uniformity.
Proof. We prove the proposition first for k = 3. For x ∈ [xj−1 , xj ],

 Mj − Mj−1
S∆ (x) − f  (x) = − f  (x)
hj
Mj − f  (xj ) Mj−1 − f  (xj−1 )
= −
hj hj
f  (xj ) − f  (x) − [f  (xj−1 ) − f  (x)]
+ − f  (x).
hj

Using (2.4.3.2) and Taylor’s theorem at x, we conclude that


6
The estimates of Theorem (2.4.3.3) have been improved by Hall and Meyer
(k)
(1976): |f (k) (x) − S∆ (x)| ≤ ck L∆4−k , k = 0, 1, 2, 3, with c0 := 5/384,
c1 := 1/24, c2 := 3/8, c3 := (K + K −1 )/2. Here c0 and c1 are optimal.
110 2 Interpolation

 ∆ 2 1  (xj − x)2 (4)


|S∆ (x) − f  (x)| ≤ 32 L + (xj − x)f  (x) + f (η1 )
hj hj 2
(xj−1 − x)2 (4) 

− (xj−1 − x)f  (x) − f (η2 ) − hj f  (x)
2
∆ 2 L ∆ 2
≤ 32 L +
hj 2 hj
∆ 2
=2L ≤ 2LK ∆ ,
hj

where η1 , η2 ∈ [xj−1 , xj ]. Thus |f  (x) − S∆ 


(x)| ≤ 2LK ∆ .
To prove the proposition for k = 2, we observe: for each x ∈ (a, b)
there exists a closest knot xj = xj (x). Assume without loss generality
x ≤ xj (x) = xj so that x ∈ [xj−1 , xj ] and |xj (x) − x| ≤ hj /2 ≤ ∆ /2.
From
# x
f  (x) − S∆

(x) = f  (xj (x)) − S∆
(xj (x)) + (f  (t) − S∆

(t))dt,
xj (x)

(2.4.3.2) and the estimate just proved we find

∆ 2
|f  (x) − S∆

(x)| ≤ 34 L ∆ 2 + 12 hj · 2L
hj
≤ 74 L ∆ 2 , x ∈ [a, b].

We consider k = 1 next. In addition to the boundary points ξ0 := a,


ξn+1 := b, there exist, by Rolle’s theorem, n further points ξj ∈ (xj−1 , xj ),
j = 1, 2, . . . , n with

f  (ξj ) = S∆

(ξj ), j = 0, 1, . . . , n + 1.

For any x ∈ [a, b] there exists a closest one of the above points ξj = ξj (x),
for which consequently
|ξj (x) − x| < ∆ .
Thus # x
f  (x) − S∆

(x) = (f  (t) − S∆

(t)]dt,
ξj (x)

and

|f  (x) − S∆

(x)| ≤ 74 L ∆ 2 · ∆ = 74 L ∆ 3 , x ∈ [a, b].

The case k = 0 remains. Since


# x
f (x) − S∆ (x) = (f  (t) − S∆

(t))dt,
xj (x)
2.4 Interpolation by Spline Functions 111

it follows from the above result for k = 1 that

|f (x) − S∆ (x)| ≤ 74 L ∆ 3 · 12 ∆ = 78 L ∆ 4 . x ∈ [a, b]. 




Clearly, (2.4.3.3) implies that for sequences


(m) (m)
∆m = { a = x0 < x1 < · · · < x(m)
nm = b }

of partitions with ∆m → 0 the corresponding cubic spline functions S∆m


and their first two derivatives converge to f and its corresponding deriva-
tives uniformly on [a, b]. If in addition
∆m
sup (m) (m)
≤ K < +∞,
m,j |x − xj |
j+1

even the third derivative f  is uniformly approximated by S∆



m
, a usually
discontinuous sequence of step functions.

2.4.4 B-Splines

Spline functions are instances of piecewise polynomial functions associated


with a partition

∆ = {a = x0 < x1 < · · · < xn = b}

of an interval [a, b] by abscissae or knots xi . In general, a real function


f : [a, b] → IR is called a piecewise polynomial function of order r or degree
r − 1 if, for each i = 0, . . . , n − 1, the restriction of f to the subinterval
(xi , xi+1 ) agrees with a polynomial pi (x) of degree ≤ r − 1, pi ∈ Πr−1 .
In order to achieve a 1-1 correspondence between f and the sequence
(p0 (x), p1 (x), . . . , pn−1 (x)), we define f at the knots xi , i = 0, . . . , n − 1, so
that it becomes continuous from the right, f (xi ): = f (xi +0), 0 ≤ i ≤ n−1,
and f (xn ) = f (b): = f (xn − 0).
Then, generalizing cubic splines, we define spline functions S∆ of de-
gree k as piecewise polynomial functions of degree k that are k − 1 times
differentiable at the interior knots xi , 1 ≤ i ≤ n − 1, of ∆. By S∆,k we
denote the set of all spline functions S∆ of degree k, which is easily seen to
be a real vector space of dimension n+k. In fact, the polynomial S∆ |[x0 , x1 ]
is uniquely determined by its k + 1 coefficients, and this in turn already
fixes the first k − 1 derivatives (= k conditions) of the next polynomial
S∆ |[x1 , x2 ] at x1 , so that only one degree of freedom is left for choosing
S∆ |[x1 , x2 ]. As the same holds for all subsequent polynomials S∆ |[xi , xi+1 ],
i = 2, . . . , n − 1, one finds dim S∆,k = k + 1 + (n − 1) · 1 = k + n.
B-splines are special piecewise polynomial functions with remarkable
properties: they are nonnegative and vanish everywhere except on a few
contiguous intervals [xi , xi+1 ]. Moreover, the function space S∆,k has a basis

You might also like