Sei sulla pagina 1di 12

ASSIGNMENT 2

Question 1
Which of the following matrices does not have an inverse.
5 6 6 7 6 0  0 6
[ A]    , [ B]    , C     , or  D    
7 8  12 14  0 7  7 0 
(20 marks)
Solution:

5m

5m

  5m

 
5m

  (20 marks)

Question 2
 13  1 2 4 
If [ A][ X ]   76  and [ A]   8 2 16  , find [ X ] .
  1

 38   2 4 8 

(10 marks)
Solution:

10m

  (10 marks)

Question 3
With four significant digits chopping, find the solution of the following equations
0.0030 x1  55.23x2  58.12
6.239 x1  7.123x2  47.23
by using the following methods

(a) Naive Gauss elimination


(16 marks)
Solution:

1m

2m

3m

1m

2m

3m

 
1m

3m

 
  (16 marks)
(b) Gauss elimination with partial pivoting
(20 marks)
Solution:

1m

1m

1m

2m

2m

2m

2m

2m

 
3m

4m

 
  (20 marks)

Question 4
By using  x1 , x2 , x3   1,3,5 as the initial guess values, find the values of  x1 , x2 , x3  after three iterations in
Gauss-Seidel method for
12 7 3   x1   2 
 1 5 1   x    5
  2  
 2 7 11  x3   6 

(20 marks)
Solution:
1m

2m

2m

2m

 
2m

2m

2m

 
2m

2m

2m

  1m
  (20 marks)

Question 5
Find the values of x1 , x2 and x3 after second iterations and maximum absolute relative approximate error
using Gauss-Siedel method based on the following matrix.
 4 2 1  x1  8.57 
6.25 2.5 1  x    10 
  2  
 9 3 1  x3   12 
(20 marks)

Solution:
Rewriting the equations gives
8.57  2 x 2  x3 1m
x1 
4
10  6.25 x1  x3
x2  1m
2.5
12  9 x1  3 x 2
x3 
1 1m
Iteration #1
Given the initial guess of the solution vector as
 x1  1
 x   1 1m
 2  
 x3  1
we get
8.57  2  1  1 1m
x1 
4
 1.3925
10  6.25  1.3925  1
x2  1m
2 .5
 0.11875
12  9  1.3925  3  0.11875 1m
x3 
1
 0.88875
The absolute relative approximate error for each xi then is
1.3925  1 1m
a 1   100
1.3925
 28.187%
0.11875  1
a 2
  100 1m
0.11875
 742.11%
 0.88875  1 1m
a   100
3
 0.88875
 212.52%
At the end of the first iteration, the estimate of the solution vector is
 x1   1.3925  1m
 x    0.11875 
 2  
 x3   0.88875
1m
and the maximum absolute relative approximate error is 742.11% .
Iteration #2
The estimate of the solution vector at the end of Iteration #1 is
 x1   1.3925  1m
 x    0.11875 
 2  
 x3   0.88875
Now we get
8.57  2  0.11875  (0.88875) 1m
x1 
4
 2.3053
1m
10  6.25  2.3053   0.88875
x2 
2 .5
 1.4078
1m
12  9  2.3053  3   1.4078
x3 
1
 4.5245
The absolute relative approximate error for each xi then is
2.3053  1.3925 1m
a 1   100
2.3053
 39.596% 1m
 1.4078  0.11875
a   100
2
 1.4078
 108.44%
1m
 4.5245  (0.88875)
a 3   100
 4.5245
 80.357%
At the end of the second iteration, the estimate of the solution vector is
 x1   2.3053  1m
 x     1.4078 
 2  
 x3   4.5245
and the maximum absolute relative approximate error is 108.44% .

(20M)

Question 6
Find the lower triangular matrix, [ L] in the [ L][U ] decomposition of the matrix as given as follows.
 25 5 4   1 0 0  u11 u12 u13 
10 8 16   l 0   0 u22 u23 
   21 1
 8 12 22  l31 l32 1   0 0 u33 

(10 marks)
Solution:
1m

1m

1m

1m

1m

2m

1m

2m
 
  (10M)

Question 7
Find the upper triangular matrix, [U ] in the [ L][U ] decomposition of the matrix as given as follows.
 25 5 4   1 0 0  u11 u12 u13 
 0 8 16   l 0   0 u22 u23 
   21 1
 0 12 22  l31 l32 1   0 0 u33 

(4 marks)
Solution:
1m

2m

  1m

  (4M)

Potrebbero piacerti anche