You are on page 1of 3

CMTFE ME 704

ASSIGNMENT 2

Raj Dhami (10D100001)


Kushan Gajjar (100100003)
Question 1
Given: Matrix a =

[ 5
7
6
5

7 6 5
10 8 7
8 10 9
7 9 10 ]

Column vector b = [1 -1 -1 1]T


For the given matrix, 1) Regular Gauss Elimination 2) Matrix Inverse and 3) Gauss Elimination with Partial
Pivoting was carried out to find the solution vector x (Solving Ax=b).
Simple Gauss Elimination method:
For the normal Gauss Elimination, the solution vector
x = [136.0000 -82.0000 -35.0000 21.0000]T
Inverse method:
We get, A-1 = [ 68.0000 -41.0000 -17.0000 10.0000
-41.0000 25.0000 10.0000 -6.0000
-17.0000 10.0000 5.0000 -3.0000
10.0000 -6.0000 -3.0000 2.0000 ]

Hence, the solution x =[136.0000 -82.0000 -35.0000 21.0000]T

Gauss Elimination method with partial pivoting :


x = [136.0000 -82.0000 -35.0000 21.0000]T

Question 2
A=

[ 1 1/2 1/3 1/4..........1/n


1/2 1/3 1/4 1/5..........1/(n+1)
1/3 ..........................
.................................
.................................
1/n 1/(n+1)...................1/(2n-1) ]
b = [ 1 -1 1 -1 1 -1....................]T
n = 3, n = 10 and n =100.

For the given matrix, 1) Regular Gauss Elimination 2) Matrix Inverse and 3) Gauss Elimination with Partial
Pivoting was carried out to find the solution vector x (Solving Ax=b).
Now for n = 3,
Normal Gauss Elimination method:
x = [75.0000 -408.0000 390.0000]T

Inverse method:
A-1 =

[9.0000 -36.0000 30.0000


-36.0000 192.0000 -180.0000
30.0000 -180.0000 180.0000]

Solution x =[75.0000 -408.0000 390.0000]T

Gauss Elimination method with partial pivoting :


x = [75.0000 -408.0000 390.0000]T

For n = 10,
Normal Gauss Elimination method:
x=

[33169807.6349640
2668444115999.00
6137169239305.45

-2872216155.58383
-7346765856464.23
-1350897525606.70]T

61309748270.1353
12069946148782.0

-558468907795.088
-11677921812874.2

Inverse method:
x =[33170991.7126467 -2872319769.65882
-558489303926.098
2668541946633.61
-11678353028431.3
6137396207589.04

61311975903.6742
-7347036001310.74
-1350947549224.82]T

12070391003917.4

Gauss Elimination method with partial pivoting :


x=

[33170991.7102661
2668541946633.63
6137396207589.04

-2872319769.64972
-7347036001310.76
-1350947549224.82]T

61311975903.6678
12070391003917.4

We also get solution for n = 100, however the answers are too long to display.

-558489303926.108
-11678353028431.3

You might also like