0% found this document useful (0 votes)
18 views6 pages

EEMath 12 Lesson 10 11

The document discusses Jacobi iteration and Gauss Seidel methods for solving systems of equations. It provides examples of applying each method to sample systems. The Jacobi method solves for each variable using the previous iteration's values while Gauss Seidel immediately uses updated values.

Uploaded by

Vanvan Biton
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

EEMath 12 Lesson 10 11

The document discusses Jacobi iteration and Gauss Seidel methods for solving systems of equations. It provides examples of applying each method to sample systems. The Jacobi method solves for each variable using the previous iteration's values while Gauss Seidel immediately uses updated values.

Uploaded by

Vanvan Biton
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ILOILO SCIENCE AND TECHNOLOGY UNIVERISTY

College of Engineering and Architecture

Lesson 10 & 11: Jacobi Iteration and Gauss Seidel Method

Objectives:
After this lesson, the student will learn how to use Jacobi Iteration and Gauss Seidel
Method as a means to find the roots of system equations using MS Excel app.

Discussion:
This modification is no more difficult to use than the Jacobi method, and it often requires
fewer iterations to produce the same degree of accuracy. With the Jacobi method, the values of
𝑥𝑖 obtained in the nth approximation remain unchanged until the entire (n+1) approximation has
been calculated. With the GaussSeidel method, on the other hand, you use the new values of
each 𝑥𝑖 as soon as they are known. That is, once you have determined 𝑥1 from the first equation,
its value is then used in the second equation to obtain the new 𝑥2 . Similarly, the new 𝑥1 and 𝑥2
are used in the third equation to obtain the new 𝑥3 and so on. This procedure is demonstrated in
sample problems.

Jacobi Iteration Method Gauss Seidel Method


The system given by

To begin, solve the 1st


equation for 𝒙𝟏 , the 2nd
equation for 𝒙𝟐 and so on
to obtain the rewritten
equations:

For next iteration


ILOILO SCIENCE AND TECHNOLOGY UNIVERISTY
College of Engineering and Architecture

Sample Problem #1: Applying the Jacobi Iteration Method

Use the Jacobi iteration method to the solution to the system of equations given in
Example 1.

𝟓𝒙𝟏 − 𝟐𝒙𝟐 + 𝟑𝒙𝟑 = −𝟏


−𝟑𝒙𝟏 + 𝟗𝒙𝟐 + 𝒙𝟑 = 𝟐
𝟐𝒙𝟏 − 𝒙𝟐 − 𝟕𝒙𝟑 = 𝟑

Step 1: Input the equations in spreadsheet and make a matrix like shown below. The data already
arranged according to dominance.

Step 2: Find the new equation for 𝑥1 , 𝑥2 𝑎𝑛𝑑 𝑥3 in order to obtain new value of 𝑥1 , 𝑥2 𝑎𝑛𝑑 𝑥3 .

1 2 3
𝑥1 = − + 𝑥2 − 𝑥3
5 5 5
2 3 1
𝑥2 = + 𝑥1 − 𝑥3
9 9 9
3 2 1
𝑥3 = − + 𝑥1 − 𝑥2
7 7 7

Step 3: The first computation is identical to that given, that is, using (𝑥1 , 𝑥2 , 𝑥3 ) = (0,0,0) as the
initial approximation, you obtain the following value 𝑥1 , 𝑥2 , 𝑥3 for the 1st iteration.
1 2 3 1 2 3
𝑥1 = − + 𝑥2 − 𝑥3 = − + (0) − (0) = −0.2
5 5 5 5 5 5
2 3 1 2 3 1
𝑥2 = + 𝑥1 − 𝑥3 = + (0) − (0) = 0.22222
9 9 9 9 9 9
3 2 1 3 2 1
𝑥3 = − + 𝑥1 − 𝑥2 = − + (0) − (0) = −0.42857
7 7 7 7 7 7

Step 4: For the next iteration, now that you have a new value for 𝑥1 = −0.2, 𝑥2 =
0.22222 & 𝑥3 = −0.42857, however, use it to compute a new value.
ILOILO SCIENCE AND TECHNOLOGY UNIVERISTY
College of Engineering and Architecture

1 2 3 1 2 3
𝑥1 = − + 𝑥2 − 𝑥3 = − + (0.22222) − (−0.42857) = 0.14603
5 5 5 5 5 5
2 3 1 2 3 1
𝑥2 = + 𝑥1 − 𝑥3 = + (−0.2) − (−0.42857) = 0.20317
9 9 9 9 9 9
3 2 1 3 2 1
𝑥3 = − + 𝑥1 − 𝑥2 = − + (−0.2) − (0.22222) = −0.51746
7 7 7 7 7 7

Step 5: Follow step 1 to 4 until you get the roots of the equation. Stop at the iteration when the
next roots are repeated or same value of roots.

Therefore, the roots of linear equations 𝑥1 = 0.186, 𝑥2 = 0.331, 𝑥3 = −0.423 at 17th iteration.
ILOILO SCIENCE AND TECHNOLOGY UNIVERISTY
College of Engineering and Architecture

Sample Problem #1: Applying the Gauss Seidel Method

Use the Gauss-Seidel iteration method to the solution to the system of equations given in
Example 1.

𝟓𝒙𝟏 − 𝟐𝒙𝟐 + 𝟑𝒙𝟑 = −𝟏


−𝟑𝒙𝟏 + 𝟗𝒙𝟐 + 𝒙𝟑 = 𝟐
𝟐𝒙𝟏 − 𝒙𝟐 − 𝟕𝒙𝟑 = 𝟑

Step 1: Same as Jacobi iteration method


Step 2: Find the new equation for 𝑥1 , 𝑥2 𝑎𝑛𝑑 𝑥3 in order to obtain new value of 𝑥1 , 𝑥2 𝑎𝑛𝑑 𝑥3 .

1 2 3
𝑥1 = − + 𝑥2 − 𝑥3
5 5 5
2 3 1
𝑥2 = + 𝑥1 − 𝑥3
9 9 9
3 2 1
𝑥3 = − + 𝑥1 − 𝑥2
7 7 7

Therefore, the roots of linear equations 𝑥1 = 0.186, 𝑥2 = 0.331, 𝑥3 = −0.423 at 11th iteration.
ILOILO SCIENCE AND TECHNOLOGY UNIVERISTY
College of Engineering and Architecture

Sample Problem #2: Using Jacobi Iteration Method

For the matrix given:

For system diagonal:

𝟑𝒙𝟏 − 𝟎. 𝟏𝒙𝟐 − 𝟎. 𝟐𝒙𝟑 = 𝟕. 𝟖𝟓


𝟎. 𝟏𝒙𝟏 + 𝟕𝒙𝟐 − 𝟎. 𝟑𝒙𝟑 = −𝟏𝟗. 𝟑
𝟎. 𝟑𝒙𝟏 − 𝟎. 𝟐𝒙𝟐 + 𝟏𝟎𝒙𝟑 = 𝟕𝟏. 𝟒
Solving each equation for unknown in main diagonal:

7.85 + 0.1𝑥2 + 0.2𝑥3


𝑥1 =
3
−19.3 − 0.1𝑥1 + 0.3𝑥3
𝑥2 =
7
71.4 − 0.3𝑥1 + 0.2𝑥2
𝑥3 =
10

Follow step 1 to 4 until you get the roots of the equation. Stop at the iteration when the next
iteration are repeated roots or same value of roots.

Therefore, the roots of linear equations 𝑥1 = 3, 𝑥2 = −2.5, 𝑥3 = 7 at 8th iteration.


ILOILO SCIENCE AND TECHNOLOGY UNIVERISTY
College of Engineering and Architecture

Sample Problem #2: Using Gauss Seidel Method

For system diagonal:

𝟑𝒙𝟏 − 𝟎. 𝟏𝒙𝟐 − 𝟎. 𝟐𝒙𝟑 = 𝟕. 𝟖𝟓


𝟎. 𝟏𝒙𝟏 + 𝟕𝒙𝟐 − 𝟎. 𝟑𝒙𝟑 = −𝟏𝟗. 𝟑
𝟎. 𝟑𝒙𝟏 − 𝟎. 𝟐𝒙𝟐 + 𝟏𝟎𝒙𝟑 = 𝟕𝟏. 𝟒
Solving each equation for unknown in main diagonal:

7.85 + 0.1𝑥2 + 0.2𝑥3


𝑥1 =
3
−19.3 − 0.1𝑥1 + 0.3𝑥3
𝑥2 =
7
71.4 − 0.3𝑥1 + 0.2𝑥2
𝑥3 =
10

Follow step 1 to 4 until you get the roots of the equation. Stop at the iteration when the next
iteration are repeated roots or same value of roots.

You might also like