> #============================

> # Testaufgabe 2 - LGS

> #============================

> restart; with(linalg):

Warning, new definition for norm

Warning, new definition for trace

> Digits:=3;

[Maple Math]

> read ` test_a2.dat `;

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

> read ` gau_piv.src `; # Gauss mit Pivotisierung (a ist schon piv.)

[Maple Math]

Pivot: 1

2 .50000 -- 0.00000 -5000.00000 -5000.00000

[Maple Math]

[Maple Math]

> read ` skal_ab.src `; # Skaliere

[Maple Math]

[Maple Math]

> read ` gau_ohne.src `; # Gauss ohne Pivotisierung

[Maple Math]

3330.00000 --> 0.00000 -3330.00000 -3330.00000

[Maple Math]

[Maple Math]

> read ` gau_piv.src `; # Gauss mit Pivotisierung

[Maple Math]

Pivot: 2

1 .00030 -- .00000 1.00000 1.00000

[Maple Math]

[Maple Math]

> Digits:=20; # Jetzt 20 stellen, skalieren und pivotisieren

[Maple Math]

> read ` test_a2.dat `; A:=evalm(a); # sichere a

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

> read ` skal_ab.src `;

[Maple Math]

[Maple Math]

> read ` gau_piv.src `;

[Maple Math]

Pivot: 2

1 .00030 -- 0.00000 .99970 .99960

[Maple Math]

[Maple Math]

> # Pivotisierung bringt hier nichts, weil a[1,2] entscheidend

> # Skalierung bringt hier das MUSS der anschliessenden Skalierung

> # genauer mit Kondition

> Am1:=inverse(A); am1:=inverse(a);

[Maple Math]

[Maple Math]

> # die Kondition ist also mit Skalierung ungefaehr 5; ohne ca. 2000

> # oder genauer:

> kappa[A,1]:=cond(A, 1); kappa[a,1]:=cond(a,1);
kappa[A,2]:=cond(A,2); kappa[a,2]:=cond(a,2);
kappa[A,infinity]:=cond(A, infinity); kappa[a,infinity]:=cond(a, infinity);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

>