Numerical Methods Contents - SAM
Numerical Methods Contents - SAM
Numerical Methods Contents - SAM
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
➤ Linear system of equations with tridiagonal s.p.d. (→ Def. 2.7.1, Lemma 2.7.4) coefficient<br />
matrix → c 0 , ...,c n<br />
Thm. 2.6.6 ⇒ computational effort for the solution = O(n)<br />
Example 9.4.3 (Locality of the natural cubic spline interpolation).<br />
Given a grid M := {t 0 < t 1 < · · · < t n } the ith natural cardinal spline is defined as<br />
L i ∈ S 3,M , L i (t j ) = δ ij , L ′′<br />
i (t 0) = L ′′<br />
i (t n) = 0 .<br />
➂ Periodic cubic spline interpolation: s ′ (t 0 ) = s ′ (t n ), s ′′ (t 0 ) = s ′′ (t n )<br />
n × n-linear system with s.p.d. coefficient matrix<br />
⎛<br />
⎞<br />
a 1 b 1 0 · · · 0 b 0<br />
b 1 a 2 b 2 0<br />
A :=<br />
0 . . . ... . .. .<br />
⎜ . ... . .. ... 0<br />
,<br />
⎝ 0 .<br />
⎟<br />
.. a n−1 b n−1 ⎠<br />
b 0 0 · · · 0 b n−1 a 0<br />
b i := 1<br />
h i+1<br />
, i = 0, 1, ...,n − 1 ,<br />
a i := 2 h i<br />
+ 2<br />
h i+1<br />
, i = 0, 1, . ..,n − 1 .<br />
Solved with rank-1-modifications technique (see Section 2.9.0.1, Lemma 2.9.1) + tridiagonal elimination,<br />
computational effort O(n)<br />
MATLAB-function: v = spline(t,y,x): natural / complete spline interpolation<br />
(see spline-toolbox in MATLAB)<br />
Ôº¾ º<br />
1.2<br />
1<br />
0.8<br />
0.6<br />
0.4<br />
0.2<br />
0<br />
n∑<br />
Natural spline interpolant: s(t) = y j L j (t) .<br />
j=0<br />
Decay of L i ↔ locality of the cubic spline interpolation.<br />
Cardinal cubic spline function<br />
Cardinal cubic spline in middle points of the intervals<br />
10 0<br />
10 −1<br />
Value of the cardinal cubic splines<br />
10 −2<br />
10 −3<br />
10 −4<br />
Ôº¿½ º<br />
−5<br />
Notice analogies and differences:<br />
extra degrees of freedom fixed by:<br />
1. piecewise polynomial<br />
1. intermediate nodes,<br />
interpolant, d = 3,<br />
piecewise cubic polynomials<br />
that match the data 2. slopes,<br />
2. Hermite interpolant,<br />
(t i , y i )<br />
3. C 2 -constraint,<br />
3. cubic spline,<br />
complete/natural/periodic<br />
constraint.<br />
Exponential decay of the cardinal splines ➞ cubic spline interpolation is “almost local”<br />
✸<br />
Example 9.4.4 (Approximation by complete cubic spline interpolants).<br />
Grid M := {−1 + n 2j}n j=0 , n ∈ N ➙ meshwidth h = 2/n, I = [−1, 1]<br />
⎧<br />
1<br />
⎪⎨ 0 , if t < −<br />
f 1 (t) =<br />
1 + e −2t ∈ 5 2 ,<br />
C∞ (I) , f 2 (t) = 1<br />
2 ⎪⎩<br />
(1 + cos(π(t − 3 5 ))) , if − 2 5 < t < 5 3 , ∈ C 1 (I) .<br />
1 otherwise.<br />
Remark 9.4.2 (Shape preservation).<br />
Data s(t j ) = y j from Ex. 9.1.1 and<br />
c 0 := y 1 − y 0<br />
t 1 − t 0<br />
,<br />
c n := y n − y n−1<br />
t n − t n−1<br />
.<br />
The cubic spline interpolant is not monotonicityor<br />
curvature-preserving<br />
(cubic spline interpolation is linear!)<br />
△<br />
s(t)<br />
1.2<br />
1<br />
0.8<br />
0.6<br />
0.4<br />
0.2<br />
0<br />
Data points<br />
Cubic spline interpolant<br />
−0.2<br />
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />
t<br />
Ôº¿¼ º<br />
||s−f||<br />
L ∞ −Norm<br />
L 2 −Norm<br />
10 −4<br />
10 −6<br />
10 −8<br />
10 −10<br />
10 −12<br />
10 −2 10 −1 10 0<br />
10 −2 Meshwidth h<br />
‖f 1 − s‖ L ∞ ([−1,1]) = O(h4 )<br />
||s−f||<br />
L ∞ −Norm<br />
10 −1 L 2 −Norm<br />
10 −2<br />
10 −3<br />
10 −4<br />
10 −5<br />
10 −6<br />
10 −7<br />
10 −2 10 −1 10 0<br />
10 0 Meshwidth h<br />
‖f 2 − s‖ L ∞ ([−1,1]) = O(h2 )<br />
Ôº¿¾ º