Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik Inhalt Kapitel I: Nichtlineare Gleichungssysteme I Nichtlineare Gleichungssysteme I.1 Nullstellenbestimmung von Funktionen einer Ver¨ anderlichen I.2 Fixpunktiteration I.3 Newton-Verfahren Kapitel I (UebersichtKapI) 1 Prof. Dr. Barbara Wohlmuth Lehrstuhl f¨ ur Numerische Mathematik Bisektionsverfahren am Beispiel f = x 2 − 1 0 1 2 3 4 5 6 -5 0 5 10 15 20 25 30 35 Bisektion x 2 -1 Startwert: 0, 5 0 2 4 6 8 10 10 -3 10 -2 10 -1 10 0 Bisektion Anzahl der Iterationen Fehlerschranke Lineare Konvergenz In jedem Schritt Halbierung der Intervalll¨ ange Pro Schritt eine Funktionsauswertung Kapitel I (nonlin05) 2
12
Embed
Inhalt Kapitel I: Nichtlineare Gleichungssysteme · Prof. Dr. Barbara Wohlmuth Lehrstuhl fu¨r Numerische Mathematik Inhalt Kapitel I: Nichtlineare Gleichungssysteme I Nichtlineare
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 I: Nichtlineare Gleichungssysteme
I Nichtlineare Gleichungssysteme
I.1 Nullstellenbestimmung von Funktionen einer Veranderlichen
I.2 Fixpunktiteration
I.3 Newton-Verfahren
Kapitel I (UebersichtKapI) 1
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Bisektionsverfahren am Beispiel f = x2 − 1
0 1 2 3 4 5 6−5
0
5
10
15
20
25
30
35Bisektion
x2−1
Startwert: 0, 5
0 2 4 6 8 1010
−3
10−2
10−1
100
Bisektion
Anzahl der Iterationen
Feh
lers
chra
nke
Lineare Konvergenz
In jedem Schritt Halbierung der Intervalllange
Pro Schritt eine Funktionsauswertung
Kapitel I (nonlin05) 2
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Regula falsi am Beispiel f = x2 − 1
0 1 2 3 4 5−5
0
5
10
15
20
25Regula falsi
x2−1
Startwert: 0, 5
0 5 10 15 20 2510
−4
10−3
10−2
10−1
100
101
Regula falsi
Anzahl der Iterationen
Feh
ler
Lineare Konvergenz
Reduktion der Intervalllange variabel
Pro Schritt eine Funktionsauswertung
Kapitel I (nonlin06) 3
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Sekantenverfahren
0 1 2 3 4 5−5
0
5
10
15
20
25Sekantenverfahren
x2−1
Startwert: 0, 5
0 2 4 6 8 10 1210
−10
10−5
100
105
Sekantenverfahren
Anzahl der Iterationen
Feh
ler
Konvergenzordnung i.d.R. p = (1 +√5)/2
Pro Schritt eine Funktionsauswertung
Reduktion der Intervalllange variabel
Kapitel I (nonlin07) 4
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Fixpunktiteration x =√x (Start x = 7)
0 1 2 3 4 5 6 70
0.5
1
1.5
2
2.5
3Fixpunktiteration
Wurzelfunktion
0 2 4 6 8 100.001
0.01
0.1
1
5
Fixpunktiteration
Anzahl der Iterationen
Feh
ler
Fixpunkt: Φ(x) =√x = x, Nullstelle: g(x) =
√x− x
Pro Schritt eine Funktionsauswertung, lin. Konvergenz Φ′(1) = 1
2
Kapitel I (nonlin02) 5
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Fixpunktiteration: Kritischer Einfluss der Wahl von Φ
am Beispiel 2− x2 − ex = 0 (Start x0 = 0.4)
Konvergenz: Φ(x) = log(2− x2)
0.4 0.55 0.70.4
0.55
0.7Fixpunktiteration
log(2−x2)0 5 10 15 20
0.0001
0.001
0.01
0.1
0.5
Fixpunktiteration
Anzahl der Iterationen
Feh
ler
Keine Konvergenz: Φ(x) =√2− ex
−0.5 0 0.5 1−0.5
0
0.5
1
Fixpunktiteration
0 20 40 60 80 1000.1
0.2
0.5
1
4Fixpunktiteration
Anzahl der Iterationen
Iterie
rte
0 5 10 15 200.4
0.45
0.5
0.55
0.6
Fixpunktiteration
Anzahl der Iterationen
Feh
ler
Kapitel I (nonlin03) 6
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Fixpunktiteration: Kritischer Einfluss des Startwerts
am Beispiel x2 = x,Φ(x) = x2
Divergenz
0 1 2 3 4 50
1
2
3
4
5Fixpunktiteration
x2: DivergenzStartwert: 1.01
0 5 10 15 2010
−100
100
10100
10200
10300
Anzahl der Iterationen
Iterie
rte
quad. Konvergenz gegen x = 0, (x = 1 instabil)
0 0.2 0.4 0.6 0.8 10
0.2
0.4
0.6
0.8
1Fixpunktiteration
x2: Konvergenz
Startwert: 0.99
0 5 10 1510
−40
10−30
10−20
10−10
100
Fixpunktiteration
Anzahl der Iterationen
Iterie
rte
Kapitel I (nonlin04) 7
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Fixpunktiteration: Konvergenzgeschwindigkeit
in Abhangigkeit von Φ bzw. Φ′
Verschiedene Fixpunktiterationen
mit Fixpunkt x∗ = 1:
φ1(x) = x1/4, φ′1(x∗) =
1
4,
φ2(x) = x1/2, φ2′(x∗) =
1
2,
φ3(x) = x3/4, φ3′(x∗) =
3
4,
Startwert x0 = 2.20 40 60 80 100
10−15
10−10
10−5
100
Fehlerabnahme
φ1
φ2
φ3
⇒ Fur 0 < |φ′j(x∗)| = qj < 1 lokal lineare Konvergenz mit
‖φj(xk)− x∗‖ ≈ qj‖xk − x∗‖.
Kapitel I (nonlin24) 8
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Wurzelberechnung mit dem Newton-Verfahren
Beispiel
Gesucht sei x∗ = n√a, a > 0, 2 ≤ n ∈ N.
Umformung ergibt xn∗ − a = 0.
Setze f(x) := xn − a.Anwendung des Newton-Verfahrens ergibt die Folge (xk) mit
xk+1 =1
n
(
(n− 1)xk + ax1−nk
)
.
Beispiel: Fur die Berechnung von 3√8 ergibt sich mit x0 = 2.9
k xk ek ek/e2
k−1
0 2.900000000000000 9.00e-01
1 2.250416171224733 2.50e-01 0.31
2 2.026831612491640 2.68e-02 0.43
3 2.000353634974019 3.54e-04 0.49
4 2.000000062514109 6.25e-08 0.50
5 2.000000000000002 1.78e-15 0.46
6 2.000000000000000 < eps
Kapitel I (nonlin08) 9
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Wurzelberechnung mit dem Newton-Verfahren
Konvergenzbetrachtung
Das Newton-Verfahren ist lokal quadratisch konvergent, d.h.
∃ε > 0 : ‖xk+1 − x∗‖ ≤ ω
2‖xk − x∗‖2, ∀xk ∈ [x∗ − ε, x∗ + ε].
Beispiel
0 1 2 3 4 5
10−10
10−5
k
ek−12
ek
ek/e2k−1
konstant ⇒ quadratische Konvergenz
Kapitel I (nonlin09) 10
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Wurzelberechnung 3√8 mit dem Newton-Verfahren
Iterationsverlauf abhangig vom Startwert
x0 = 5
2 3 4 50
50
100
150
x0 = −2
−2 0 2 4 6
0
50
100
150
Kapitel I (nonlin10) 11
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Lokale Konvergenz beim Newtonverfahren
−3 −2 −1 0 1 2 3−1.5
−1
−0.5
0
0.5
1
1.5
Startwert: 1
−3 −2 −1 0 1 2 3−1.5
−1
−0.5
0
0.5
1
1.5
Startwert: 1.3
−3 −2 −1 0 1 2 3−1.5
−1
−0.5
0
0.5
1
1.5
Startwert: 1.39
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−1.5
−1
−0.5
0
0.5
1
1.5
Startwert: 1.391745
Sei s die kritische Schranke gegebendurch: 2s− (1 + s2)arctan(s) = 0.Oben: Konvergenz fur x0 ∈ (−s, s)Unten: Divergenz fur x0 6∈ (−s, s)
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−1.5
−1
−0.5
0
0.5
1
1.5
Startwert: 1.391745200270735
−5 0 5 10 15 20 25−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
Startwert: 1.391746 0 5 10 15 20 2510
−20
10−10
100
Anzahl der Iterationen
abs.
Feh
ler
1.0
1.3 1.3917
1.35
1.391745
1.39
Kapitel I (nonlin14) 12
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Newton-Verfahren: Berechnung von π/4Setze f(x) := tanx− 1.Anwendung des Newton-Verfahrens ergibt die Folge (xk) mit
xk+1 = xk −1
2sin 2xk + cos2 xk.
Beispiel: Mit x0 = 1.5
k xk ek ek/e2
k−1
0 1.500000000000000 7.15e-01
1 1.434443747669844 6.49e-01 1.27
2 1.318252032435956 5.33e-01 1.26
3 1.138743742375321 3.53e-01 1.24
4 0.9338260207395713 1.48e-01 1.19
5 0.8094380881164263 2.40e-02 1.09
6 0.7859852310561355 5.87e-04 1.02
7 0.7853985081807326 3.45e-07 1.00
8 0.7853981633975672 1.19e-13 1.00
9 0.7853981633974483 < eps
ek/e2k−1
konstant ⇒ quadratische Konvergenz
Kapitel I (nonlin11) 13
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Newton-Verfahren: Berechnung von π/4
Konvergenzbetrachtung
Fehler
0 2 4 6 8
10−10
10−5
k
ek−12
ek
Visualisierung
0.8 1 1.2 1.4
0
5
10
15
Kapitel I (nonlin12) 14
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Vergleich Newton– und Sekantenverfahren
Nullstellenbestimmung von f(x) = 2− x2 − ex:
Startwerte: x0 = 1, x1 = 2.
Fehler ek = |xk − x∗|k ek Sekant ek Newton
0 4.6272555e-01 4.6272555e-01
1 2.4627256e+00 9.8550224e-02
2 3.2725312e-01 5.8822435e-03
3 2.3503058e-01 2.2909460e-05
4 4.0076805e-02 3.4958791e-10
5 5.5073255e-03 < eps
6 1.4366892e-04
7 5.2551511e-07
8 5.0286553e-11
9 1.1102230e-16
x∗ muss numerisch bestimmt werden.
1 2 3 4 5 6 7
10−10
100
ek Sekant
e2k
Sekant
ek Newton
Aufwand: Newton ≈ 2·SekantKonvergenz:
2 = pnew > psek ≈ 1.618pnew < (psek)
2 ≈ 2.618.
Kapitel I (nonlin23) 15
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Verfahren im Vergleich (Startwert abhangig)
−5 0 5−1.5
−1
−0.5
0
0.5
1
1.5
atan(x)
−5 0 5 10 15−1000
−800
−600
−400
−200
0
200
400
x3−16x2−50
−10 −5 0 5 10−4
−2
0
2
4
6
8
10
(4sin x2+x3+0.5) exp(−0.2(x−0.5)2)
0 5 10 15 2010
−30
10−20
10−10
100
1010
Regula falsi
Sekanten
Newton
0 10 20 30 40 5010
−15
10−10
10−5
100
x3−16 x2−50
Bisektion
Sekanten
Regula falsiNewton0 10 20 30 40 50
10−15
10−10
10−5
100
Sekanten
Regula falsi
Bisektion
Anzahl der Iterationen versus Fehlernorm (Mitte: typisch)
Kapitel I (nonlin15) 16
Prof. Dr. Barbara Wohlmuth
Lehrstuhl fur Numerische Mathematik
Gedampfte Variante des Newton-Verfahrens (F (xi) < F (xi−1))