{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture20-21

# Lecture20-21 - Tridiagonal Matrix Forward elimination ek f...

This preview shows pages 1–13. Sign up to view the full content.

Tridiagonal Matrix Forward elimination Back substitution n 3 2 k r f e r r g f e f f 1 k 1 k k k k 1 k 1 k k k k , , , = - = - = - - - - 1 2 3 2 n 1 n k f x g r x f r x k 1 k k k k n n n , , , , , - - = - = = + Use factor = e k / f k - 1 to eliminate subdiagonal element Apply the same matrix operations to right hand side

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

View Full Document
Hand Calculations: Tridiagonal Matrix - = - - - - - - 5 3 2 5 3 x x x x 25 1 5 0 0 0 5 0 2 1 0 0 1 5 2 0 0 2 1 4 3 2 1 . . . . = - - = - = = - - - = - = = - - - = - = = - - - = - = - = - - - = - = = - - - = - = 4 1 1 5 0 5 3 r f e r r 1 5 0 1 5 0 25 1 g f e f f 1 1 1 1 2 r f e r r 1 1 1 1 2 g f e f f 1 3 1 2 5 r f e r r 1 2 1 2 5 g f e f f 3 3 4 4 4 3 3 4 4 4 1 1 2 2 3 2 2 3 3 3 1 1 2 2 2 1 1 2 2 2 ) ( . . ) . ( . . ) ( ) ( ) ( ) ( 1 1 2 2 3 f x g r x 2 1 3 1 1 f x g r x 3 1 4 5 0 1 f x g r x 4 1 4 f r x 1 2 1 1 1 2 3 2 2 2 3 4 3 3 3 4 4 4 = - - - = - = = - - - = - = = - - = - = = = = ) )( ( ) )( ( ) )( . ( (a) Forward elimination (b) Back substitution
MATLAB M-file: Tridiag

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

View Full Document
» [e,f,g,r] = example e = 0 -2.0000 4.0000 -0.5000 1.5000 -3.0000 f = 1.0000 6.0000 9.0000 3.2500 1.7500 13.0000 g = -2.0000 4.0000 -0.5000 1.5000 -3.0000 0 r = -3.0000 22.0000 35.5000 -7.7500 4.0000 -33.0000 » x = Tridiag (e, f, g, r) x = 1 2 3 -1 -2 -3 Example: Tridiagonal matrix function [e,f,g,r] = example e=[ 0 -2 4 -0.5 1.5 -3]; f=[ 1 6 9 3.25 1.75 13]; g=[-2 4 -0.5 1.5 -3 0]; r=[-3 22 35.5 -7.75 4 -33]; 33 4 75 . 7 5 . 35 22 3 x x x x x x 13 3 3 75 . 1 5 . 1 5 . 1 25 . 3 5 . 0 5 . 0 9 4 4 6 2 2 1 6 5 4 3 2 1 - = - = - - - - - - Note: e(1) = 0 and g(n) = 0
Chapter 9 LU Decomposition

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

View Full Document
L and U Matrices Lower Triangular Matrix Upper Triangular Matrix [ ] = 44 34 33 24 23 22 13 13 12 11 u 0 0 0 u u 0 0 u u u 0 u u u u U [ ] = 44 34 42 41 33 32 31 22 21 11 l l l l 0 l l l 0 0 l l 0 0 0 l L
Another method for solving matrix equations Idea behind the LU Decomposition - start with We know (because we did it in Gauss Elimination) we can write [ ] { } { } = = 4 3 2 1 4 3 2 1 44 34 33 24 23 22 14 13 12 11 d d d d x x x x u u u u u u u u u u d x U LU Decomposition [ ] { } { } x A b =

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

View Full Document
LU Decomposition Assume there exists [ L ] Such that This implies [ ] [ ] { } { } ( 29 [ ] { } { } b x A d x U L - = - [ ] [ ] [ ] [ ] { } { } b d L & A U L = = [ ] = 44 34 42 41 33 32 31 22 21 11 l l l l l l l l l l L
Decomposition

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

View Full Document
LU Decomposition LU Decomposition * Based on Gauss elimination *More efficient Decomposition Methods (not unique) * Doolittle decomposition l ii = 1 * Crout decomposition u ii = 1 (omitted) * Cholesky decomposition (for symmetric
LU Decomposition Three Basic Steps (1) Factor (decompose) [ A ] into [ L ] and [ U ] (2) given { b }, determine { d } from [ L ]{ d } = { b } (3) using [ U ]{ x } = { d } and back-substitution, solve for { x } Advantage: Once we have [ L ] and [ U ], we can use many different { b }’s without repeating the decomposition process

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

View Full Document
LU decomposition / factorization [
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 49

Lecture20-21 - Tridiagonal Matrix Forward elimination ek f...

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

View Full Document
Ask a homework question - tutors are online