0% found this document useful (0 votes)
107 views

Thomas Algorithm

The Thomas algorithm is a method for solving tridiagonal systems of linear equations. It involves two steps: (1) calculating quantities βk and γk to eliminate values above and below the diagonal, and (2) back-substituting to solve for the unknowns xk. The document provides an example of applying the algorithm to solve a 3x3 system, resulting in solutions of x1 = 0.4286, x2 = 0.7143, and x3 = 0.4286.

Uploaded by

Reshab Sahoo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views

Thomas Algorithm

The Thomas algorithm is a method for solving tridiagonal systems of linear equations. It involves two steps: (1) calculating quantities βk and γk to eliminate values above and below the diagonal, and (2) back-substituting to solve for the unknowns xk. The document provides an example of applying the algorithm to solve a 3x3 system, resulting in solutions of x1 = 0.4286, x2 = 0.7143, and x3 = 0.4286.

Uploaded by

Reshab Sahoo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

THOMAS ALGORITHM

Consider the tridiagonal system

b1 c 1 0 x f1

[ a2 b2 c2 y = f 2
0 a3 b 3 z f3 ][ ] [ ]
Apply Gauss elimination algorithm for the solution of this system.

Consider the augmented matrix of the system.

b 1 c1 0 f1

(
[ A /b ] = a2 b2 c 2 f 2
0 a3 b3 f 3|) [Set β 1=b 1]

β1 c 1 0 f 1

( a2 b2 c 2 f 2
0 a3 b 3 f 3 |) R1 →
R1
β1

c1 f1

( |)
1 0
β1 β1 f1
[Set γ 1= ]
a2 b2 c2 f 2 β1
0 a3 b3 f 3

c1

( |)
1 0 γ1
β1
f R2 → R2 −a2 R 1
a2 b2 c2 2
f
0 a3 b3 3

c1

( | )
1 0 γ1
β1 c1
f −a . γ β 2=b 2−a2
0 β2 c2 2 2 1 β1
f
0 a3 b3 3
c1

( |)
1 0
β1 γ1
f 2−a2 . γ 1
c2 γ2 γ 2=
0 1 β2
β2 f 3
0 a3 b3

c1

( | )
1 0
β1
γ1
c2
0 1 γ2 R3 → R3 −a3 R2
β2
f 3−a 3 γ 2
c2
0 0 b3−a3
β2

c1

( | )
1 0
β1 γ1
c2
c2 γ2 β 3=b 3−a3
0 1 β2
β 2 3 3 γ2
f −a
0 0 β3

c1

( |)
1 0
β1 γ1
R3 f 3−a3 γ 2
c 2 γ2 R3 → ; γ 3=
0 1 β3 β3
β 2 γ3
0 0 1
Consider the tridiagonal system of ‘n’ linear equations in ‘n’ unknowns of the form

a k x k 1  b k x k  c k x k 1  f k ; k  1, 2,..., n

where a1  c n  0 . In the matrix form of the tridiagonal system, the coefficients a k , b k


and c k represent the elements below, on and above the diagonal respectively.

The Thomas Algorithm for the solution to this system is divided into two steps :

Step 1 : Calculate the quantities

1  b1
f
1  1
1
c 
k  b k  a k  k 1  ; k  2,3,..., n
 k 1 
f  a k  k 1
k  k ; k  2,3,..., n
k

Step 2 : The solution of the tridiagonal system is given by

xn  n
c 
x k   k  x k 1  k  ; k  (n  1), (n  2),..., 2,1
 k 

Problem(s)

1. Solve the system of equations

4x1  x 2 1
 x1  4x 2  x 3  2
 x 2  4x 3  1

by Thomas Algorithm, correct to 4 decimal places.

x1  0.4286 ; x 2  0.7143 ; x 3  0.4286


Ans :

You might also like