0% found this document useful (0 votes)
444 views5 pages

Gauss Seidel MethodRTF

The Gauss Seidel method is used to solve systems of linear equations iteratively. It starts with an initial guess for the solution variables and iteratively improves the estimates. The document shows an example problem solved using Gauss Seidel over multiple iterations, with the error reducing each time. It also provides two additional example problems solved over several iterations, tracking the reduction in error at each step.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
444 views5 pages

Gauss Seidel MethodRTF

The Gauss Seidel method is used to solve systems of linear equations iteratively. It starts with an initial guess for the solution variables and iteratively improves the estimates. The document shows an example problem solved using Gauss Seidel over multiple iterations, with the error reducing each time. It also provides two additional example problems solved over several iterations, tracking the reduction in error at each step.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 5

Gauss Seidel Method

Problem 1:

12x1+3x2-5x3 = 1

x1+5x2-3x3 = 28

3x1+7x2-13x3 = 76

Find [x1, x2, x3] after 2 iterations, starting from [x1 x2 x3] = [1 0 1]

1−3 x 2 +5 x 3
x 1=
12
28−x 1−3 x 3
x 2=
5
76−3 x 1−7 x 2
x 3=
13
Iteration 1

[x1 x2 x3] = [1 0 1]

1−3 ( 0 ) +5(1)
x 1= =0.5
12
28−0.5−3(1)
x 2= =4.9
5
76−3(0.5)−7(4.9)
x 3= =3.0923
13
New: [x1 x2 x3] = [0.5 4.9 3.0923]

Old: [x1 x2 x3] = [1 0 1]

|∊a|1=|0.5−1
0.5 |
×100=100

|∊ |2=| 4.9 |×100=100


4.9−0
a

|∊ |3=| 3.0923 |×100=67.662


3.0923−1
a

Max (100, 100, 67.662) =100%

Iteration 2

[x1 x2 x3] = [0.5 4.9 3.0923]


1−3 x 2 +5 x 3 1−3 ( 04.9 )+ 5(3.0923)
x 1= = =0.14679
12 12
28−x 1+ 3 x 3 28−0.14679−3(3.0923)
x 2= =¿ =3.7153
5 5
76−3 x 1−7 x 2 76−3(0.14679)−7 (3.7153)
x 3= = =3.8118
13 13
New: [x1 x2 x3] = [0.14679, 3.7153, 3.8118]

Old: [x1 x2 x3] = [0.5 4.9 3.0923]

|∊a|1=|0.14679−0.5
0.14679 |
× 100=240.62

|∊ |2=| 3.7153 |×100=31.887


3.7153−4.9
a

|∊ |3=| 3.8118 |×100=18.876


3.8118−3.0923
a

Max ( 240.62,31.887, 18.876 ¿=240.62


At the end of 6th iteration [0.99919, 3.0001, 4.0001]

Exact [1 3 4]

Problem 2:

Perform Three iterations to get the solution of

2x1-x2-7x3 = 3

5x1-2x2+3x3 = -1

-3x1+9x2+x3 = 2

Also determine %∊R after the third iteration

Rearrange

5x1-2x2+3x3 = -1

-3x1+9x2+x3 = 2

2x1-x2-7x3 = 3

Formula:

1
x 1= (−1+2 x 2−3 x 3 )
5
1
x 2= (2+ 3 x 1−x 3 )
9
−1
x 3= (3−2 x 1+ x2 )
7
x1(0) = x2(0) = x3(0) = 0

Iteration 1

1
x 1=
5
[−1+2 ( 0 ) −3 ( 0 ) ]=−0.20
1
x 2= [2=3 (−0.20 )−0]=0.15556
9
−1
x 3=
7
[ 3−2 (−0.20 )+ 0.15556 ]=−0.50794

Iteration 2

1
x 1=
5
[−1+2 ( 0.15556 ) −3 (−0.50794 ) ]=0.16610
1
x 2=
9
[ 2+3 ( 0.16610 )− (−0.50794 ) ]=.33403
−1
x 3=
7
[ 3−2 ( 0.16610 ) +.33403 ]=−0.42883
Iteration 3

1
x 1=
5
[−1+2 ( .33403 )−3 (−0.42883 ) ]=0.19091
1
x 2=
9
[ 2+3 ( 0.19091 )−(−0.42883 ) ]=0.33351
−1
x 3=
7
[ 3−2 ( 0.19091 )+ 0.33351 ]=−0.42167

|∊a|1= |0.190919−0.16610
0.19091 |× 100=12.99
|∊a|2= |0.33351−.33403
0.33351 |×100=0.16
|∊a|3= |−0.42167−(−0.42883)
−0.42167 |
× 100=1.70

Problem 3

The system of equations

[ ][ ] [ ]
25 5 1 x1 106.8
64 8 1 x2 = 177.2
144 12 1 x3 279.2

Initial Guess: Assume an initial guess of:

[ ][]
x1 1
x2 = 2
x3 5

106.8−5 x2 −x3
x 1=
25
177.2−64 x 2−x 3
x 2=
8
279.2−144 x 1−12 x 2
x 3=
1

Iteration 1

106.8−5 ( 2 )−5
x 1= =3.6720
25
177.2−64 ( 3.6720 )−5
x 2= =−7.8510
8
279.2−144 ( 3.6720 )−12(−7.8510)
x 3= =−155.36
1

|∊a|1= |3.6720−1.0000
3.6720 |×100=72.76
|∊a|2= |−7.8510−2.0000
−7.8510 |×100=125.47
|∊a|3= |−155.36−5.0000
−155.36 |×100=103.22
Iteration 2
Using

[][ ]
x1 3.7620
x 2 −7.8510
=
x 3 −155.36

106.8−5 (−7.8510 )−155.36


x 1= =12.056
25
177.2−64 ( 12.056 )−155.36
x 2= =−54.882
8
279.2−144 ( 12.056 )−12(−54.882)
x 3= =−798.34
1

|∊a|1= |3.6720−1.0000
3.6720 |×100=72.76
|∊a|2=|−7.8510−2.0000
−7.8510 |×100=125.47
|∊ |3=| −155.36 |×100=103.22
−155.36−5.0000
a

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy