0

I have the following 3 linear systems: $$4x_1 + x_2 - x_3 = 5$$ $$-x_1 + 3x_2 + x_3 = -4$$ $$2x_1 + 2x_2 + 5x_3 = 1$$ for x^(0) = 0

Then, I write it as following: $$x_1 = -1/4x_2 + 1/4x_3 + 5/4$$ $$x2 = 1/3x_1 - 1/3x_3 - 4/3$$ $$x3 =-2/5x_1 -2/5x_2 + 1/5 $$
First iteration of Jacobi would be x^(1) = (5/4, -4/3, 1/5)

Then I perform the second iteration of the jacobi in below: $$x_1 = -1/4*(-4/3) + 1/4*(1/5) + 5/4$$ $$x_2 = 1/3*(5/4) -1/3*(1/5) - 4/3$$ $$x_3 = -2/5*(5/4) -2/5*(-4/3) + 1/5$$ For the second iteration of Jacobi, I got x^(2) = (1.63333, -0.9833333, 0.23333)

However, the solution shows that it is x^(2) = (1.2500000, -1.3333, 0.200000) Could you please help me fixing my mistake?

ClassicStyle
  • 1,399
user156407
  • 43
  • 1
  • 5

1 Answers1

4

I did the calculations and got the same answer as yours.

$x_0 = [0,0,0]$

$x_1 = [1.2500 -1.3333 0.2000]$

$x_2 = [1.6333 -0.9833 0.2333]$

SO it seems that you book seems to give $x_1$ as $x_2$, or it might have assumed $x_1=[0,0,0]$.

Hope it helps

Julia
  • 86