Gauss Side L

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

In[283]:=

A = {{4.0, 1.0, 2.0}, {- 3.0, 5.0, 1.0}, {1.0, 1.0, 3.0}};


d = {{4.0, 0, 0}, {0, 5.0, 0}, {0, 0, 3.0}};
u = {{0, 1.0, 2}, {0, 0, 1.0}, {0, 0, 0}};
l = {{0, 0, 0}, {- 3.0, 0, 0}, {1.0, 1.0, 0}};
b = Transpose[{{4.0, 7.0, 3.0}}]
x[1] = Transpose[{{0, 0, 0}}]
Do[x[n + 1] = LinearSolve[d + l, - u.x[n] + b];
Print[x ^ n, "=", MatrixForm[x[n]]], {n, 1, 15}]

Out[287]=

{{4.}, {7.}, {3.}}


Out[288]=

{{0}, {0}, {0}}


2

0
x= 0
0
1.
x2= 2.
- 3.70074 × 10-17

0.5
x3= 1.7
0.266667
0.441667
x4= 1.61167
0.315556
0.439306
x5= 1.60047
0.320074
0.439845
x6= 1.59989
0.320088
0.439983
x7= 1.59997
0.320015
0.439999
x8= 1.6
0.320001
0.44
x9= 1.6
0.32
0.44
x10= 1.6
0.32
0.44
x11= 1.6
0.32
0.44
x12= 1.6
0.32
0.44
x13= 1.6
0.32
0.44
x14= 1.6
0.32
0.44
x15= 1.6
0.32

You might also like