Lecture Notes 1 5
Lecture Notes 1 5
Michael J. Johnson
Spring 2008
1. Notation
2. Piecewise Polynomials
s| ∈ Πk | for i = 1, 2, . . . , N,
[ξi ,ξi+1 ) [ξi ,ξi+1 )
where the above is taken with the closed interval [ξN , ξN +1 ] when i = N . Note that
we have adopted the somewhat arbitrary convention that piecewise polynomials (pp) are
continuous from the right.
Typeset by AMS-TEX
1
2 ADVANCED NUMERICAL COMPUTING
Is s continuous?
Theorem 2.2. The dimension of Pk,Ξ is N (k + 1).
Knot insertion
If two pp’s have identical knots, then adding them or multiplying them is fairly straight-
forward; however, if they have different knots, then one must first insert knots, as needed,
until both pp’s have been rendered with identical knots.
CS-543 3
Example (knot insertion). Let s be as in the previous example and let Ξ1 = {0, 1, 2, 3, 4}.
Note that Ξ1 has been obtained from Ξ by inserting the knot 2. Find the representation
of s with respect to the knot sequence Ξ1 (ie. as an element of P3,Ξ1 ).
In the above example, we see that the computation required is that of expanding s 2 (x+1)
in powers of x, when s2 (x) = 2x2 + x. This yields s2 (x + 1) = 2x2 + 5x + 3. In general,
the work involved in a knot insertion is simply that of finding, for a given polynomial
p(x) = p1 xk + · · · + pk x + pk+1 , the coefficients q1 , . . . , qk+1 such that the polynomial
q(x) = q1 xk + · · · + qk x + qk+1 satisfies q(x) = p(x + τ ). In other words, we have to
translate the polynomial p by a distance −τ . One can easily write an algorithm for this
based on the binomial formula, however the number of flops needed for execution is about
2k 2 . A better algorithm, which uses only k 2 + 1 flops, is the following (assuming that p is
the Octave representation of the polynomial p(x) above):
q=p
s=tau*p(1)
for i=k+1:-1:2
q(2)=q(2)+s
for j=3:i
q(j)=q(j)+tau*q(j-1)
end
end
It is easy repeat the above example using this efficient algorithm and verify that the
same result is obtained.
The space Pk,Ξ contains functions with various smoothness properties (assuming N ≥
2). The following definition allows us to give a rather precise categorization of the smooth
functions contained in Pk,Ξ .
Definition 3.1. The space of continuous functions on [a, b] is denoted C[a, b] (or C 0 [a, b]).
For a positive integer k, we define C k [a, b] to be the space of functions f : [a, b] → R for
which f, f 0 , . . . , f (k) are continuous on [a, b].
Theorem 3.2. For ` = 0, 1, . . . , k, the dimension of Pk,Ξ ∩ C ` [a, b] equals N (k − `) + ` + 1.
Moreover, Pk,Ξ ∩ C k [a, b] equals Πk | .
[a,b]
Of particular interest is the subspace Pk,Ξ ∩ C k−1 [a, b] which has dimension N + k.
Definition 3.3. The subspace Pk,Ξ ∩C k−1 [a, b], denoted Sk,Ξ , is called the space of splines
of degree k having knot sequence Ξ.
Example 3.4. Determine whether s belongs to S2,Ξ if Ξ = {0, 1, 2, 4} and
2
x −2
if 0 ≤ x < 1
s(x) = 2(x − 1)2 + 2(x − 1) − 1 if 1 ≤ x < 2
−(x − 2)2 + 6(x − 1) + 3 if 2 ≤ x ≤ 4.
4 ADVANCED NUMERICAL COMPUTING
∞
X
Bik (x) = 1 for all x ∈ R.
i=−∞
(iv) Bik is (k − 1)-times continuously differentiable (ie. Bik ∈ C k−1 (−∞, ∞)).
Z x ∞
k ξi+k+1 − ξi X k+1
(v) Bi (t) dt = Bj (x).
−∞ k+1 j=i
∞
X
Corollary 3.9. Let f (x) = ci Bik (x).
i=−∞
(i) If k > 1, then
X∞
d ci − ci−1
f (x) = k Bik−1 (x).
dx i=−∞
ξ i+k − ξ i
Xi
1
where di = cj (ξj+k+1 − ξj ).
k + 1 j=−∞
As mentioned above, the knots in Ξ are denoted a = ξ1 < ξ2 < · · · < ξN +1 = b, and
we assume that we have chosen additional knots ξi for i < 1 and i > N + 1, maintaining
ξi < ξi+1 for all i ∈ Z.
Theorem 3.10. A basis for the space Sk,Ξ is formed by the functions
Bik | for i = 1 − k, 2 − k, . . . , N.
[a,b]
Note that the number of functions in the basis above is N + k, which of course is also
the dimension of Sk,Ξ . We also note that the B-splines Bik , for i = 1 − k, 2 − k, . . . , N , are
precisely those B-splines whose support has some overlap with the interval (a, b).
A consequence of Theorem 3.10 is that every function s ∈ Sk,Ξ can be written in the
form
XN
s(x) = cj Bjk (x), x ∈ [a, b],
j=1−k
for some scalars (numbers) {cj }. This form is known as the bb-form of s, where bb is meant
to connotate the phrase B-spline basis. Since the B-splines in use are determined by the
knots {ξ1−k , ξ2−k , . . . , ξN +k+1 }, the bb-form of s is determined simply by these knots along
with the coefficients {cj }, j = 1 − k, 2 − k, . . . , N . As illustrated by the following example,
given the bb-form of s one can use Corollary 3.9 to obtain the bb-form of the derivative
of s or of an anti-derivative of s.
Example. Let ξi = i for all i, and define
2
s(x) := 2B−1 (x) − B02 (x) + 3B12 (x) + B22 (x) − 3B32 (x) − B52 (x) + B62 (x).
Rx
Find the bb-forms for the derivative s0 (x) and the antiderivative se(x) = −1
s(t) dt.