Question #249539

Consider the following tridiagonal system of linear equations:

[3 2 0 0 [x1 [12

2 3 2 0 x2 = 17

0 2 3 2 x3 14

0 0 2 3] x4 ] 7]

Solve this system using Thomas algorithm

Let 𝑥(0)T=[0 0 0 0] and solve the system using Jacobi, and Gauss-Seidel for at least five iterations


1
Expert's answer
2021-10-12T02:12:16-0400

Using Thomas algorithm:


a1=2/3,b1=12/3=4a_1=2/3,b_1=12/3=4

a2=2/(322/3)=6/5,b2=(1724)/(322/3)=27/5a_2=2/(3-2\cdot2/3)=6/5,b_2=(17-2\cdot4)/(3-2\cdot2/3)=27/5

a3=2/(326/5)=10/3,b3=(14227/5)/(326/5)=16/3a_3=2/(3-2\cdot6/5)=10/3,b_3=(14-2\cdot27/5)/(3-2\cdot6/5)=16/3

b4=(7216/3)/(3210/3)=1b_4=(7-2\cdot16/3)/(3-2\cdot10/3)=1


x4=b4=1x_4=b_4=1

x3=b3a3x4=16/310/3=2x_3=b_3-a_3x_4=16/3-10/3=2

x2=b2a2x3=27/562/5=3x_2=b_2-a_2x_3=27/5-6\cdot2/5=3

x1=b1a1x2=423/3=2x_1=b_1-a_1x_2=4-2\cdot3/3=2


Using Jacobi method:


x1(1)=12/3=4,x2(1)=17/3,x3(1)=14/3,x4(1)=7/3x_1^{(1)}=12/3=4,x_2^{(1)}=17/3,x_3^{(1)}=14/3,x_4^{(1)}=7/3

x1(2)=1/3(12217/3)=2/9x_1^{(2)}=1/3(12-2\cdot17/3)=2/9

x2(2)=1/3(1724214/3)=1/9x_2^{(2)}=1/3(17-2\cdot4-2\cdot14/3)=-1/9

x3(2)=1/3(14217/327/3)=2/3x_3^{(2)}=1/3(14-2\cdot17/3-2\cdot7/3)=-2/3

x4(2)=1/3(7214/3)=7/9x_4^{(2)}=1/3(7-2\cdot14/3)=-7/9

x1(3)=1/3(12+2/9)=110/27x_1^{(3)}=1/3(12+2/9)=110/27

x2(3)=1/3(1722/9+22/3)=161/27x_2^{(3)}=1/3(17-2\cdot2/9+2\cdot2/3)=161/27

x3(3)=1/3(14+2/9+27/9)=142/27x_3^{(3)}=1/3(14+2/9+2\cdot7/9)=142/27

x4(3)=1/3(7+22/3)=25/9x_4^{(3)}=1/3(7+2\cdot2/3)=25/9

x1(4)=1/3(122161/27)=2/81x_1^{(4)}=1/3(12-2\cdot161/27)=2/81

x2(4)=1/3(172110/272142/27)=45/81=5/9x_2^{(4)}=1/3(17-2\cdot110/27-2\cdot142/27)=-45/81=-5/9

x3(4)=1/3(142161/27225/9)=94/81x_3^{(4)}=1/3(14-2\cdot161/27-2\cdot25/9)=-94/81

x4(4)=1/3(72142/27)=95/81x_4^{(4)}=1/3(7-2\cdot142/27)=-95/81

x1(5)=1/3(12+25/9)=118/27=4.37x_1^{(5)}=1/3(12+2\cdot5/9)=118/27=4.37

x2(5)=1/3(1722/81+294/81)=1561/243=6.42x_2^{(5)}=1/3(17-2\cdot2/81+2\cdot94/81)=1561/243=6.42

x3(5)=1/3(14+25/9+295/81)=1414/243=5.82x_3^{(5)}=1/3(14+2\cdot5/9+2\cdot95/81)=1414/243=5.82

x4(5)=1/3(7+294/81)=755/243=3.11x_4^{(5)}=1/3(7+2\cdot94/81)=755/243=3.11


Using Gauss-Seidel method:

x1(1)=12/3=4x_1^{(1)}=12/3=4

x2(1)=1/3(1724)=3x_2^{(1)}=1/3(17-2\cdot4)=3

x3(1)=1/3(1423)=8/3x_3^{(1)}=1/3(14-2\cdot3)=8/3

x4(1)=1/3(728/3)=5/9x_4^{(1)}=1/3(7-2\cdot8/3)=5/9

x1(2)=1/3(1223)=2x_1^{(2)}=1/3(12-2\cdot3)=2

x2(2)=1/3(172228/3)=23/9x_2^{(2)}=1/3(17-2\cdot2-2\cdot8/3)=23/9

x3(2)=1/3(14223/925/9)=90/27=10/3x_3^{(2)}=1/3(14-2\cdot23/9-2\cdot5/9)=90/27=10/3

x4(2)=1/3(7210/3)=1/9x_4^{(2)}=1/3(7-2\cdot10/3)=1/9

x1(3)=1/3(12223/9)=62/27x_1^{(3)}=1/3(12-2\cdot23/9)=62/27

x2(3)=1/3(17262/27210/3)=155/81x_2^{(3)}=1/3(17-2\cdot62/27-2\cdot10/3)=155/81

x3(3)=1/3(142155/2721/9)=90/27=62/81x_3^{(3)}=1/3(14-2\cdot155/27-2\cdot1/9)=90/27=62/81

x4(3)=1/3(7262/81)=443/243x_4^{(3)}=1/3(7-2\cdot62/81)=443/243

x1(4)=1/3(122155/81)=662/243x_1^{(4)}=1/3(12-2\cdot155/81)=662/243

x2(4)=1/3(172662/243262/81)=2435/729x_2^{(4)}=1/3(17-2\cdot662/243-2\cdot62/81)=2435/729

x3(4)=1/3(1422435/7292443/243)=90/27=1.22x_3^{(4)}=1/3(14-2\cdot2435/729-2\cdot443/243)=90/27=1.22

x4(4)=1/3(721.22)=1.52x_4^{(4)}=1/3(7-2\cdot1.22)=1.52

x1(5)=1/3(1222435/729)=1.77x_1^{(5)}=1/3(12-2\cdot2435/729)=1.77

x2(5)=1/3(1721.7721.22)=3.67x_2^{(5)}=1/3(17-2\cdot1.77-2\cdot1.22)=3.67

x3(5)=1/3(1423.6721.52)=90/27=1.21x_3^{(5)}=1/3(14-2\cdot3.67-2\cdot1.52)=90/27=1.21

x4(5)=1/3(721.21)=1.53x_4^{(5)}=1/3(7-2\cdot1.21)=1.53


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS