Find the first two iteration of the Jacobi method for the following linear system, using $x^{(0)} = 0$

2.1k Views Asked by At

$$3x_{1} - x_{2} + x_{3} = 1,$$ $$3x_{1} + 6x_{2} + 2x_{3} = 0,$$ $$3x_{1}+3x_{2}+7x_{3} = 4$$

So, from this I got T = \begin{bmatrix} 0 & \frac{-1}{3} & \frac{1}{3} \\[0.3em] \frac{1}{2} & 0 & \frac{1}{3} \\[0.3em] \frac{3}{7} & \frac{3}{7} & 0 \end{bmatrix} $C= [-1/3, 0, -4/7]$

Then, I got $x_{1}^1 = 0.33$, $x_{2}^1 = 0, x_{3}^1 = -0.57$ and $x_{1}^2 = 0.33, x_{2}^2 = 0.833, x_{3}^2 = 0.142$

But, the answer in the book is $(0.1428571, -0.3571429, 0.4285714)$. Did I do something wrong? I am confused here. Can someone please help me understand this? Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

First iteration:

$$0.333333, \text{ }0.,\text{ }0.571429$$

Second iteration:

$$0.142857,\text{ }-0.357143\text{ },0.428571$$

So, it looks like somehow the sign of your $x_3$ on the first iteration got corrupted.

We rewrite the system as:

$$x_1 = \dfrac{1}{3} x_2 -\dfrac{1}{3}x_3 + \dfrac{1}{3} \\ x_2 = -\dfrac{1}{2}x_1 + 0 x_2 - \dfrac{1}{3}x_3 \\ x_3 = - \dfrac{3}{7}x_1 - \dfrac{3}{7}x_2 + \dfrac{4}{7}$$

Initial start point: $x^{(0)} = (x_1, x_2, x_3) = (0,0,0)$.

First iteration (substitute $x^{(0)}$ into the system to find the next set of values):

$$x_1 = 0 + 0 + \dfrac{1}{3}, x_2 = 0 + 0 + 0, x_ 3 = 0 + 0 +\dfrac{4}{7}$$

Now, you try the second iteration, just substitute the first iterations values into the three equations.