Test 1 with Solutions - Numerical Analysis | MATH 4340, Exams of Mathematical Methods for Numerical Analysis and Optimization

Material Type: Exam; Professor: Yeung; Class: Numerical Analysis; Subject: Mathematics; University: University of Wyoming; Term: Spring 2008;

Typology: Exams

Pre 2010

Uploaded on 08/19/2009

koofers-user-4tj
koofers-user-4tj 🇺🇸

4

(1)

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
University of Wyoming Student Name:
Department of Mathematics
Spring 2008
Instructor: Man-Chung Yeung
Numerical Analysis 4340, Test 1 (2/19/2008)
1. (50 points) Consider the linear system
2x1+x23x3+4x4= 2
3x1+2x2+5x33x4= 1
8x1+x23x3+2x4= 4
4x1+2x2+3x3x4= 5.
a) Solve the linear system by Gaussian elimination with pivoting.
b) Solve the linear system by
(a) finding A1with Gauss-Jordan method with pivoting,
(b) computing A1b,
where Ais the coefficient matrix and bthe right hand side of the linear system.
c) Which method requires more operation? Why?
d) Find the condition number K(A).
Solution.
a)
2 1 3 4 |2
3 2 5 3|1
8 1 3 2 |4
4 2 3 1|5
(r1r3)
8 1 3 2 |4
3 2 5 3|1
2 1 3 4 |2
4 2 3 1|5
(r2r2+3
8r1, r3r3+2
8r1, r4r4+4
8r1)
8 1 3 2 |4
0 2.375 3.875 2.25 |2.5
0 0.75 2.25 3.5|1
0 2.5 1.5 0 |7
(r2r4)
8 1 3 2 |4
0 2.5 1.5 0 |7
0 0.75 2.25 3.5|1
0 2.375 3.875 2.25 |2.5
(r3r3+0.75
2.5r2, r4r4+2.375
2.5r2)
8 1 3 2 |4
0 2.5 1.5 0 |7
0 0 2.7 3.5| 1.1
0 0 2.45 2.25 | 4.15
pf3
pf4

Partial preview of the text

Download Test 1 with Solutions - Numerical Analysis | MATH 4340 and more Exams Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

University of Wyoming Student Name: Department of Mathematics Spring 2008 Instructor: Man-Chung Yeung

Numerical Analysis 4340, Test 1 (2/19/2008)

  1. (50 points) Consider the linear system

2 x 1 +x 2 − 3 x 3 +4x 4 = 2 − 3 x 1 +2x 2 +5x 3 − 3 x 4 = 1 8 x 1 +x 2 − 3 x 3 +2x 4 = 4 − 4 x 1 +2x 2 +3x 3 −x 4 = 5.

a) Solve the linear system by Gaussian elimination with pivoting. b) Solve the linear system by (a) finding A−^1 with Gauss-Jordan method with pivoting, (b) computing A−^1 b, where A is the coefficient matrix and b the right hand side of the linear system. c) Which method requires more operation? Why? d) Find the condition number K(A).

Solution.

a)   

   ⇒ (r 1 ↔ r 3 )

  

  

⇒ (r 2 ← r 2 + 38 r 1 , r 3 ← r 3 + − 82 r 1 , r 4 ← r 4 + 48 r 1 )

  

  

⇒ (r 2 ↔ r 4 )

  

  

⇒ (r 3 ← r 3 + − 20 .. 575 r 2 , r 4 ← r 4 + −^22 ..^3755 r 2 )

   

   

⇒ (r 4 ← r 4 + − −^22.^45. 7 r 3 )

   

   

Back-substitution, then x 1 = − 1. 52 x 2 = 6. 88 x 3 = − 6. 8 x 4 = − 5. 56

b) (a)

  

  

⇒ (r 1 ↔ 12 r 1 )

  

  

⇒ (r 2 ↔ r 2 + 3r 1 , r 3 ↔ r 3 − 8 r 1 , r 4 ↔ r 4 + 4r 1 )

   

   

⇒ (r 2 ↔ (^31). 5 r 2 )

  

  

⇒ (r 1 ↔ r 1 − 0. 5 r 2 , r 3 ↔ r 3 + 3r 2 , r 4 ↔ r 4 − 4 r 2 )   

  

  

  

The number of floating-point multiplications and divisions needed in the elimination phase, that is, Steps #1 - #3 of Alg. 2.3.1, is 2(n − 1). The back-substitution phase, that is, Step #4 in Alg. 2.3.1, is 3(n − 1) FLOPs. So in total,

5(n − 1)