Chapter 3 Interpolation and Polynomial Approximation
Chapter 3 Interpolation and Polynomial Approximation
Chapter 3 Interpolation and Polynomial Approximation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Chapter</strong> 3<br />
<strong>Interpolation</strong> <strong>and</strong> <strong>Polynomial</strong><br />
<strong>Approximation</strong><br />
Let x 0 , x 1 ,..., x n be distinct real <strong>and</strong> y 0 , y 1 ,..., y n be associated function values. We will<br />
find a polynomial p(x) that interpolates the given data:<br />
p(x i ) = y i ,<br />
i = 0, 1,...,n.<br />
3.1 <strong>Interpolation</strong> <strong>and</strong> Lagrange <strong>Polynomial</strong><br />
Theorem 3.1 Given n + 1 distinct points x 0 , x 1 ,..., x n <strong>and</strong> n + 1 ordinates y 0 , y 1 ,...,<br />
y n , there is a polynomial p(x) of degree ≤ n that interpolates y i at x i , i = 0, 1,...,n. This<br />
polynomial p(x) is unique among the set of all polynomials of degree at most n.<br />
proof : (1) Existence: Denote the Lagrange interpolation polynomial<br />
( )<br />
n∑<br />
n∏ x − xi<br />
p(x) = y j l j (x), l j (x) =<br />
.<br />
x j − x i<br />
j=0<br />
i=0,i≠j<br />
The polynomial p(x) with degree ≤ n satisfies p(x i ) = y i , i = 0, 1,...,n, since l j (x i ) = 0<br />
if i ≠ j <strong>and</strong> l j (x i ) = 1 if i = j.<br />
(2) Uniqueness: Suppose q(x) is another polynomial of degree ≤ n satisfying<br />
q(x i ) = y i ,<br />
i = 0, 1,...,n.<br />
Define r(x) = p(x) − q(x), then degree r(x) ≤ n <strong>and</strong><br />
r(x i ) = p(x i ) − q(x i ) = 0,<br />
i = 0, 1,...,n.<br />
1
Since r(x) has n + 1 zeros, we must have r(x) ≡ 0. Thus p(x) = q(x). This completes<br />
the proof of theorem.<br />
Theorem 3.2 Let x 0 , x 1 ,..., x n be distinct number in [a,b] <strong>and</strong> f(x) ∈ C n+1 [a,b]. Then<br />
there exists x ∈ [a,b] <strong>and</strong> ξ(x) ∈ (a,b) with<br />
f(x) −<br />
n∑<br />
j=0<br />
f(x j )l j (x) = (x − x 0)...(x − x n )<br />
f (n+1) (ξ(x)).<br />
(n + 1)!<br />
proof : Assume x does not equal any node point. Since if x is any node point it is<br />
trivially true. Define<br />
n∑<br />
E(x) = f(x) − p n (x), p n (x) = f(x j )l j (x)<br />
j=0<br />
G(t) = E(t) − Φ(t)<br />
Φ(x) E(x), Φ(x) = (x − x 0)....(x − x n )<br />
The function G(t) ∈ C n+1 [a,b]. Also<br />
G(x i ) = E(x i ) − Φ(x i)<br />
E(x) = 0,<br />
Φ(x)<br />
G(x) = E(x) − E(x) = 0<br />
i = 0, 1,...,n<br />
Thus G has n + 2 distinct zeros in [a,b]. Using the mean value theorem, G (j) (t) has<br />
n + 2 − j zeros, for j = 0, 1,...,n + 1. Let ξ be a zero of G (n+1) (t).<br />
G (n+1) (t) = f (n+1) (t) −<br />
(n + 1)!<br />
Φ(x) E(x)<br />
G (n+1) (ξ) = f (n+1) (ξ) −<br />
(n + 1)!<br />
Φ(x) E(x) = 0<br />
E(x) =<br />
This completes the proof of theorem.<br />
Φ(x)<br />
(n + 1)! f(n+1) (ξ)<br />
2
3.2 Divided Difference<br />
Newton’s divided difference formula for the interpolation polynomial:<br />
p 0 (x) = f(x 0 )<br />
p j (x) = p j−1 (x) + (x − x 0 )...(x − x j−1 )f[x 0 ,x 1 ,...,x j ], j = 1, 2,...,n<br />
The coefficient a n = f[x 0 ,x 1 ,...,x n ] is called the n-th-order Newton divided difference of<br />
f(x). Define<br />
f[x 0 ,x 1 ,...,x n ] = f[x 1,...,x n ] − f[x 0 ,x 1 ,...,x n−1 ]<br />
x n − x 0<br />
Lemma 3.1 The n-th-order Newton divided difference have the following theory.<br />
1. Let Φ n (x) = (x − x 0 )...(x − x n ). Then the coefficient a n can be formed as:<br />
f[x 0 ,x 1 ,...,x n ] =<br />
2. For any permutation (i 0 ,...,i n ) of (0, 1,...,n)<br />
n∑<br />
j=0<br />
f(x j )<br />
Φ ′ n(x j )<br />
f[x 0 ,x 1 ,...,x n ] = f[x i0 ,x i1 ,...,x in ]<br />
3. Let f(x) be enough smooth.<br />
f[x 0 ,x 1 ,...,x m ] = f(m) (ξ)<br />
, ξ ∈ ϑ{x 0 ,...,x m } (3.2.1)<br />
m!<br />
Moreover, if x 0 = x 1 = ... = x n then f[x 0 ,x 1 ,...,x n ] = f (n) (x 0 )/n!.<br />
4. Suppose f(x) be enough smooth.<br />
proof :<br />
d<br />
dx f[x 0,x 1 ,...,x n ,x] = f[x 0 ,x 1 ,...,x n ,x,x]<br />
p n (x) = p n−1 (x) + (x − x 0 )...(x − x n−1 )f[x 0 ,x 1 ,...,x n ]<br />
If x is not a node point, we have Lagrange interpolation polynomial<br />
p n (x) =<br />
n∑<br />
j=0<br />
Φ n (x)<br />
(x − x j )Φ ′ n(x j ) · f(x j) (3.2.2)<br />
3
By looking at each n-th-degree term in (3.2.2), we obtain<br />
This completes the proof of (1).<br />
f[x 0 ,x 1 ,...,x n ] =<br />
n∑<br />
j=0<br />
f(x j )<br />
Φ ′ n(x j )<br />
n∑<br />
j=0<br />
f(x j )<br />
n<br />
Φ ′ n(x j ) = ∑ f(x ij )<br />
Φ ′ n(x ij )<br />
Then f[x 0 ,x 1 ,...,x n ] = f[x i0 ,x i1 ,...,x in ]. This completes the proof of (2).<br />
j=0<br />
p n+1 (x) = p n (x) + (x − x 0 )...(x − x n )f[x 0 ,...,x n ,t], p n+1 (t) = f(t)<br />
By Theorem 3.2 we have<br />
Let t = x n+1 , n = m − 1 then<br />
This completes the proof of (3).<br />
f(t) − p n (t) = (t − x 0 )...(t − x n )f[x 0 ,...,x n ,t]<br />
f[x 0 ,...,x n ,t] = f(n+1) (ξ)<br />
(n + 1)!<br />
f[x 0 ,...,x m ] = f(m) (ξ)<br />
m!<br />
d<br />
dx f[x f[x 0 ,x 1 ,...,x n ,x + h] − f[x 0 ,x 1 ,...,x n ,x]<br />
0,x 1 ,...,x n ,x] = lim<br />
h→0 h<br />
f[x 0 ,x 1 ,...,x n ,x + h] − f[x,x 0 ,x 1 ,...,x n ]<br />
= lim<br />
h→0 (x + h) − x<br />
= f[x,x 0 ,x 1 ,...,x n ,x] = f[x 0 ,x 1 ,...,x n ,x,x]<br />
This completes the proof of (4).<br />
= lim<br />
h→0<br />
f[x,x 0 ,x 1 ,...,x n ,x + h]<br />
Theorem 3.3 (Hermite-Gennochi) Let x 0 , x 1 ,..., x n be distinct <strong>and</strong> f(x) ∈ C n on<br />
ϑ{x 0 ,...,x n }. Then<br />
∫ ∫<br />
f[x 0 ,...,x n ] = ... f (n) (t 0 x 0 + ... + t n x n )dt 1 ...dt n<br />
τ n<br />
4
where<br />
τ n =<br />
{<br />
(t 1 ,...,t n )| ∀ t i ≥ 0,<br />
}<br />
n∑<br />
n∑<br />
t i ≤ 1 , t 0 = 1 − t i .<br />
i=1<br />
i=1<br />
proof : We show that it is true for n = 1 <strong>and</strong> n = 2.<br />
(1) n = 1. Then τ 1 = [0, 1] <strong>and</strong> t 0 = 1 − t 1<br />
=<br />
∫ 1<br />
0<br />
f ′ (t 0 x 0 + t 1 x 1 )dt 1 =<br />
∫ 1<br />
1<br />
f(x 0 + t 1 (x 1 − x 0 ))<br />
∣<br />
x 1 − x 0<br />
0<br />
f ′ (x 0 + t 1 (x 1 − x 0 ))dt 1<br />
t 1 =1<br />
t 1 =0<br />
= f(x 1) − f(x 0 )<br />
x 1 − x 0<br />
= f[x 0 ,x 1 ]<br />
(2) n=2. Then τ 2 is the triangle with vertices (0, 0), (0, 1) <strong>and</strong> (1, 0).<br />
=<br />
=<br />
=<br />
=<br />
∫ ∫<br />
τ 2<br />
f ′′ (t 0 x 0 + t 1 x 1 + t 2 x 2 )dt 1 dt 2<br />
∫ 1 ∫ 1−t1<br />
0<br />
∫ 1<br />
0<br />
f ′′ (x 0 + t 1 (x 1 − x 0 ) + t 2 (x 2 − x 0 ))dt 2 dt 1<br />
0<br />
1<br />
[f ′ t 2 =1−t 1<br />
(x 0 + t 1 (x 1 − x 0 ) + t 2 (x 2 − x 0 ))]<br />
∣ dt 1<br />
x 2 − x 0 t 2 =0<br />
∫<br />
1<br />
1<br />
]<br />
f ′ (x 2 + t 1 (x 1 − x 2 ))dt 1 − f ′ (x 0 + t 1 (x 1 − x 0 ))dt 1<br />
[∫ 1<br />
x 2 − x 0 0<br />
1<br />
x 2 − x 0<br />
{f[x 1 ,x 2 ] − f[x 1 ,x 0 ]} = f[x 0 ,x 1 ,x 2 ]<br />
This completes the proof of theorem.<br />
• Forward difference <strong>and</strong> backward difference<br />
Let the note points x i = x 0 +ih, i=0,1,2,3,.... Then define the forward difference operator<br />
△:<br />
△f(x i ) = f(x i+1 ) − f(x i )<br />
0<br />
△ r+1 f(z) = △ r f(z + h) − △ r f(z),<br />
△ 0 f(z) = f(z).<br />
The term △ r f(z) is the rth-order forward difference of f at z.<br />
Lemma 3.2<br />
f[x 0 ,x 1 ,...,x k ] = 1<br />
k!h k △k f 0 , k ≥ 0.<br />
5
proof : For k = 0, it is trivially true. For k = 1,<br />
f[x 0 ,x 1 ] = f(x 1) − f(x 0 )<br />
x 1 − x 0<br />
= 1 h △ f 0.<br />
Assume the result is true for all k ≤ r. Then for k = r + 1<br />
f[x 0 ,x 1 ,...,x r+1 ] = f[x 1,...,x r+1 ] − f[x 0 ,x 1 ,...,x r ]<br />
x r+1 − x 0<br />
[<br />
1 1<br />
=<br />
(r + 1)h r!h r △r f 1 − 1 ]<br />
r!h r △r f 0<br />
1<br />
=<br />
(r + 1)!h r+1 △r+1 f 0<br />
This completes the proof of lemma.<br />
Lemma 3.3<br />
△ r f(x i ) = h r f (r) (ξ i ), x i ≤ ξ i ≤ x i+r .<br />
proof : By (3.2.1) <strong>and</strong> Lemma 3.2 we obtain<br />
△ r f(x i ) = r!h r f[x i ,x i+1 ,...,x i+r ] = r!h rf(r) (ξ i )<br />
r!<br />
This completes the proof of lemma.<br />
= h r f (r) (ξ i ).<br />
From Lemma 3.2 we have the Newton forward difference form of the interpolating polynomial<br />
n∑<br />
p n (x) = f 0 + (x − x 0 )...(x − x k−1 )f[x 0 ,...,x k ]<br />
k=1<br />
n∑<br />
= f 0 + (x − x 0 )...(x − x k−1 ) 1<br />
k=1<br />
k!h k △k f 0<br />
( )<br />
n∑ µ<br />
=<br />
△ k f<br />
k 0 , µ = x − x 0<br />
.<br />
k=0<br />
h<br />
Define the binomial coefficients,<br />
( )<br />
µ µ(µ − 1)...(µ − k + 1)<br />
= , k > 0,<br />
k<br />
k!<br />
Define the backward difference by<br />
▽f(z) = f(z) − f(z − h)<br />
(<br />
µ<br />
0<br />
)<br />
= 1.<br />
▽ r+1 f(z) = ▽ r f(z) − ▽ r f(z − h), r ≥ 1.<br />
6
And we obtain the Newton backward difference form of the interpolating polynomial<br />
with the notes x 0 , x −1 , ..., x −n , <strong>and</strong> x −j = x 0 − jh<br />
p n (x) =<br />
( )<br />
n∑ µ<br />
j<br />
j=0<br />
▽ j f 0 , µ = x − x 0<br />
.<br />
h<br />
3.3 Hermite <strong>Interpolation</strong><br />
The Hermite interpolation polynomial p(x) of f(x) with the distinct notes x 1 , x 2 ,..., x n<br />
satisfies<br />
p(x i ) = f(x i ) = y i , p ′ (x i ) = f ′ (x i ) = y ′ i, i = 1, 2,...,n.<br />
Then the polynomial p(x) is existence <strong>and</strong> uniqueness with degree ≤ 2n − 1.<br />
• The Newton divided difference form<br />
p 2n−1 (x) = f(x 1 ) + (x − x 1 )f[x 1 ,x 1 ] + (x − x 1 ) 2 f[x 1 ,x 1 ,x 2 ] + ...<br />
+ (x − x 1 ) 2 (x − x 2 ) 2 ...(x − x n )f[x 1 ,x 1 ,...,x n ,x n ]<br />
• Example<br />
f(x) − p 2n−1 (x) = (x − x 1 ) 2 (x − x 2 ) 2 ...(x − x n ) 2 f[x 1 ,x 1 ,...,x n ,x n ,x]<br />
1. Find p ∈ P 3 such that p(x 0 ) = f 0 , p ′ (x 0 ) = f ′ 0, p ′′ (x 0 ) = f ′′<br />
0 , p ′′′ (x 0 ) = f ′′′<br />
0 .<br />
x f<br />
x 0 f 0<br />
x 0 f 0 f 0<br />
′<br />
x 0 f 0 f 0<br />
′<br />
x 0 f 0 f 0<br />
′<br />
1<br />
f ′′<br />
2 0<br />
1<br />
f ′′<br />
2 0<br />
1<br />
f ′′′<br />
6 0<br />
Then the diagonal entries are the coefficients of the power series:<br />
p(x) = f 0 + f ′ 0(x − x 0 ) + 1 2 f ′′<br />
0 (x − x 0 ) 2 + 1 6 f ′′′<br />
0 (x − x 0 ) 3<br />
which is the Taylor polynomial of degree 3.<br />
2. Find p ∈ P 3 such that p(x 0 ) = f 0 , p(x 1 ) = f 1 , p ′ (x 1 ) = f ′ 1, p(x 2 ) = f 2 .<br />
7
x f<br />
x 0 f 0<br />
x 1 f 1 f[x 0 ,x 1 ]<br />
x 1 f 1 f 1 ′ f[x 0 ,x 1 ,x 1 ]<br />
x 2 f 2 f[x 1 ,x 2 ] f[x 1 ,x 1 ,x 2 ] f[x 0 ,x 1 ,x 1 ,x 2 ]<br />
If denote the diagonal entries as before by a 0 , a 1 , a 2 , a 3 , Newton’s formula takes<br />
the form:<br />
p(x) = a 0 + a 1 (x − x 0 ) + a 2 (x − x 0 )(x − x 1 ) + a 3 (x − x 0 )(x − x 1 ) 2<br />
Then the error formula becomes<br />
f(x) − p(x) = (x − x 0 )(x − x 1 ) 2 (x − x 2 )f[x 0 ,x 1 ,x 1 ,x 2 ,x]<br />
= (x − x 0 )(x − x 1 ) 2 (x − x 2 ) f(4) (ξ)<br />
, ξ ∈ [x 0 ,x 2 ]<br />
4!<br />
8
3.4 Cubic spline <strong>Interpolation</strong><br />
Consider a function f defined on [a,b] <strong>and</strong> a = x 0 < x 1 < ... < x n = b, we say S(x) is a<br />
cubic spline interpolant if it satisfies the following conditions:<br />
(1) S(x) is a cubic polynomial denoted S j (x) on [x j ,x j+1 ], j = 0, 1,...,n − 1.<br />
(2) S(x j ) = f(x j ), j = 0, 1,...,n.<br />
(3) S j+1 (x j+1 ) = S j (x j+1 ), j = 0, 1,...,n − 2.<br />
(4) S ′ j+1(x j+1 ) = S ′ j(x j+1 ), j = 0, 1,...,n − 2.<br />
(5) S ′′<br />
j+1(x j+1 ) = S ′′<br />
j (x j+1 ), j = 0, 1,...,n − 2.<br />
(6) One of the following boundary conditions is satisfied<br />
(i) Natural boundary conditions: S ′′ (x 0 ) = S ′′ (x n ) = 0.<br />
(ii) Clamped boundary conditions: S ′ (x 0 ) = f ′ (x 0 ) <strong>and</strong> S ′ (x n ) = f ′ (x n ).<br />
Note: The cubic spline interpolation S(x) has 4n undetermined coefficients <strong>and</strong> satisfies<br />
(n+1)+3(n−1) = 4n−2 condition equations then it must add two boundary conditions,<br />
natural boundary conditions or clamped boundary conditions.<br />
To construct the cubic spline interpolant for a given function f(x) satisfying the<br />
conditions (1)−(6). First, let x ∈ [x j ,x j+1 ], x j+1 − x j = h j <strong>and</strong><br />
S j (x) = a j + b j (x − x j ) + c j (x − x j ) 2 + d j (x − x j ) 3 , j = 0, 1,...,n − 1.<br />
From the condition (2), we obtain<br />
a j = f(x j ), j = 0, 1,...,n − 1.<br />
Defined a n = f(x n ). From the condition (3), we obtain the equations<br />
a j+1 = a j + b j h j + c j h 2 j + d j h 3 j, j = 0, 1,...,n − 1. (3.4.1)<br />
Defined b n = S ′ (x n ) <strong>and</strong> observed that S ′ j(x) = b j + 2c j (x − x j ) + 3d j (x − x j ) 2 . From the<br />
condition (4), we obtain the equations<br />
b j+1 = b j + 2c j h j + 3d j h 2 j, j = 0, 1,...,n − 1. (3.4.2)<br />
Defined c n = S ′′ (x n )/2 <strong>and</strong> observed that S ′′<br />
j (x) = 2c j + 6d j (x − x j ). From the condition<br />
(5), we obtain the equations<br />
c j+1 = c j + 3d j h j , j = 0, 1,...,n − 1.<br />
9
Then<br />
d j = 1<br />
3h j<br />
(c j+1 − c j ), j = 0, 1,...,n − 1. (3.4.3)<br />
Substituting the value, d j , into (3.4.1) <strong>and</strong> (3.4.2) gives the new equations<br />
a j+1 = a j + b j h j + h2 j<br />
3 (2c j + c j+1 ), j = 0, 1,...,n − 1, (3.4.4)<br />
From the equation (3.4.4), we obtain<br />
b j+1 = b j + h j (c j + c j+1 ), j = 0, 1,...,n − 1. (3.4.5)<br />
b j = 1 h j<br />
(a j+1 − a j ) − h j<br />
3 (2c j + c j+1 ), j = 0, 1,...,n − 1. (3.4.6)<br />
Substituting these values into the equation (3.4.5), when the index is reduced by 1, gives<br />
the linear system of equations<br />
⇒<br />
b j = b j−1 + h j−1 (c j−1 + c j )<br />
1 (a j+1 − a j ) − h j<br />
h j 3 (2c j + c j+1 )<br />
= 1<br />
h j−1<br />
(a j − a j−1 ) − h j−1<br />
3 (2c j−1 + c j ) + h j−1 (c j−1 + c j )<br />
⇒ h j−1 c j−1 + 2(h j−1 + h j )c j + h j c j+1 = 3 h j<br />
(a j+1 − a j ) − 3<br />
h j−1<br />
(a j − a j−1 ) (3.4.7)<br />
for each j = 1,...,n − 1. The system (3.4.7) involves, as unknowns, only {c j } n j=0. Note<br />
that once the values of {c j } n j=0 are known, it is a simple matter to find the remainder<br />
values {b j } n−1<br />
j=0 from Eq. (3.4.6) <strong>and</strong> {d j } n−1<br />
j=0 from Eq. (3.4.3) <strong>and</strong> to construct the cubic<br />
polynomials {S j } n−1<br />
j=0.<br />
• Natural spline interpolant: S ′′ (x 0 ) = S ′′ (x n ) = 0.<br />
The boundary conditions imply that c n = S ′′ (x n )/2 = 0 <strong>and</strong><br />
0 = S ′′ (x 0 ) = 2c 0 + 6d 0 (x 0 − x 0 ) ⇒ c 0 = 0.<br />
10
The two equations c 0 = 0 <strong>and</strong> c n = 0 together with the equations in (3.4.7) produce a<br />
linear system described by AX = b, where A is the (n + 1) × (n + 1) matrix<br />
⎡<br />
A =<br />
⎢<br />
⎣<br />
1 0 0 · · · ... · · · · · · 0<br />
h 0 2(h 0 + h 1 ) h 1 0 · · · · · · · · · 0<br />
0 h 1 2(h 1 + h 2 ) h 2 0 · · · · · · 0<br />
.<br />
...<br />
...<br />
0 · · · · · · 0 h n−3 2(h n−3 + h n−2 ) h n−2 0<br />
0 · · · · · · · · · 0 h n−2 2(h n−2 + h n−1 ) h n−1<br />
0 · · · · · · · · · · · · 0 0 1<br />
...<br />
.<br />
⎤<br />
⎥<br />
⎦<br />
⎡<br />
b =<br />
⎢<br />
⎣<br />
0<br />
3<br />
h 1<br />
(a 2 − a 1 ) − 3 h 0<br />
(a 1 − a 0 )<br />
.<br />
3<br />
h n−1<br />
(a n − a n−1 ) − 3<br />
h n−2<br />
(a n−1 − a n−2 )<br />
0<br />
⎤<br />
⎥<br />
⎦<br />
⎡<br />
X =<br />
⎢<br />
⎣<br />
c 0<br />
c 1<br />
.<br />
c n−1<br />
c n<br />
⎤<br />
⎥<br />
⎦<br />
• Clamped spline interpolant: S ′ (x 0 ) = f ′ (x 0 ), S ′ (x n ) = f ′ (x n ).<br />
From the two boundary conditions, we obtain the following two equations:<br />
f ′ (x 0 ) = S ′ (x 0 ) = b 0 = 1 h 0<br />
(a 1 − a 0 ) − h 0<br />
3 (2c 0 + c 1 )<br />
⇒ 2h 0 c 0 + h 0 c 1 = 3 h 0<br />
(a 1 − a 0 ) − 3f ′ (a) (3.4.8)<br />
f ′ (x n ) = S ′ (x n ) = b n = b n−1 + h n−1 (c n−1 + c n )<br />
= 1 (a n − a n−1 ) − h n−1<br />
h n−1 3 (2c n−1 + c n ) + h n−1 (c n−1 + c n )<br />
= a n − a n−1<br />
h n−1<br />
+ h n−1<br />
3 (c n−1 + 2c n )<br />
⇒ h n−1 c n−1 + 2h n−1 c n = 3f ′ (b) − 3<br />
h n−1<br />
(a n − a n−1 ) (3.4.9)<br />
11
Equations (3.4.7), together with the equations (3.4.8) <strong>and</strong> (3.4.9) determine the linear<br />
system described by AX = b, where A is the (n + 1) × (n + 1) matrix<br />
⎡<br />
A =<br />
⎢<br />
⎣<br />
⎤<br />
2h 0 h 0 0 · · · · · · · · · · · · 0<br />
h 0 2(h 0 + h 1 ) h 1 0 · · · · · · · · · 0<br />
0 h 1 2(h 1 + h 2 ) h 2 0 · · · · · · 0<br />
.<br />
...<br />
...<br />
...<br />
.<br />
0 · · · · · · 0 h n−3 2(h n−3 + h n−2 ) h n−2 0<br />
⎥<br />
0 · · · · · · · · · 0 h n−2 2(h n−2 + h n−1 ) h n−1 ⎦<br />
0 · · · · · · · · · · · · 0 h n−1 2h n−1<br />
⎡<br />
b =<br />
⎢<br />
⎣<br />
3<br />
h 0<br />
(a 1 − a 0 ) − 3f ′ (a)<br />
3<br />
h 1<br />
(a 2 − a 1 ) − 3 h 0<br />
(a 1 − a 0 )<br />
.<br />
3<br />
h n−1<br />
(a n − a n−1 ) − 3<br />
h n−2<br />
(a n−1 − a n−2 )<br />
3f ′ (b) − 3<br />
h n−1<br />
(a n − a n−1 )<br />
⎤<br />
⎥<br />
⎦<br />
⎡<br />
X =<br />
⎢<br />
⎣<br />
c 0<br />
c 1<br />
.<br />
c n−1<br />
c n<br />
⎤<br />
⎥<br />
⎦<br />
Exercise 1. A natural cubic spline S on [0, 2] is defined by<br />
S(x) =<br />
{<br />
S0 (x) = 1 + 2x − x 3 , if 0 ≤ x < 1<br />
S 1 (x) = a + b(x − 1) + c(x − 1) 2 + d(x − 1) 3 , if 1 ≤ x ≤ 2<br />
Find a, b, c, d.<br />
Exercise 2. A clamped cubic spline S on [1, 3] is defined by<br />
S(x) =<br />
{<br />
S0 (x) = 3(x − 1) + 2(x − 1) 2 − (x − 1) 3 , if 1 ≤ x < 2<br />
S 1 (x) = a + b(x − 2) + c(x − 2) 2 + d(x − 2) 3 , if 2 ≤ x ≤ 3<br />
Given f ′ (1) = f ′ (3), find a, b, c, d.<br />
12