# Is this solution accidentally using Jacobi method instead of...

1. Jul 13, 2017

### s3a

1. The problem statement, all variables and given/known data
The problem is attached.

2. Relevant equations
Isolating each x_i.

3. The attempt at a solution
I watched this video for the Jacobi method.:

I also watched this video for the Gauss-Seidel method.:

At least based on the videos mentioned above, it seems that the difference between the Gauss-Seidel method and the Jacobi method is that the Gauss-Seidel method always computes the the latest x_i, by using already-computed values from the current iteration, if available, unlike the Jacobi method which seems to just use values from the previous iteration, even if values from the current iteration are available.

So, am I correct in thinking that the solution is using the Jacobi method, despite the question asking for the Gauss-Seidel method to be used?

Any input would be greatly appreciated!

#### Attached Files:

• ###### 4p14.pdf
File size:
66.8 KB
Views:
26
2. Jul 13, 2017

### Ray Vickson

I will not watch the videos, but judging from the first frame in the second video, it is using Gauss-Seidel, not Jacobi. You can tell that by looking at the calculation of the updated $x_2$, which does use the newly-updated value of $x_1$, not the old value of $x_1$. I don't know what the first video is doing, because I refuse to watch it. (The standard PF policy is for you to type everything out, not to upload videos, etc, although sometimes you may find a helper who is willing to look at updated material---diagrams excepted, of course.)

3. Jul 13, 2017

### s3a

Sorry; it's just that viewing uploaded PDFs is not something I see as inconvenient, so I tend to forget that not everyone feels the same.

Also, the videos were uploaded as background information; I wasn't expecting anyone to watch them in full (unless desired).

It looks better in the PDF file, but here's the problem statement and its solution, typed out.:
Problem statement:
Carry out the first three iterations of the solution of the following system of equations using the GaussSeidel iterative method. For the first guess of the solution, take the value of all the unknowns to be zero.
$8 x_1 + 2x_2 + 3x_3 = 51$
$2x_1 + 5x_2 + x_3 = 23$
$-3x_1 + x_2 + 6x_3 = 20$

Solution:
The essence of the Gauss-Seidel iterative method is given by x_1 = 1/a_(ii) [b_i - SIGMA j = 1, j != 1 to j = n of a_(ij) x_j], i = 1, 2, . . ., n

First Iteration:
Starting with [x_1^(0) x_2^(0) x_3^(0) = [0 0 0], x_1^(1) = [51 - 2(0) - 3(0)]/8 = 6.375, x_2^(1) = [23 - 2(0) - 0]/5 = 4.6, and x_3^(1) = [20 + 3(0) - 0]/6 = 3.3333.

Second Iteration:
x_1^(0) = [51 - 2(4.6) - 3(3.3333)]/8 = 3.9750, x_2^(2) = [23 - 2(6.375) - 3.3333]/5 = 6.9167, and x_3^(2 -- in the PDF this is a 1, instead of a 2, but I think that it's a mistake) = [20 + 3(6.375) - 4.6]/6 = 5.7542.

Third Iteration:
x_1^(3) = [51 - 2(6.9167) - 3(5.7542)]/8 = 2.488, x_2^(3-- in the PDF this is a 2, instead of a 3, but I think that it's a mistake) = [23 - 2(3.9750) - 5.7542]/5 = 1.8592, and x_3^(3 -- in the PDF this is a 1, instead of a 3, but I think that it's a mistake) = [20 + 3(3.9750) - 6.9167]/6 = 4.1681.

So, am I correct in thinking that the solution of the problem statement in the PDF (not a problem from a video -- the videos were just background information) is using the Jacobi method, despite the question asking for the Gauss-Seidel method to be used?

4. Jul 14, 2017

### Ray Vickson

If that is what he/she does in the first video then yes, indeed, that is the Jacobi method.

However, as I stated clearly already, the second video looks to me like it really is using the Gauss-Seidel method, exactly as advertised. Go back and read my previous response for the reasons. Perhaps the terminology "first frame in the second video" confused you. I meant the second video, but only the beginning picture that appears on the screen almost as an icon. It can be seen without watching the video, but later frames require watching it.

5. Jul 14, 2017

### s3a

Actually, I understood what you had said about the video; I just wanted to be sure that I wasn't overlooking something in the PDF, while thinking that I understood something I haven't understood (and if I was, it'd be a learning opportunity).

Anyways, thanks for confirming that I was right about the PDF accidentally using the Jacobi method instead of the Gauss-Seidel method. :)

6. Jul 14, 2017

### Ray Vickson

No, I never said that; you are mis-quoting me! The second video shows the Gauss-Seidel method. I suspect that the first video shows the Jacobi method, if indeed what you wrote before came from the first video.

Let me repeat it one more (and very last) time: the second video shows that he/she is updating the value of $x_2$ by using the already-updated value of $x_1$. That is how Gauss-Seidel works. It is not what we do in Jacobi.

7. Jul 14, 2017

### s3a

The problem statement and solution I typed is not from any of the two videos; it's from the PDF file. Basically, completely ignore the videos; imagine that I hadn't even mentioned them in this thread.

So, the PDF file's solution is using the Jacobi method, instead of the Gauss-Seidel method, right?

8. Jul 14, 2017

### Ray Vickson

You tell me. Is it doing "Jacobi" updating, or "Gauss-Seidel" updating?

9. Jul 14, 2017

### s3a

I believe it's doing Jacobi updating, because, for example, $x_3$ of the current iteration is using the values $x_1$ and $x_2$ of the previous iteration, rather than the ones just-recently computed in the same/current iteration.

So, I'm correct, right?