Die Interpolationsformel von Lagrange

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik Die Interpolationsformel von Lagrange Zentrale Aussage: Zu beliebigen n + 1 St¨ utzp...
Author: Gesche Holtzer
145 downloads 0 Views 1MB Size
Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Die Interpolationsformel von Lagrange Zentrale Aussage: Zu beliebigen n + 1 St¨ utzpunkten (xi, fi), i = 0, . . . , n mit paarweise verschiedenen St¨ utzstellen xi 6= xj , f¨ ur i 6= j, gibt es genau ein Polynom πn ∈ Pn mit πn(xi ) = fi, i = 0, . . . , n. Es gilt πn(x) =

n X

fiLi(x)

i=0

mit den Interpolationspolynomen

Y x − xk Li(x) := , xi − xk

i = 0, . . . , n.

k6=i

Polynominterpolation (interpol02)

1

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Die Interpolationsformel von Lagrange, Beispiel Gegeben seien f¨ ur n = 2 :

i xi fi

0 0 1

1 1 3

2 3 2

Als Interpolationspolynome ergeben sich (x − 0)(x − 3) (x − 0)(x − 1) (x − 1)(x − 3) , L1(x) = , L2(x) = , L0(x) = (0 − 1)(0 − 3) (1 − 0)(1 − 3) (3 − 0)(3 − 1) und damit 4 3 2 1

π2(x) = 1 · L0(x) + 3 · L1(x) + 2 · L2(x) 1 = (−5x2 + 17x + 6) 6

0 -1 -2 -3

P(x) 1L0(x) 3L1(x) 2L2(x) Stuetzstellen

-4 -5 -6 -1

Polynominterpolation (interpol03)

0

1

2

3

4

2

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Die Interpolationsformel von Lagrange Beispiel: Exponentialfunktion Gegeben seien f¨ ur n = 2 :

i xi fi

0 −1 e−1

1 0 e0

2 1 e1

Als Interpolationspolynome ergeben sich (x − 0)(x − 1) L0(x) = , (−1 − 1)(−1 − 0)

(x + 1)(x − 1) L1(x) = , (0 + 1)(0 − 1)

(x + 1)(x − 0) L2 (x) = , (1 + 1)(1 − 0)

und damit π2(x) = e−1 · L0(x) + e0 · L1(x) + e1 · L2(x) 1 1 = e−1 · (x2 − x) − 1 · (x2 − 1) + e · (x2 + x) 2 2     1 e e 1 2 −1+ − = x + x+1 2e 2 2 2e = (cosh(1) − 1)x2 + sinh(1)x + 1

Polynominterpolation (interpol03a)

3

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Die Interpolationsformel von Lagrange Beispiel: Exponentialfunktion L (x)

4

0

8

Π2(x)

6

e−1 e *L (x)

x

L (x)

3

1

L2(x)

2

0

0

Stützpunkte

4

1

e *L (x) 1

1

e *L (x) 2

2

0 −1 −2 −2

Stützstellen

0 −1

0

Polynominterpolation (interpol04a)

1

2

−2

−1

0

1

2

4

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Interpolationsfehler Die St¨ utzwerte fi stammen oft von einer stetigen Funktion f , d.h. fi = f (xi),

i = 0, . . . , n.

Gilt {xi : i = 0, . . . , n} ⊂ [a, b], so l¨asst sich der Fehler f − πn in der Maximumsnorm kf k[a,b] := kf kL∞([a,b]) := max |f (x)| x∈[a,b]

absch¨atzen als

kωn+1k[a,b] (n+1) kf k[a,b]. (n + 1)! n Y (x − xi). ωn+1(x) :=

kf − πnk[a,b] ≤ Hierbei ist

i=0

utzstellen ab. Der Ausdruck kωn+1k[a,b] h¨angt alleine von der Wahl der St¨

Polynominterpolation (interpol11)

5

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Das Polynom ωn+1 ¨ Aquidistante St¨ utzstellen, n = 21 −5

5

x 10

0 −5 −10 −15 −20 −1

−0.5

0

0.5

1

Frage: Gibt es eine Knotenverteilung, so dass kωn+1k[a,b] minimal wird? Polynominterpolation (interpol12)

6

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Tschebyscheff–Interpolation F¨ ur n ∈ N0 bezeichne Tn das Tschebyscheffpolynom, Tn(x) := cos(n arccos x),

x ∈ [−1, 1].

Es gilt die 3-Term Rekursion T0(x) = 1,

T1(x) = x,

Tn(x) = 2xTn−1(x) − Tn−2(x),

n ≥ 2,

=⇒ Tn ∈ Pn Nullstellen von Tn sind die Tschebyscheffpunkte (n+1) xi

Polynominterpolation (interpol13)





2i + 1 = cos π , 2n + 2

i = 0, . . . , n.

7

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Tschebyscheffpunkte

n=3

n=5

45

30

n=8

n=17

20

Polynominterpolation (interpol14)

10

8

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Das Polynom ωn+1 Tschebyscheffknoten, n = 21 −7

5

x 10

kω22,¨aquik[−1,1] ≈ 3.5 · 102 kω22,chebk[−1,1] z.B. n = 40

0

kω41,¨aquik[−1,1] ≈ 3.3 · 105 kω41,chebk[−1,1] allgemein

−5 −1

−0.5

Polynominterpolation (interpol15)

0

0.5

1

kωn+1,chebk[−1,1] = 2−n

9

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Das Polynom ωn+1 kωn+1k∞;[−1,1] f¨ ur verschiedene St¨ utzstellen ||ω||

∞;[−1,1]

200

10

äquidistant 100

10

nur in [0,1]

0

10

nur in [−1,−0.5]∪[0.5,1] ...+ einige in [−0,5,0.5]

−100

10

Tschebyscheff −200

10

0

200 400 Anzahl Stützstellen

Polynominterpolation (interpol15a)

600

10

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

¨ Aquidistante Punkte vs. Tschebyscheffpunkte 3

n = 19, Lagrange Polynom L9(x)

2.5 2 1.5 1 0.5 0 −0.5 −1

−0.5

kL9,¨aquidistantk[−1,1] = 1.0 · 103,

Polynominterpolation (interpol17)

0

0.5

1

kL9,Tschebyscheffk[−1,1] = 1.0

11

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

¨ Aquidistante Punkte vs. Tschebyscheffpunkte f (x) = 1/(1 + 25x2) n=4

n=6

0.8 0.6 0.4 0.2 0 −0.2 −1

n=8

0.8 0.6 0.4 0.2 0 0

1

−1

n = 10

0.5

−0.5 0

1

−1 −1

n = 12 0

6

1

−1

4

0.5

−2

2

0

−3

0

0

1

−1

Polynominterpolation (interpol18)

0

0

1

n = 14

1.5

−1

, Tschebyscheffpunkte: Konvergenz

0

1

−1

¨ Punkte: / Aquidistante Randoszillationen 0

1

12

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

¨ Aquidistante Punkte vs. Tschebyscheffpunkte Interpolationsfehler, f (x) = 1/(1 + 25x2) n = 10, aequidistant

n = 20, aequidistant

n = 30, aequidistant 0

0

50 −500

40

−0.5

30

−1000

−1

20

−1500

−1.5

10

−1

0

1

0 −1

−2000 0

1

−1

0

1

−3

0.015 0.05 0 −0.05

0.01

2

x 10

1

0.005 0

0

−0.005

−1

−0.01 −0.1 −2 −1 0 1 −1 0 1 −1 0 1 n = 10, Tschebyscheff n = 20, Tschebyscheff n = 30, Tschebyscheff

Polynominterpolation (interpol19)

13

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

¨ Aquidistante Punkte vs. Tschebyscheffpunkte f (x) = |x|3/2 n=4

n=8

n=6

1

1

1

0.8

0.8

0.8

0.6

0.6

0.6

0.4

0.4

0.4

0.2

0.2

0.2

−1

0

1

−1

n = 10

0

1

−1

n = 12 1.2

1

0.8

1

0.8

0.6

0.8

0.6

0.6

−1

Polynominterpolation (interpol20)

0.4

0.4

0.2

0.2

0.2 0

1

−1

1

n = 14

1

0.4

0

0

1

−1

0

1

14

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

p ¨ Aquidistante Punkte vs. Tschebyscheffpunkte f (x) = |x| n=4

n=6

1.2 1 0.8 0.6 0.4 0.2

−1

1 0.8

1.5

0.6

1

0.4

0

1

−1

0

0

0

1

−1

n = 12

1

Polynominterpolation (interpol20a)

0.5

0.2

n = 10

−1 −1

n=8

1

0

4

−5

2

−10 0

1

n = 14

6

−1

0

1

−1

0

1

15

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

¨ Aquidistante Punkte vs. Tschebyscheffpunkte p Interpolationsfehler, f (x) = |x| 4

x 10

2

0

1.5

−100

1

−200

10

0.5

−300

5

0

−400

0.2

0.15

15

0 −1 0 1 −1 0 1 −1 0 1 n = 10, aequidistant n = 20, aequidistant n = 30, aequidistant

0.1 0.1 0

0.1

0.05

0.05

0

0

−0.05 −1 0 1 −1 0 1 −1 0 1 n = 10, Tschebyscheffn = 20, Tschebyscheffn = 30, Tschebyscheff

Polynominterpolation (interpol20b)

16

Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik

Interpolationsfehler und Lebesgue Konstanten Λn Definiton Lebesgue Konstante Λn: Λn := max

x∈[−1,1]

Interpolationsfehler:

n X

|Li(x)|

i=0

1 kf − Πnf k[−1,1] ≤ CΛnω(f, ) n

Hierbei bezeichnen Li die Lagrange-Interpolationspolynome, und ω(f, n1 ) den Stetigkeitsmodul von f . Dieser ist definiert als ω(f, δ) :=

sup |f (x) − f (y)| |x−y|