Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Mth603 Assignment 1 solution

QNO1: Solve the following system of linear equations


-5x1-x2+2x3+x4=1
-2x1+5x2-x3-3x4=6
-x1+x2+x3-x4=-3
3x1-2x3+5x4=15
Sol: Converting given equation into a matrix

[ ]
−5−12 11
−25−1−3 6
−1 11−1−3
3 0−2 5 15

2
R2→ R − 5 R
2 1

[ ]
−5−1 2 11
27 9 17 28
0 − −
5 5 5 5
6 3 6 16
0 − −
55 5 5
3 4 28 78
0− −
5 5 5 5

2
R3→ R − 5 R 3 2

R 4→ R 4 + R3
[ ]
−5−1 2 11
27 9 17 28
0 − −
5 5 5 5
4 40
0 01− −
5 9
43 106
000
9 9

-5x1-x2+2x3+x4=1 (i)
27/5x2-9/5x3-17/5x4=28/5 (ii)
c-4/9d=-40/9 (iii)
43/9x4=106/9 (iv)
Now use back substitution method from eq (iv)
43/9x4=106/9
X4=106/9*9/43=106/43
From eq (iii)
X3-4/9x4=-40/9
X3-4/9(106/43)=-40/9
X3=-40/9+424/387
X3=-144/43
From eq (ii)
27/5x2-9/5x3-17/5x4=28/5
27/5x2-9/5(-114/43)-17/5(106/43)=28/5
27/5x2=28/5+506/215
X2=342/43*5/27
X2=-190/129
From eq (i)
-5x1-(-190/129)-2(-144/43)+106/43=1
-5x1=1+736/129
-5x1=865/129
X1=865/129*-1/5
=-173/129
Solution by using back substitution method
X1=-173/129
X2=190/129
X3=-144/43
X4=106/43
Qno2: Use false position method to calculate the root of f(x)
=x3-3x2-12x+8 in the interval [-1,5,2,5]
Sol: 1st iteration
X1=-1.5 and x2=25
Here f(-1.5)=1587>0
And f(25)=-25.125<0
Since f(x1) and f(x2) are in opposite in sign hence the roots lies
between x1 and x2
General formula of false position method
x n− x
Xn+1=xn- f ( x )−f ( x
n
n−1

n−1 )
f (x n)

Put n=2
x 2−¿ x
X3=x2- f ( x )−f ( x ) f (x )¿
2
1

1
2

2.5+1.5
X3=2.5- −25.125−15.875 (−25.125)

X3=0.0488
F(x3)=f(0.0488)=7.4076>0 and f(x2)
2nd iteration
Here f(x3)=7.4076>0 and f(x2)=f(2.5)=-25.125<0
Since f(x3) and f(x2) are opposite in sign so the roots lies
between x3 and x2
x 3−x 2
X4=x3- f ( x )−f ( x ) f (x )
3 2
3

0.0488−2.5
=0.0488- 7.4076+25.125 (7.4076)

=0.6069>0
F(x4)==f(0.6069)=-0.1643<0

You might also like