PIECEWISE
POLYNOMIAL
INTERPOLATION
171
This proves (3.7.25). Equality
in
(3.7.25) occurs only if
s;'(x)-
g"(x)
= 0 on
[a,b], or equivalently
sc(x)-
g(x)
is
linear. The interpolating conditions then
imply
s"(x)
-
g(x)
=
0.
We
leave a further discussion of this topic to Problem
38.
Case 2 The "not-a-knot" condition. When the derivative values
f'(a)
and
f'(b)
are not available,
we
need other end conditions on
s(x)
in
order
to
complete the system of equations (3.7.19). This
is
accomplished by requiring
s<
3
>(x) to be continuous at x
1
and
xn-t·
This
is
equivalent to requiring that
s(x)
be a cubic spline function with knots { x
0
,
x
2
,
x
3
,
..•
, xn_
2
,
~n
}, while still
requiring interpolation at
all
node points in
{x
0
,x
1
,x
2
,
...
,xn-l•xn}·
This
reduces system
(3.7.19)
ton-
3 equations, and the interpolation at x
1
and xn_
1
introduces two new equations
(we
leave their derivation
to
Problem
34).
Again
we
obtain a tridiagonal linear system
AM=
D, although the matrix A does not
possess some of the nice properties of that in
(3.7.22). The resulting spline
function will be denoted here by
snk(x), with the subscript indicating the
"not-a-knot" condition. A convergence analysis can be given for snk(x), similar
to that given
in
Theorem 3.4. For a discussion of this, see de Boor (1978,
p.
211),
(1985).
There are other ways of introducing endpoint conditions when
f'(a)
and
f'(
b)
are unknown. A discussion of some of these can be found in de Boor (1978,
p. 56). However, the preceding scheme
is
the simplest to apply, and it
is
widely
used. In special cases, there are simpler endpoint conditions that can be used
than those discussed here, and
we
take
up
one of these in Problem 38. In general,
however, the preceding type of endpoint conditions are needed in order to
preserve the rates of convergence given
in
Theorem 3.4.
Numerical examples Let
f(x)
=
tan-
1
x, 0
~
x
~
5.
Table 3.11
gives
the er-
rors
E;
= Max
IJU>(
x)
-
L~;>(
x
)I
0:Sx:S5
i = 0,
1,2,3
(3.7.28)
where
Ln(x)
is the Lagrange piecewise cubic function interpolating
f(x)
on the
nodes
xj
=a+
jh,
j =
0,
1,
...
, n, h =
(b-
a)jn.
The columns labeled Ratio
Table 3.11
Lagrange piecewise cubic interpolation:
Ln(x)
n
Eo
Ratio
Et
Ratio
£2
Ratio
E3
Ratio
2
1.20E-
2
1.22E-
1
7.81E-
1
2.32
3.3
2.1
1.5
1.2
4
3.62E-
3
5.83E-
2
5.24E-
1
1.95
11.4
6.1
3.2
1.6
8
3.18E-
4
9.57E-
3
1.64E-
1
1.19
16.9
8.1
3.9
1.7
16
1.88E-
5
l.llE-
3
4.21E-
2
.682
14.5
7.3
3.7
1.9
32
1.30E-
6
1.61E-
4
1.14E-
2
.359
/
I