Download as docx
Download as docx
You are on page 1of 9

NUMERICAL METHODS

School Of Engineering Of Oils

METHOD OF JACOBI
The methods iterativos use for systems of a big
number of equations with a high percentage of
elements zero.

A solution method of
[ A ] nxn [ x ]nx 1 =[ b ] nx1
An initial matriz is chosen Q that is diagonal and
whose diagonal elements are the same that those of
the matriz A.

In the method of Gauss-Seidel the updated values of


xi substitute immediately the previous values, while
in the Jacobi method all component piece of news
of the vector is calculated before to carry out the
replacement.

Diego F.
Industrialist university Of Santander
I Semester of 2010
NUMERICAL METHODS
School Of Engineering Of Oils

In the method of Gauss-Seidel the xi


calculations depend of x1, x2..., xi-1

All the xi are obtained from the diagonal matriz

a11 a12 ⋯ a1 m


[
A= a21 a22 ⋯ a2 m
⋮ ⋮
an 1 a n2 ⋯ a nm
]
b 1−a 12 x 2−…
x 1=
a11

b 2−a 21 x 1−…
x 2=
a 22

b 3−a31 x 1−…
x 3=
a 33
b1
x 1=
a11

x 1=∂ 1
x 2=∂ 2
x 3=∂ 3

Diego F.
Industrialist university Of Santander
I Semester of 2010
NUMERICAL METHODS
School Of Engineering Of Oils

x 1=φ 1
x 2=φ 2
x 3=φ 3

Now it is possible to calculate the approximate


errors relative, with regard to each of the unknowns:
∂ 1−φ 1
E 1= x 100
∂1

∂ 2−φ2
E 2= x 100
∂2

∂ 3−φ 3
E 3= x 100
∂3

The process is even repeated


that the error is minor than one value prearranged

EXERCISE JACOBI

to solve the following equations system


12 x 1 +3 x 2 - 5 x 3=1

x 1 +5 x2 +3 x3 =28

Diego F.
Industrialist university Of Santander
I Semester of 2010
NUMERICAL METHODS
School Of Engineering Of Oils

3 x1 + 7 x2 +13 x 3 =76

Coefficients of the matriz:

12 3 −5
[
[ A ]= 1 5 3
3 7 13 ]
With Initial Values
x1 1

[ ]
x2
x3
[]
= 0
1
It is checked if the matriz is diagonally domineering

12 3 −5 |a11|=|12|⇒ 12≥|a 12|+|a13|=|3|+|−5|=8

[
[ A ]= 1 5 3
3 7 13 ] |a 22|=|5|⇒5≥|a 21|+|a23|=|1|+|3|=4

|a33|=|13|⇒13≥|a 31|+|a32|=|3|+|7|=10

All the inequality is fulfilled and at


least a line is definitely major.

Diego F.
Industrialist university Of Santander
I Semester of 2010
NUMERICAL METHODS
School Of Engineering Of Oils

The solution must converge using the Jacobi


method

Re-writing every equation.


12 3 −5 x1 1 x1 1

[ 3 7 13 x
3
][ ] [ ]
1 5 3 x 2 = 28
76 [ ][]
x2 = 0
x3 1

1−3 x 2 +5 x 3 1−3 ( 0 ) +5 ( 1 )
x 1= x 1= =0,5
12 12

28−x 1−3 x 3 28−( 1 )−3 ( 1 )


x 2= x 2= =4,8
5 5

76−3 x 1−7 x 2 76−3 ( 1 )−7 ( 0 )


x 3= x 3= =5 , 615
13 13

Diego F.
Industrialist university Of Santander
I Semester of 2010
NUMERICAL METHODS
School Of Engineering Of Oils

The approximate relative absolute error

0,5−1
|∈a|1=| |×100=100%
0,5
4,8−0
|∈a|2=| |×100=100%
4,8

5,615−1
|∈a|3=| |×100=82,19%
5,615

The maximum approximate relative absolute error


after the first iteration it is a 100 %.

Iteration 1

x1 0,5

[ ][ ]
x 2 = 4,8
x 3 5 , 615

Diego F.
Industrialist university Of Santander
I Semester of 2010
NUMERICAL METHODS
School Of Engineering Of Oils

(1)
Replacing the values of [X ] inside the
equations:

1−3 ( 4,8 )+5 ( 5 , 615 )


x 1= =1 , 223
12

28−( 0,5 ) −3 (5 , 615 )


x 2= =2 ,131
5

76−3 ( 0,5 ) −7 ( 4,8 )


x 3= =3 ,146
13

Iteration 2

x 1 1 , 223

[ ][ ]
x 2 = 2 , 131
x 3 3 ,146

1,223−0,5
|∈a|1=| |×100=59,12%
1,223
Diego F.
Industrialist university Of Santander
I Semester of 2010
NUMERICAL METHODS
School Of Engineering Of Oils

2,131−4,8
|∈a|2=| |×100=125,25%
2,131

3,146−5,615
|∈a|3=| |×100=78,48%
3,146

The maximum relative absolute error is 125,25 %.


This is an error bigger than the obtained one in the
iteration 1.

On having kept on iterating, it is obtained

Iteration a1 a2 a3
1 0,500 100,00 4,800 100,00 5,615 82,19
2 1,223 59,12 2,131 125,27 3,146 78,48
0,862 41,96 3,468 38,55 4,417 28,76
1,057 18,46 2,778 24,84 3,780 16,84
0,964 9,62 3,121 10,99 4,107 7,95
1,014 4,96 2,943 6,03 4,14
0,999 0,15 3,002 0,19 0,14

Diego F.
Industrialist university Of Santander
I Semester of 2010
NUMERICAL METHODS
School Of Engineering Of Oils

3 3,943
4 4,002
5
6
11

The obtained solution is:


x1 0 . 999 x1 1

[ ][ ] [ ][]
x 2 = 3 . 002
x3 4 . 002
x2 = 3
x3 4

Diego F.
Industrialist university Of Santander
I Semester of 2010

You might also like