[10]
h
s
= x
2s
− x
1s
= x
3s
− x
2s
= 1
We also define a scaling factor k such that
[11]
k =
h
s
h
=
1
h
Since we have scaled (transformed) the x- and y-data, we must also scale the derivatives used in [6]
and [7]. It turns out that we can easily transform the derivatives as
[12]
f
1s
∏
x
1s
=
1
k
$
f
1
∏
x
1
[13]
f
2s
∏
x
3s
=
1
k
$ f
2
∏
x
3
These relations are derived in a section at the end of this tip. We can write [3] to [7] as a matrix
equation
[14]
M $ c = v
where c is the coefficient vector we need, and
M =
x
1s
4
x
1s
3
x
1s
2
x
1s
1
x
2s
4
x
2s
3
x
2s
2
x
2s
1
x
3s
4
x
3s
3
x
3s
2
x
3s
1
4 $ x
1s
3
3 $ x
2s
2
2 $ x
1s
10
4
$
x
3s
3
3
$
x
3s
2
2
$
x
3s
10
c =
a
b
c
d
e
v =
y
1
y
2
y
3
y
1s
∏
y
3s
∏
We solve [14] for c as [15]
c = M
−1
$ v
x
1s
, x
2s
and x
3s
are always -1, 0 and 1, so M
-1
is a constant matrix:
[16]
M
−1
=
−0.5 1 −.5 −0.25 0.25
0.25 0 −0.25 0.25 0.25
1 −2 1 0.25 −0.25
−0.75 0 0.75 −0.25 −0.25
01000
Since the scaled matrix inverse is independent of the functions and the splice points, we need not
calculate it each time we find a splice: it is pre-computed and appears as a constant in the program.
Because of the scaling we chose, the inverse matrix elements are simple and exact as shown. This
means no round-off error can result from matrix inverse, which would happen with un-scaled x-values.
The c vector in [15] is the scaled coefficients; but we want the un-scaled result y = s(x). This is found
with equation [9] where
[17]
x
s
=
x−x
2
h
so s(x) can be calculated with the TI-89/92+ polyEval() function:
6 - 96