Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik Inhalt Kapitel IV: Interpolation IV Interpolation IV.1 Polynom-Interpolation IV.2 Spline-Interpolation Kapitel IV (InhaltIV) 1 Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik Die Interpolationsformel von Lagrange Zentrale Aussage: Zu beliebigen n +1 St¨ utzpunkten (x i ,f i ), i =0,...,n mit paarweise verschiedenen St¨ utzstellen x i = x j , f¨ ur i = j , gibt es genau ein Polynom π n ∈ P n mit π n (x i )= f i , i =0,...,n. Es gilt π n (x)= n i=0 f i L i (x) mit den Interpolationspolynomen L i (x) := k=i x − x k x i − x k , i =0,...,n. Kapitel IV (interpol02) 2
14
Embed
Inhalt Kapitel IV: Interpolation · PDF fileProf. Dr. Barbara Wohlmuth Lehrstuhl fu¨r Numerische Mathematik Inhalt Kapitel IV: Interpolation IV Interpolation IV.1 Polynom-Interpolation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Inhalt Kapitel IV: Interpolation
IV Interpolation
IV.1 Polynom-Interpolation
IV.2 Spline-Interpolation
Kapitel IV (InhaltIV) 1
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Die Interpolationsformel von Lagrange
Zentrale Aussage: Zu beliebigen n + 1 Stutzpunkten (xi, fi), i = 0, . . . , n mitpaarweise verschiedenen Stutzstellen xi 6= xj, fur i 6= j, gibt es genau ein Polynomπn ∈ Pn mit
πn(xi) = fi, i = 0, . . . , n.
Es gilt
πn(x) =n∑
i=0
fiLi(x)
mit den Interpolationspolynomen
Li(x) :=∏
k 6=i
x− xk
xi − xk, i = 0, . . . , n.
Kapitel IV (interpol02) 2
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Die Interpolationsformel von Lagrange, Beispiel
Gegeben seien fur n = 2 :
i 0 1 2xi 0 1 3fi 1 3 2
Als Interpolationspolynome ergeben sich
L0(x) =(x− 1)(x− 3)
(0− 1)(0− 3), L1(x) =
(x− 0)(x− 3)
(1− 0)(1− 3), L2(x) =
(x− 0)(x− 1)
(3− 0)(3− 1),
und damit
π2(x) = 1 · L0(x) + 3 · L1(x) + 2 · L2(x)
=1
6(−5x2 + 17x+ 6)
-6
-5
-4
-3
-2
-1
0
1
2
3
4
-1 0 1 2 3 4
P(x)1L0(x)3L1(x)2L2(x)
Stuetzstellen
Kapitel IV (interpol03) 3
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Die Interpolationsformel von Lagrange
Beispiel: Exponentialfunktion
Gegeben seien fur n = 2 :
i 0 1 2xi −1 0 1fi e−1 e0 e1
Als Interpolationspolynome ergeben sich
L0(x) =(x − 0)(x − 1)
(−1 − 1)(−1 − 0), L1(x) =
(x + 1)(x − 1)
(0 + 1)(0 − 1), L2(x) =
(x + 1)(x − 0)
(1 + 1)(1 − 0),
und damit
π2(x) = e−1 · L0(x) + e0 · L1(x) + e1 · L2(x)
= e−1 ·1
2(x2 − x)− 1 · (x2 − 1) + e ·
1
2(x2 + x)
=
(
1
2e− 1 +
e
2
)
x2 +
(
e
2−
1
2e
)
x+ 1
= (cosh(1)− 1)x2 + sinh(1)x+ 1
Kapitel IV (interpol03a) 4
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Die Interpolationsformel von Lagrange
Beispiel: Exponentialfunktion
−2 −1 0 1 2−2
−1
0
1
2
3
4 L0(x)
L1(x)
L2(x)
Stützpunkte
−2 −1 0 1 2
0
2
4
6
8 Π2(x)
ex
e−1*L0(x)
e0*L1(x)
e1*L2(x)
Stützstellen
Kapitel IV (interpol04a) 5
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Interpolationsfehler
Die Stutzwerte fi stammen oft von einer stetigen Funktion f , d.h.
fi = f(xi), i = 0, . . . , n.
Gilt {xi : i = 0, . . . , n} ⊂ [a, b], so lasst sich der Fehler f − πn in derMaximumsnorm
‖f‖[a,b] := ‖f‖L∞([a,b]) := maxx∈[a,b]
|f(x)|
abschatzen als
‖f − πn‖[a,b] ≤‖ωn+1‖[a,b](n+ 1)!
‖f (n+1)‖[a,b].
Hierbei ist
ωn+1(x) :=n∏
i=0
(x− xi).
Der Ausdruck ‖ωn+1‖[a,b] hangt alleine von der Wahl der Stutzstellen ab.
Kapitel IV (interpol11) 6
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Das Polynom ωn+1
Aquidistante Stutzstellen, n = 21
−1 −0.5 0 0.5 1−20
−15
−10
−5
0
5x 10−5
Frage: Gibt es eine Knotenverteilung, so dass ‖ωn+1‖[a,b] minimal wird?
Kapitel IV (interpol12) 7
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Das Polynom ωn+1
Aquidistant, weitere Stutzstellen, Tschebyscheff, n = 21
−1 −0.5 0 0.5 1−20
−10
0
x 10−5
−1 −0.5 0 0.5 1−1000
0
1000
2000
3000
4000
5000
−1 −0.5 0 0.5 1−0.02
0
0.02
0.04
0.06
0.08
−1 −0.5 0 0.5 1−15
−10
−5
0
5x 10−4
−1 −0.5 0 0.5 1−20
−15
−10
−5
0
5x 10−6
−1 −0.5 0 0.5 1−5
0
5x 10−7
Die sog. Tschebyscheffpunkte liefern ein optimales ‖ωn+1‖[a,b].
Interpolationsfehler hangt vom Stetigkeitsmodul ω(f, 1n) des Interpolanden ab.
Kapitel IV (interpol20d) 17
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Auswertung des Interpolationspolynoms
Ziel: Πn(f, y) soll fur. . .
• k verschiedene Funktionen f
• an jeweils m weiteren Stellen yi, i = 1 . . .m
ausgewertet werden.
Dazu gibt es folgende Moglichkeiten:
Aitken-Neville Newton & Horner baryzentrisch
Aufwand O(kmn2) O(kmn+ kn2) O(kmn+ n2)
Stabilitat , / ,
Kapitel IV (interpol78) 18
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Das Schema von Aitken und Neville
Das gesuchte Polynom πn soll an einem Punkt x ausgewertet werden. Fur k + 1paarweise verschiedene Indizes {i0, . . . , ik} ⊂ {0, . . . , n} bezeichne Pi0...ik ∈ Pk
das Interpolationspolynom durch (xi0, fi0), . . . , (xik, fik). Es gilt: