Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Dr B R AMBEDKAR NIT JALANDHAR

NUMERICAL METHODS (MACI-203)

Tutorial Sheet-II

(1) Find the first two iterations of the Jacobi method for the following linear system, using
X(0) = 0
4x1 + x2 − x3 = 5
−x1 + 3x2 + x3 = −4
2x1 + 2x2 + 5x3 = 1
Answer: X(2) = (1.633333, −.983333, 0.233333)t .

(2) Find the first two iterations of the Jacobi method for the following linear system, using
X(0) = 0
4x1 + x2 − x3 + x4 = −2
x1 + 4x2 − x3 − x4 = −1
−x1 − x2 + 5x3 + x4 =0
x1 − x2 + x3 + 3x4 =1
Answer: X(2) = (−0.5208333, −0.04166667, −0.2166667, 0.4166667)t .

(3) Find the first two iterations of the Gauss-Seidel method for the following linear system,
using X(0) = 0
1
−2x1 + x2 + x3 = 4
2
1
x1 − 2x2 − x3 = −4
2
x2 + 2x3 = 0
Answer: X(2) = (−1.625, 1.3125, −0.65625)t .

(4) Use the Gauss-Seidel iterative technique to find approximate solutions to


10x1 − x2 + 2x3 = 6
−x1 + 11x2 − x3 + 3x4 = 25
2x1 − x2 + 10x3 − x4 = −11
3x2 − x3 + 8x4 = 15
starting with X = (0, 0, 0, 0)t and iterating until
kX (k) − X (k−1) k∞
≤ 10−3 .
kX (k) k∞
Answer: X(5) = (1.0001, 2.0000, −1.0000, 1.0000)t .
(5) The following system of equations are given:

4x1 + x2 + x3 = 4
x1 + 4x2 − 2x3 = 4
3x1 + 2x2 − 4x3 = 6
solve the above system by the LU decomposition method.
Answer: X = [1, 1/2, −1/2]t .

(6) Solve the system of equations


2x1 + x2 − 4x3 + x4 = 4
−4x1 + 3x2 + 5x3 − 2x4 = −10
x1 − x2 + x3 − x4 = 2
x1 + 3x2 − 3x3 + 2x4 = −1
by the LU decomposition method, assuming uii = 1, i = 1, 2, 3, 4.
Answer: X = [1, −1, −1, −1]t .

(7) Find the first three iterations obtained by the Power method applied to the following
matrix.
1 −1 0
" #
−2 4 −2 ;
0 −1 2
Use X(0) = (−1, 2, 1)t .
Answer: µ(3) = 5.000000, X(3) = (−0.2578947, 1, −0.2842105)t

(8) Find the first three iterations obtained by the Power method applied to the following
matrix.  
4 1 1 1
1 3 −1 1
1 −1 2 0 ;
1 1 0 2
Use X(0) = (1, −2, 0, 3)t .
Answer: µ(3) = 5.038462, X(3) = (1, 0.2213741, 0.3893130, 0.4045802)t .

(9) Find inverse of the matrix  


2 1 0 0
1 2 1 0
0 1 2 1
0 0 1 2
by the partition method.
Answer:
4 −3 2 −1
 
1 −3 6 −4 2 
.
5 2 −4 6 −3

−1 2 −3 4

(10) If A and C are non singular matrix then show that


 −1  
A O A−1 O
=
B C −C −1 BA−1 C −1
2
Hence find inverse of  
1 0 0 0
0 2 0 0
3 0 4 0
0 1 0 3
Answer:  
1 0 0 0
 0 1/2 0 0 
−3/4 0 1/4 0  .
0 −1/6 0 1/3

(11) Find all the eigenvalues and the corresponding eigenvectors of the matrix.
 √ 
√1 3 √4
 3 5 3

4 3 1
using Jacobi method. √ √ √
Answer: √ Eigen values are 5+
√ 6,√ 5− 6, −3 and the eigenvectors are (1/2)[1, 2, 1]t ,
(1/2)[−1, 2, −1]t , (1/2)[− 2, 0, 2]t .

(12) Find all the eigenvalues of the matrix


3 2 1
" #
2 3 2
1 2 3
using Jacobi method. Iterate till off-diagonal elements in magnitude are less than 0.0005.
Answer: After six rotations, eigen values are 6.372293, 0.627718, 2.000001.

You might also like