# 1 1 2 1 1 2 a u 1 u 2 u 3 u 4 u 5 x h 2 f h h 2 f 2 h

• Notes
• 185
• 100% (2) 2 out of 2 people found this document helpful

This preview shows page 49 - 52 out of 185 pages.

1 1 2 1 1 2 A u 1 u 2 u 3 u 4 u 5 x = h 2 f ( h ) h 2 f (2 h ) h 2 f (3 h ) h 2 f (4 h ) h 2 f (5 h ) b Armin Straub [email protected] 4
Such a matrix is called a band matrix . As we will see next, such matrices always have a particularly simple LU decomposition. Gaussian elimination: 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 1 1 R 2 R 2+ 1 2 R 1 2 1 0 3 2 1 1 2 1 1 2 1 1 2 1 1 2 3 1 1 1 R 3 R 3+ 2 3 R 2 2 1 0 3 2 1 0 4 3 1 1 2 1 1 2 1 1 1 3 4 1 1 R 4 R 4+ 3 4 R 3 2 1 0 3 2 1 0 4 3 1 0 5 4 1 1 2 1 1 1 1 4 5 1 R 5 R 5+ 4 5 R 4 2 1 0 3 2 1 0 4 3 1 0 5 4 1 0 6 5 In conclusion, we have the LU decomposition: 2 - 1 - 1 2 - 1 - 1 2 - 1 - 1 2 - 1 - 1 2 = 1 - 1 2 1 - 2 3 1 - 3 4 1 - 4 5 1 2 - 1 3 2 - 1 4 3 - 1 5 4 - 1 6 5 That’s how the LU decomposition of band matrices always looks like. Armin Straub [email protected] 5
Review Goal: solve for u ( x ) in the boundary value problem (BVP) d 2 u d x 2 = f ( x ) , 0 lessorequalslant x lessorequalslant 1 , u (0)= u (1)=0 . replace u ( x ) by its values at equally spaced points in [0 , 1] u 0 =0 u 1 = u ( h ) u 2 = u (2 h ) u 3 = u (3 h ) u n = u ( nh ) u n +1 =0 ... 0 h 2 h 3 h nh 1 d 2 u d x 2 ≈− u ( x + h ) - 2 u ( x )+ u ( x - h ) h 2 at these points ( finite differences ) get a linear equation at each point x = h, 2 h, ,nh ; for n =5 , h = 1 6 : 2 1 1 2 1 1 2 1 1 2 1 1 2 A u 1 u 2 u 3 u 4 u 5 x = h 2 f ( h ) h 2 f (2 h ) h 2 f (3 h ) h 2 f (4 h ) h 2 f (5 h ) b Compute the LU decomposition: 2 - 1 - 1 2 - 1 - 1 2 - 1 - 1 2 - 1 - 1 2 = 1 - 1 2 1 - 2 3 1 - 3 4 1 - 4 5 1 2 - 1 3 2 - 1 4 3 - 1 5 4 - 1 6 5 That’s how the LU decomposition of band matrices always looks like.