Вы находитесь на странице: 1из 3

HOMEWORK FOR ADVANCED NUMERICAL COMPUTING - CS 543

Michael J. Johnson

Spring 2008

Abstract. These are the homework assignments for Advanced Numerical Computing –
CS 543 taught at Kuwait University Spring Semester 2008.

Typeset by AMS-TEX
1
2 CS 543

1. Homework

Problem 1.1. Let Ξ1 = {0, 1, 5}, Ξ2 = {0, 1, 2, 5}, and Ξ3 = {0, 1, 3, 5}.
a) Is P3,Ξ1 a subspace of P6,Ξ1 ?
b) Is P3,Ξ1 a subspace of P3,Ξ2 ?
c) Is P3,Ξ2 a subspace of P3,Ξ3 ?

Problem 1.2. Let Ξ1 = {0, 1, 2, 3, 5} and Ξ2 = {0, 1, 2, 3, 4, 5}, and consider


 4
 4x − 5x2 + 1 if 0 ≤ x < 1

 (x − 1)3 + (x − 1)

if 1 ≤ x < 2
s(x) :=

 2 if 2 ≤ x < 3

(x − 3) + 2 if 3 ≤ x ≤ 5.

a) Find the Matlab/Octave representation of s as an element of P4,Ξ1 .


b) Find the Matlab/Octave representation of s as an element of P5,Ξ1 .
c) Find the Matlab/Octave representation of s as an element of P4,Ξ2 .
d) Does s belong to C[a, b]?
e) Does s belong to C 1 [a, b]?
P∞
Problem 1.3. Let k ∈ N and define f (x) = j=−∞ cj Bjk (x). Determine the largest value
of j0 and the smallest value of j1 such that

j1
X
f (x) = cj Bjk (x) for all x ∈ [ξ1 , ξ2 ].
j=j0

Problem 1.4. Let Ξ be the knots a = ξ1 < ξ2 < · · · < ξN +1 = b and let k ∈ N0 . Prove
that Sk,Ξ ∩ Sk+1,Ξ = Πk | .
[a,b]

Problem 1.5. Let k ∈ N and assume that the P knots {. . . , ξ−1 , ξ0 , ξ1 , . . . } are equispaced

(ie. ξi+1 − ξi = h for all i). Prove that f (x) = j=−∞ ξj Bjk (x) is a polynomial of degree
1.
CS 543 3

2. Homework

The questions here may involve both written and Octave work. Let me suggest the
following format for your answers:
Give me your written work (on paper) along with a diskette or an archive (via email).
The diskette or archive should contain Octave scripts (*.m files). For each question, your
written answer should mention which Octave script file I’m supposed to see from your
diskette or archive. You may find the Octave commands disp, keyboard, input useful
in Octave scripts.
Problem 2.1. Let Ξ = {0, 1, 2, 4}. Find the unique spline s ∈ S1,Ξ which satisfies s(0) =
3, s(1) = 0, s(2) = 1, and s(4) = −1.
Problem 2.2. Let Ξ = {0, 1, 3, 6, 10} and k = 3.
a) Choose Ξext in an appropriate manner.
b) Using Octave, construct the pp representation of

f (x) = B13 (x) + B23 (x) + B33 (x) + B43 (x)

and plot f on the interval [0, 10].

Problem 2.3. Let Ξ = {−2, 1, 2, 5, 6}. Use Octave to verify the identity
   
d k k k
B (x) = Bik−1 (x) − k−1
Bi+1 (x)
dx i ξi+k − ξi ξi+k+1 − ξi+1

for i = 1, k = 3. (Suggestion: Construct the LHS and the RHS, and then plot both on the
same plot).
Problem 2.4. Let Ξ = {3, 4, 7, 8, 10, 13}. Use Octave to verify the identity
   
x − ξi ξi+k+1 − x
Bik (x) = Bik−1 (x) + k−1
Bi+1 (x)
ξi+k − ξi ξi+k+1 − ξi+1

for i = 1, k = 4.
Problem 2.5. Use Octave to construct and plot the natural quintic (degree 5) spline
which passes thru the points (1, 1), (2, 5), and (5, 5).
Problem 2.6. Use Octave to construct and plot the complete quintic spline s which passes
thru the points (0, 0), (2, 3), and (3, 1) and satisfies s0 (0) = 1, s00 (0) = −1, s0 (3) = 0,
s00 (3) = −2.

Вам также может понравиться