0% found this document useful (0 votes)
400 views

A) Método de Jacobi de Forma Matricial

The document describes the Jacobi and Gauss-Seidel iterative methods to solve a system of linear equations. It provides an example of a 3x3 system of equations that is solved using both the matrix and scalar forms of each method. For the Jacobi method, the system is initially set to an initial guess and then iteratively updated until convergence is reached. For the Gauss-Seidel method, the system is similarly initialized and iteratively updated, but with the updated values from the current iteration being used in the next calculation rather than the previous iteration values. Both methods are shown computationally solving the example system to convergence.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
400 views

A) Método de Jacobi de Forma Matricial

The document describes the Jacobi and Gauss-Seidel iterative methods to solve a system of linear equations. It provides an example of a 3x3 system of equations that is solved using both the matrix and scalar forms of each method. For the Jacobi method, the system is initially set to an initial guess and then iteratively updated until convergence is reached. For the Gauss-Seidel method, the system is similarly initialized and iteratively updated, but with the updated values from the current iteration being used in the next calculation rather than the previous iteration values. Both methods are shown computationally solving the example system to convergence.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

a) Mtodo de Jacobi de forma matricial.

5x + 2y + 2z = 15
2x + 3y + 6z = 26
x + 3y + z =10

x (0) = (0, 0,0)

Ax = b x = Bx + c
B = I C-1 A
c = C-1 b
C = Diagonal
A

5 2 2
1 3 1
2 3 6

x
y
z

b
15
10
26

5 0 0
c= 0 3 0
0 0 6

=D

Determinante = 90

C-1 = 1/90

18 0 0
0 30 0
0 0 15

1/5 0 0
= 0 1/3 0
0
0 1/6

C = c-1 b
1/5 0
0
C = 0
1/3 0
0
0 1/6
1 0 0
B = 0 1 0
0 0 1

x
0
y = -1/3
z
-1/3

15
3
10 = 10/3
26
13/3
1/5 0
0 1/3
0
0

-2/5 -2/5
0
-1/3
-1/2
0

0
0
1/6

5 2 2
1 3 1
2 3 6

x
y
z

0
= -1/3
-1/3

3
+ 10/3
13/3

-2/5
0
-1/2

-2/5
-1/3
0

K=0
x(1)
0
(1)
y = -1/3
z(1)
-1/3

-2/5
0
-1/2

-2/5
-1/3
0

0
0 +
0

3
10/3 =
13/3

3
10/3
13/3

x(2)
0
y(2) = -1/3
z(2)
-1/3

-2/5
0
-1/2

-2/5
-1/3
0

3
3
-1/15
10/3 + 10/3 = 8/9
13/3
13/3
5/3

K=2
x(3)
0
(3)
y = -1/3
z(3)
-1/3

-2/5
0
-1/2

-2/5
-1/3
0

-1/15
3
8/9 + 10/3 =
5/3
13/3

K=3
x(4)
0
y(4) = -1/3
z(4)
-1/3

-2/5
0
-1/2

-2/5
-1/3
0

89/45
3
42/15 + 10/3
176/45
13/3

K=4
x(5)
0
y(5) = -1/3
z(5)
-1/3

-2/5
0
-1/2

-2/5
-1/3
0

71/225
3
347/225
37/27 + 10/3 = 5002/2025
307/135
13/3
4783/1350

K=5
x(6)
0
(6)
y = -1/3
z(6)
-1/3

-2/5
0
-1/2

-2/5
-1/3
0

347/225
3
6022/10125
5002/2025 + 10/3 = 1327/810
4783/1350 13/3
5233/10125

K=6
x(7)
0
y(7) = -1/3
z(7)
-1/3

-2/5
0
-1/2

-2/5
-1/3
0

6022/10125
1327/810
5233/10125

K=7
x(8)
0
(8)
y = -1/3
z(8)
-1/3

-2/5
0
-1/2

-2/5
-1/3
0

12026/5625
17999/6075
402887/121500

K=1

89/45
42/15
176/45

71/225
37/27
307/135

3
12026/5625
+ 10/3 = 17999/6075
13/3
402887/121500

3
16487/33750
+ 10/3 = 2761757/1822500
13/3
649807/303750

K=8
x(9)
0
(9)
y = -1/3
z(9)
-1/3

-2/5
0
-1/2

-2/5
-1/3
0

16487/33750
3
2761757/1822500 + 10/3 =
649807/303750
13/3

a.1.) Mtodo de Jacobi de forma escalar.


5x + 2y + 2z = 15
2x + 3y + 6z = 26
x + 3y + z =10
xi(k+1) = ( bi - j=i Aij xj(k) / Aii
15
b = 10
26

i = 1..n

A=

5 2 2
1 3 1
2 3 6

K=0

x1(1) = (15 (2 0 + 2 0)) /5 = 3


x2(1) = (10 (1 0 + 1 0)) /3 = 10/3
x3(1) = (26 (2 0 + 3 0)) /6 = 26/6

K=1

x1(2) = (15 (2 10/3 + 2 26/6)) /5 = -0067


x2(2) = (10 (1 3 + 1 26/6)) /3 = 089
x3(2) = (26 (2 3 + 3 10/3)) /6 = 167

K=2

x1(3) = (15 (2 089 + 2 167)) /5 = 1976


x2(3) = (10 (1 (-0067) + 1 167)) /3 = 2799
x3(3) = (26 (2 (-0067) + 3 089)) /6 = 3911

K=3

x1(4) = (15 (2 2799 + 2 3911 )) /5 = 0316


x2(4) = (10 (1 1976 + 1 3911)) /3 = 1371
x3(4) = (26 (2 1976 + 3 2799)) /6 = 2275

x(0) =

0
0
0

x1(5) = (15 (2 1371 + 2 2275 )) /5 = 1542


3

7008151/4556256
223931/91125
12439711/364500

x2(5) = (10 (1 0316 + 1 2275)) /3 = 2469


x3(5) = (26 (2 0316 + 3 1371)) /6 = 3542

K=4

K=5

x1(6) = (15 (2 2469 + 2 3542 )) /5 = 0595


x2(6) = (10 (1 1542 + 1 3542)) /3 = 1638
x3(6) = (26 (2 1542 + 3 2469)) /6 = 2585

K=6

x1(7) = (15 (2 1638 + 2 2585 )) /5 = 131


x2(7) = (10 (1 0595 + 1 2585)) /3 = 2273
x3(7) = (26 (2 0595 + 3 1638)) /6 = 3316

K=7

x1(8) = (15 (2 2273 + 2 3316 )) /5 = 0764


x2(8) = (10 (1 131 + 1 3316)) /3 = 1791
x3(8) = (26 (2 131 + 3 2273)) /6 = 276

K=8

x1(9) = (15 (2 1791 + 2 276 )) /5 = 1179


x2(9) = (10 (1 0764 + 1 276)) /3 = 2158
x3(9) = (26 (2 0764 + 3 1791)) /6 = 3183

b) Mtodo de Gauss Seidel de forma matricial.


5x + 2y + 2z = 15
2x + 3y + 6z = 26
x + 3y + z =10

5 2 2
1 3 1
2 3 6

x
y
z

B = I C-1 A
c = C-1 b

15
10
26

c=L

c=

5 0 0
1 3 0
2 3 6

L=

0 0 0
1 0 0
2 3 0

Determinante = 90

18 0 0
C-1 = 1/90 -6 30 0 =
-3 15 15
1 0 0
B = 0 1 0
0 0 1

1/5
0
-1/15 1/3
-1/30 -1/6

1/5
0
-1/5
1/3
-1/30 -1/6

C =

x
0
y = 0
z
0

1/5
0
0
-1/15 1/3
0
-1/30 -1/6 -1/6

-2/5
2/5
1/15

0
0
1/6

0
0
1/6

15
10 =
26

-2/5
-28/15
7/30

5 2 2
1 3 1
2 3 6

0 -2/5
0 2/15
0 1/15

3
7/3
13/6

x
3
y + 7/3
z
13/6

K=0
x(1)
y(1) =
z(1)

0
0
0

-2/5 -2/5
2/15 -28/15
1/15
7/30

0
0 +
0

3
7/3 =
13/6

3
7/3
13/6

0
0
0

-2/5
2/15
1/15

-2/5
-28/15
7/30

3
3
7/3 + 7/3
13/6
13/6

0
0
0

-2/5
2/15
1/15

-2/5
-28/15
7/30

6/5
3
7/5 + 7/3 =
149/90
13/6

K=1
x(2)
y(2) =
z(2)

6/5
= 7/5
149/90

K=2
x(3)
y(3) =
z(3)

16/9
-77/135
1429/540

-2/5
-28/15
7/30

K=3
x(4)
0
(4)
y = 0
z(4)
0

-2/5
2/15
1/15

-2/5
-28/15
7/30

16/9
-77/135 +
1429/540

3
7/3
13/6

2929/1350
-5432/2025
4943/1800

b.1.) Mtodo de Gauss Seidel de forma escalar.


xi(k+1) = ( bi - i-1j=1 Aij xj(k + 1) nj=i+1 Aij xj(k) / Aii

A=

5 2 2
1 3 1
2 3 6

15
b = 10
26

(0)

x =

i = 1..n

0
0
0

K=0

x1(1) = (15 (2 0 + 2 0)) /5 = 3


x2(1) = (10 (1 3 1 0)) /3 = 233
x3(1) = (26 (2 3 + 3 233)) /6 = 2168

K=1

x1(2) = (15 (2 233 + 2 2168)) /5 = 120


x2(2) = (10 (1 12 1 2168)) /3 = 2211
x3(2) = (26 (2 12 3 2211)) /6 = 2827

K=2

x1(2) = (15 (2 211 + 2 2827)) /5 = 0985


x2(2) = (10 (1 0985 1 2827)) /3 = 2062
x3(2) = (26 (2 0985 + 3 2062)) /6 = 2974

K=3

x1(3) = (15 (2 2062 + 2 2974 )) /5 = 0985


x2(3) = (10 (1 0985 1 2974)) /3 = 2014
x3(3) = (26 (2 0985 + 3 2014)) /6 = 2998

Trabajo realizado por el grupo 10.


Formado por:
6

Almudena Bolinches Briones


Nancy Falomir Blasco
Raquel Martnez Franco
Beatriz Lorenzo Lora

You might also like