Lecture10 - 1 LECTURE 3.1B Overview: Thomas Algorithm for...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 LECTURE 3.1B Dr. Vyas Overview: Thomas Algorithm for solving system with a Tri-Diagonal Matrix Optimizing the Matlab program for faster computation Examples/Demos I. Tri-diagonal Matrix 1. The system of linear algebraic equations resulting in a tri-diagonal matrix commonly occurs in scientific and engineering computation. For example, the numerical solution to a second order linear ODE 1 ( ) ( ) ( ) y p t y q t y r t ′′ = + + with the boundary conditions, ( ) , ( ) y a y b α β = = is obtained by solving the following system of linear equations, as represented in the matrix form: 2 1 1 1 2 1 2 1 1 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 2 1 1 1 2 2 1 0 0 1 2 1 0 0 1 2 1 0 0 1 2 N N N N N N N h q h p y h p h q h p y y h p h q h p y h p h q - - - - - - - + - - - + - - - + - - - + M M 2 1 0 2 2 2 2 2 1 1 N N N h r e h r h r h r e - - - + - = - - + M 2. In order to solve a tri-diagonal system of linear equations without having to resort to a full fledged Gauss-Elimination method or inversion of the coefficient matrix, we need to come up with a procedure that eliminates the lower diagonal (aka sub- diagonal) and converts the tridiagonal matrix to an upper triangular matrix . This procedure is well known as the Thomas algorithm . 3. Instead of following an outlined algorithm, the algorithm will be deduced from a 4 4 × size matrix with usual symbolic notation for elements. Thereafter, a tridiagonal system with numbers will be used to illustrate the implementation, and finally a Matlab code will be constructed and verified. 4. Consider the following tridiagonal system of equations. 11 12 1 1 21 22 23 2 2 32 33 34 3 3 43 44 4 4 0 0 0 0 0 0 a a x b a a a x b a a a x b a a x b       =     AX = B The vector 21 32 43 [ , , ] a a a is a vector of sub-diagonal elements, whereas the vector 12 23 34 [ , , ] a a a is a vector of super-diagonal elements and 11 22 33 44 [ , , , ] a a a a forms a vector of diagonal (or main diagonal) elements. 1 The details of derivation and further discussion of numerical solution will be covered as part of the section 9.9 in the textbook. Students will be required to recapitulate this algorithm at that time.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 5. It helps to write the tridiagonal matrix into the equation form for a thorough understanding of the algorithm derivation. To that end, let us write: 11 1 12 2 3 4 1 0 0 a x a x x x b + + + = …………………………….(1) 21 1 22 2 23 3 4 2 0 a x a x a x x b + + + = …………………………. .(2) 1 32 2 33 3 34 4 3 0 x a x a x a x b + + + = …………………………. ..(3)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

Lecture10 - 1 LECTURE 3.1B Overview: Thomas Algorithm for...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online