Vous êtes sur la page 1sur 55

.

:&11:11 I J '96'1
~~8~~~~~~·
SOLUTIONS Of' SET Of' ALGEBRAIC

J~
EQUATIONS
: ~JiA

3.1

~I

w'h~1 J_,ill ~I
~~I

~.~

t.W
"J?b,\! ~

~I

~L}jl w'.JJWI

J_;hll '1) JJ\..W,.., .,..:.i!! liA .} J

J_...,..u~
~

Lr-- uJ .~)UI
wi

4~

J:J

~I

~~I

~iJ;, Lr-J
~ ~I
LNJ~

u~ .h,JI
04.1
~Y"?'-"

lJS.l ,~~
(.jl ~
:0

jlSl y.

~lill

.i~
~..;b.l~ )~
.~_,.:,'jl _

k.~ ufo
wi

w)'.lWI

u\ <Y ~)L,.b9.S
~

~J..l.e,l\

•.!!bili Ul:i:....J w'.JJWI t:'-"~ ~~~I wlJlp. '11 J~~ ~¥I

<.fi.....J1-- 'i'lz. ~ u
~I

~'-?~
L......, ~I _ ,J _

w~

fo

-ill:. .)c. 4.t.. "lIJ

~I
I,..,_A... =.

uIJlp.'.JI ~ J~

) ,tJ_;£l1 ~I

4lJ_)~1

wL_,.1;..iJ L¥J:il1u'.J~

w)k.liilJ

~l:Jl

wL..S.Y"'" Y--' Y . .11 :.'1"

-Y .li;. J i _)~ 11J 1;;';'L'.;.;),1 JSl11 _ , ~


w'.JWI.o~ ~
..

L........S _~J.a.l1 J..;b.l'-?J \.:.ii w'.JJUI


~\

t=.""~ J,h ~
~liill _

0i ~
_ _,....,

. L <:"""""" \....S J..lui L::..thWI,._,_.,l.:,....J "".. . l.P-

' .. ~ ._,-

w;!Jk......l1 t...6. (j . -to .

6\ ..._, '"'I
jl .~I

,;) _>----=>-JIJl.....i:iJ1

_;;;b
.h

L.u.J ~~
=;

~}

pJl

d",",")J 0!jji ~

i..f.ill (3. 1) JS_..';j1 ..} ~ ~

t1x

=;

t1y ~

J_,b ul~ L,,)l:.. _)I ~I

50°

50° 50°

UI

U2

U,

.'

U4

Us

U6

U7

u~

U')

'i0°

50°

50c

(3.1) ~ -47-

:~

J..o:l>.,i

V2(x, y)= 0
);e.. OJ'

~.lb~l
+
4

LiJ.;iJ1 ?h;'"j'lA~.J

u· ] ~J + U 1 ,.1. + U·l~J- ] + U 1,J.+1 ~+1 . 1- ~


~ .J~

4 U I~J = 0
~

.,,\J_....... ,ll "t-\\ ~ -"" u~

~ /\.4
\"".r-

(ul'

2'

3' ~ , ..

U).liJ' 9

~--1, ~h. ..J,~Jl::...Jl


-t-'lt

_~~C _A.
~

j\

: ~~l

~Jl,;,Jl w)t ~t...J\ 4..c..¥?,

-4u1 + u2
ul
.;

+u4

=-50

4u2 + u3

=-50 =-150

u2 -4u3

=0

+U4 -4u5 + u6
il3

=0
+U9 == -100

+ Us

4u6 -4u7 + Us

=-50
= -150

+ u7

4u8 + u9 == -50

+ Us - 4u9

·L(~.

L.S

.L~Jc. l_~---IL....l.i,SJ ..... ~ .. ..


~\.!lAC

~.

"'_.. L,'.l\

/"\.4.\ A.. i..l~J\~ , o .......,-- '-.,... " •

L.J-O

ll..:ill,;tie

~; .. ;~i"lfJ" ....r&a ......

Y.J~ ~l

"ltii ~

LJ~ .li u~Jt.-..J1 4.c. y\,.

o- ~\Jli ~i ~
w\j ~~I

J..\...:ill
1,...

04 J_,ill
U:?- ~

.0

~l1'"~l

J=.. lJ.4 u<";; ~Wl

ulj o~
If

~.J?':>

01\

;1_S )

.l.b.y

JIAill 1.lA ~

lp_y!i ~'.¥" ~I oy!i4-J1 .»? J.;.\Jl.J oy!.4.J1 J)J~ w';lJk.J'

Matrix Algebra ul.!.JiU1-Jl ..>r~ 3.2


_t+',.o

-= ~_::...; ~
LAJh,
"1:' u '-,
\;t\')'"

rtiJ'il <Ya ~

~4 (Matrix)
UAA~
~ya ~

~ -,iH:~.J4J _,. .:IiJI


~

eLL

----..:.~

~.;9i.n4
>";h'

'-$i

01J .~_,Q".a.J\

~~)r1 u}

tP. A.A,.
J.lc.
L;'I~""

J' (n •

=,

wl~ ~ J9...... .1l

0~ ~

(aij)

j.. j

:.......... :......... i,...... ..r-oUal j..Y.J (rn) tJ c.:1

"I~ Y1 o~
.J~I .)1

,j L.SA_..9 (Columns) l.+i.w:'!J (Rows)


.l.lC J

(n) lij~
~l

),,.b...Jl

0)

~I

(i)

jJl~

-48~

11
21 ..
• •

A=

a
.a
.

12

•••
• • II

a a
a
~

- ,1m
• •

22 •

II

• • •

. 2m ..

-[aij);i=t, 2, ...n.j= 1, 2, ... m

a
.l\
un

III

n2
H'U

...
~

run
~

.~ .t1 ~ J' €a ~

r-:i.: 4j JA

.)1_;:

t•.)c. ~YI ~ ')'.)la..J1 i

~
~'J_J

J~

~..s

Ie.

iq~."06

wyLill ~.''':''J W\!J9.CiJ~ J...la.:i.Il

t yoj-O

~_,l_,l\

~t)o...:

• ~ _,qa.o

....,

JII

~~

.....:-

: Transpose of a Matrix ;jJi~.J\ ~.jli..o - ', _I:

: ~ ~ .u_Jiw=aJ\
'"

y fo Li _)S:

A=
,

z,

...,

6
7
2

..

..

.A

'I

_' •

4
0

) «QxP)

"

(AT} ~t-~~lL.r........ (PxQ) uli

;';'JL.i:J

(A) .6.i_,i\4J\ r~'

uts i<

: ~l!Ji~.Al\ c)i:t.J ~

l_,z:
.:

...

~) uJ:ul

• .u4' ~_,i

...o.J1

r:'" 0,5.: 01 .b~

t.S..?-i

t"" ~J9'4A .Jl c..rb )1 ~


1-5.J y.nic

..

:~

JS yU:U (_rb _,i ~

A (i, j) + B (i~ = (A+B) (i, j) j) A (i. j) - B (i, j) = (A-B) (i, j)


..

A=

-1

-4 0

:8=

-2

lJ

"

.._A + B==

3
0

1-'
_.,.

-2

-"" - ~

-49-

; M~tr·ix
'7' ~

Mulriplicauon
.~

wli~\
._::_,I._! ~I

'"'="'~
'-:-'y.:c.

- WL:i

J._."L...o.. .. .5. }

1jlj

~~

~I

Y. ..y. .l5.LDI ~
~

~
~~I

: ;}'J\S. (A, B) A=PxR.B=RxQ c=p x Q

~~I

0~

01 ~

(C)

~~I

. .yo

(C)· ...r~ .

o-.

JS

(j""';:~

..:«, ."

C(I,j)= IA(l,k)x
1\=1

8(k,j)
: (2
x

3) ~

...::..Ij (A)

us.:J

2 A= [ 1 2

2 3 : (3 x 2) ('""-"" (B) uij


01.)

B~l:~]
C~[:: : 1
A=PxR: B=RxK, C=KxQ

: (2 x 2) I'~

..:j!j

u,s.:w

(C) j.9

: ~~

U-"

fol

,-:-,.)...;,j_'l

D=AxB"C D=PxQ
:~I~_'I

; Determinants
~')~.5

~\~~\
·;..l~1

- ~\.)

_'II (det A) A ~~

~L

4J

j ... y

(Determinant)

-:'0-

de! A ::::(3)(4)-(-1)(2)
~~
.l;:o.J:! ').

- 1-+
o.l ).b...J: _y:i.Li j ~ ~~
o~

J.:,Jl

;u,~ ~

~I

w'J -lk...JI :i...c.~

j
~

0 ~ 04:J G..ilS.

y::. y.S

~i <..,-l,li.> 4.l ~
..lSi.:J}\ ~

4i~\

"iA, 0~

\y....,. ~I

u~ ';;-l~

..::..ulS.

u-----o
J~_,JI ~

~ L. L.:-.U.~JI J.:,..

~ Jp~1

'1 4..i4 J_,.iJ1 ~ .;;/"i\ ...

0.).1 w'J-lL.....J\

J.:,..
.lp,.j

G')..lL.....J1 o.l.b...J ~ d....,WI ~I

~ ~lj

~)I1

G')..lL....J1

C:!""~

;;.l~

.l~,/

1#-~1

~.;;11 ~I

d
J.k;.

0.J1.};.,/4 ....,.......~\ .J4ic-'J1

fo. ".hYI C" (2x2)


J'W\ ~ 6......a Y'

wlj o.l.b...J1 '-:-lL.U.:...1 ~\


J

: J\.:JI

Y. L.S_-, ~I

_,....J\

~I

Find the determinant

of the following: 3 0 -I A=
4 1
0

2
-2
4

o
1

2 -I

det

A~

3l~

-]
1

- 2j 14
~ -0
L~

3 -1

-2j +
3

~3{(1)[-i !1-(3)[~ !l-(-2)[~ -ill +(l){(4)[~ ~l-(J)[~ !l+(2)[~ ~l) - (2){(4)[~ il-(J)[~ -lJl-(3)[~ ~1}
= :1 : ( 1)(-7) - (3 )( 8) - (-2)(2 ))
~ : (-1)( 2) - ( I )( I ) + (3)(

l[~
2
0

-2j [4 1 3j
3 -2 0 2 -I 4 I 0 1

-:2): = - I -+ ()

+ (-

1) : (4)( 8) - ( 1)(- 3 ) -+
-51-

(-

2 )(-2): -

J\-.1I,,)

b.

J),

\.ii

t.k."J s
all

.AJb:a.ll

~~.J~I

~,.~?~~l&-lll
a14 a24
a34
.. ..
...
I III ..

j;Jh

JI ~I

'J yo.)

_;ill

: ~::, ~

JI.:i.._J ~yJ1
812

~L ;:a":J' A..i _,i ..o,J1


313

L1_,~ f...:-l._,L...l

~.~

o.lh.J\ .l:!~

a21
a31


• .. •

a22
332
• • •
• ..
,.

a23
833
,.

....
,.
...
III

.
..
II

..


• • " • ...

• •

.. ..

..

..

• ..

.. '"

ann

: 01 )4£~ )\.:iJ1 ~la-ill JSI~y-' (Upper Triangular Matrix)


.J

,.

;,1

i·,g

~1 ~

j.,JI 1.lA tA?,

i.

@.,o

~i ~

i.~11(j J~

y~

lfi-.:. 4JLJI ....

0'1\ t.} (i)

11

o
o. o o o

22

o o

a2

33

o
o
: Ul.:il\
...

o o o
~.J.~..It .:

• ..
II

..,.. a n - 1
on ;a\ \»~W
..l l>
••

J\ \.....J\ .,;> \.~ l.A l.&J


~ .... oil

a,~
............

. ...

n ·1 ann

-52-

~, 'i_"4) J A..:l }J\ w~_~\

j,lc.

~\

.l_'.b.J\ ~
L.

(1, 2, ._, n-l ) r-i;14 ~


0..) h

J:! ~~'J::'

. _;bill _y..al£ '-:-I_y-D J.,.ol.:s.S

hav

oj h. JI 0' i.j\

J\ ~, ,,;i>'l ";~I

~~

Ex. 2:
Find the determinant A for·the following matrix :
123

456 782

..

~~

t... ?

New Row.,

= Row,

-T·Row]
7

New Row 3 == Row


1 2

3 -}'

Row,
: 1~

A. " • l"3~ ~

~=

0 0

-3

-6
J\ ~

-6 -19
.),)=::.

: 1:lSA ~~,

Jya=.ll

w~\

y, .~.J

-6 New Row, = Row, - -3 · Row,


: .A4.J ~

t....t

~~

~1 ... ':.ll

..

.. U oJ:~ t,"..\_.yaJ~

o~ '"

J\ J .......'J' ...
~,..

all ..

~-

0 0

a22
0

2 333

1
L\.= 0

2
-3

-6 -7

0
-53-

: "/"}\5, L'I. o..l.h..Jl


.. L'I.=l (-3)(-7)=+21 .L'I. = 2] (L'I.=O) ~ .:...;lS Ij~
•~

.j~.1

..lJ.:.....J.l ~..il~ ..

. \ U.J-'"'J . _(\

,~\
~

w'J'..lLz...J1 ~ ~
~.J:!

J.:,.. <o!l~ 0Y J'1Ji....,'J'1 ~ o:)_j.., )o*"'J dj~1


"iA

..

'1J (Singular)

04 JI.¥
-1...wLi.

: Matrix Inversion ~U~\


: ~'il

(jo"~

dj_ji...a..Jy.~

~I

1..

::.N..ll...J1~~

u:;lS I~,I

AX=Y
: lill Ld~ ~ ~'il

w'J'.ll.....Jl

eX)

~~I

~~

019

X=Aly
.U"~\

.l4."J

J~

o.L.c d~J

CA) U"~
:~

Y. CAl) dj~1
U" ~\

01 ~

~L...:i.". 'J' ;;'_"WI~_;hl\ J

-I

=.. Adj (A)


Det (A).

=..

(a,

x cofactor aj).
Det (A)

WI.:il\ ~I~)

~_rhll..~ 4.i~'J'1
~

~
dj~

I::J~l:...ll (A) o.b.__,JI!j~ ; wi:JI

.)c ~
4j~\ ...,.,~

~ 4J_,h..., ~_}JI ~_}JI


"it,

~it, ~

0-0-, :;.b.yll

Ji,.Ui .(Al) ,-:-,~'J' ~


w)4~\ ~ji

~LE J_........JJ CAl) ~ (A) ~ ~


U"JLSJ

01_J o.b.J:ij~

(A) ~

u~
dj~\

lSy,W ~ tYJ (A) ~ tY .b.


i..:?\ ~y.A

;;.b.yl\dj~

l?,1 ~

) (_>b _,i ~[;

.wLL..J\ J...,..l:,. ..rI~ .-

0'1 o.b.,,11 dj.~ ;·L \ AJ u~..c . ,.1 v=--.... oi~..:..• Y--' i..:?
J._."l:,.
(j'

Ex. 3:
Use
(XI
,XL'

the

matrix

InVerSIOn

method

find

the

values

of

X,) for the following set of linear algebraic equations:


3xI - 6X2 4xI
).\1 -

+ Tx, = 3
...L

8X2

5x;: = 3 ox. = -4 -54-

i~1
: 41.:il1

~l:

JIy.,J1 _j ~I

~l'JL......J\ ~~

r l [! ~51::Jt[~ J J
~6 5

AX=B

-8

LX

-4

A
U~\
~~

3 9

-6

-5

J
oJhA

5 -8

6
01 ~j

o4---J
o.l-..:>.}I

y~

.l~J ~
~_, ~

l))
.~\

(462) 15_'W (A) :ij_,h.=J1


Gl'.)L......J1 u-- ~~1

4j~

oiaJ

J_,...l;>-~

_)t.:;ll:_,
(A)

3 -6 7 : ] 0 0]
9 0 -5 6 :0 10 5 -8 :0 0 1

: lill

-1 -2 2.33 [ 9
5

0.33

0
-8

-5
6

o I o

0]
0

New Row- = ROW2 - a2l . Row, New Row, = Row, - a31 . Row] 2.33

-26
-5.65

-55-

1
0

-2
1 2
-

2.33

0.33
~

0 0.06 0

0
0 1

-1.44
- 5.65
al2 .

- 0.17

0
New ROWt New Row,
:=::

..

..

-1.65

= Row)
1
0 0

New
·
• • •

ROW2

ROW3 - a32 . ROW2

-O~55 -2.77

-0.01 -0.17
--1.31

0~12 0.06 -0.1.2

0 0
1

I -lf44

0
1
a33 :


~

New Row) = Rowo'

Ullil\ o,JldrJ\

0 -0.55 . -O~Ol 0.12


1 -1.44:
0 1
a13 x

0
0
-0636

o o
New
New
ROWt =

-0 .. 7 1
:

0406

O~48 0.04
ROW3

Row) -

'New

III

ROW2

= ROW2 - a23 100 0 10 1 00

· ROW3

0.26

0.14
0.12

-0.2

III

0.52 0.48

-0.52
-0.36
1

..
II

0.04

: ~! (AA0.26 A -I = 0.52
0.. 4 1 -0.2

= I = A-I A)

(ji

~.J

0.. 2 1

-0.52

0.48 0.04 -0.36


0.26 0.14 0.12 - 0.2 - 0.52
106

.;..

..

· ~~.J Xl

3 3

2
-4 -

X= x2 - 0.52
X3

0.48

~O404 -0.36

-56-

Yo

$,1 ~

~.J6. ~_,i •.o.Jl _;b.! ~Uc.

ufo (:-"Ph: J<,~ (A)


9

:\.9_,i ,JI
u

~.,.l=I.~_,

J.oi.!

:~

L.£_, tAy..aW li\l,Q ~

o
-8

-5
6

A=

-6 7

.. ~k;.n ~'j\
."

4..:~

...

~'iJ\I..l\

Ja. 3.3
.

Solution of Linear Simultaneous Algebraic Equations


.n
,c.. (jA

Jil w\1~\.....J\

~.:lc

u\.S

1~~ ,~l?h

JI

.l.lC ~

~L~.J J(,~ J,:JI


L,).4

k"i~J ~_,1;;Jt
~.l _)J 10M

: J:».
x, - 2 X2 + X3 = 4 XI - X2 + X3 = 5
Xl Xi -

fo1

j_,.J; ~I

t.1A t l' JI

: yrf1, r ll:a.i11 lli~ LJl..S .. ·

1_j~ 1j

2 X2 = 4 - X3 X2 == 5 - X3

xl=6

x]=5
xl=7

, ,

;<2
X2
X2

=
=:

1 I

cj'li

X3

=0

L..Uts

,j\j
If:

ul!

X3 = X3

"..,its \j J ~
l ..,

1 LJ\.!

== -]
• I • .. • .. II ..

its \~ s 1
l~J

,
.d. A

h?lfo w'JJl

---11 o1t. ~"lilS ljJ ~I


J

r~1

w'jJ~
_j

~JA'~

Ji:\! (Unique Solution)

2Q~JI w'JJt.~_.H L9<1> .. ~ .


j,'iJ

w'JJWI

u-o (n)

Jb-4 j.::J1 ~

uts IjJ ~1 ,(Consistent)


rU=ul1 W'l.:A£A

'i ~1 4..~ii.J\

w'1J~__.J1 UI..9

(Inconsistent) ~I_ji..o
..

04 JI.¥

·(Redundant) ~~ -57-

,,1 f,_ljlj

J+"w J:JI ~

..

x , -! 2
X I -I-

X2 = X2

1 2

(1 ) (2)

XI

+2

X2 =

2
~ ~ o~

(3)
(2)
ulj

u\ ~
d_j.::J J

~
~l

(x, =-])

J (X2 =

1)

~l

y.., ff

~l

w'l..lh...Jl 0" ~ ~I

"*

(1)

dj..lk..Jl 0"

01j
dj..lh.JI

J J=JI

J.bJ '1 (3)


0~

.."l._,.h.W1
w'l.:L_x...J1 (,L_bl ~J ~ )l_j

J,.. ~

J:'

'1 "'-.jlj

J,..

~J:'

"'-.jlj ~~I

..l.l.J ~JL... w'l..lk..Jl

..l.lC.(j\S Ij)

L..i

(Singular) ~

ulS Ij! L.i .(Non-Singular) Ja... ff ufo L..~ ~\


.~\ G ':lJL...J1 0"'1~

('\..h.J

J".

..l~

~~,..

L:.SJ

~..lL~ . ..JJI~':!I

~y..;J1 ~I

G'l..lL...J1

J".

o..lA1....:.. ~ .(3.2)
~l

- -x

1\

1 + x~=-

-+----------

Xl

(a)

(b)

-XI

X.., ':::: 1

--

\
X]

- -x 1 + 2
--1----------

X,

--

=1
Xl

--+---------

(c) (3.2) ~ -58-

(d)

,__)--------J-A.._

;, ,- ,J,liiil

~
0:';'_)

U_'LJ:;"'-""

'I

_.. - Ltil... ~~v.. ~. '_. L Ji..:j:i


U;:-'-'..

F- .;.;.

,lll)..;a...,

~JI....::..(3.2

a) JS,..::JI U:!-:':! .:
'-l

6.,.:,.

~lcoJl

Q~

cF J
_.

'I".P-" u,., .~

·::I_)........ G.. ~

._W (3,2b) JS.JI L.,\ ,

, -~

.IL

,II J=JI
,J.'

·_'.L' .. ~~.. ~I

,,,L.:. ~ i'L...b..;,II 1~6

(3.2c) ~ '11 t..,l .1,


2lc ~

,LJ,l,i;", '1<· _U~

':1 ~LH •., _ .: L>--

II ' ~

''j U

J=...l::.."__' ':1

(3.2a)'

(3.2b)

~LJ;jj1

JS

01J ,J_,b. ~~

~y

llAJ

,:96;.11 ~I

L_jWI ,~I

('Lhi ~

(3.2d) J__.S...:;JI L....\ .(Singular

System)

cbl1;l 4..biiI1 ~~
_;;P ~..rJI;ij~

.j ~ ~I
~I

(ill-conditioned)

0-- (n)

~I

,~\

u'hWI;i_.hji

J.;h ::.l,. IJ .. /
~\ w'j::.L...J1

: J\:;1\ JS,..':J~ Li:& .;JIJ all Xj


a21 Xj

~4--J1

L>-- (n) d:O ~'dl


Xn

+ a12 X2 + al3 X3 + .. -" + aln + an X2 + a2.:; X3 + , .... + a2n

= b,
b2

Xn =

ani

Xl

+ an2 X2 +

a,,:; X3

+ ..... + ann Xn = b,
0iJ ~y,.;J1 LjiJ _,.g....".J1 .lc- \_;
~~

; JS_,:;J,-! ; (n X n)

Jj...:; 01 ~

w;; ..lL....JI 4.c. ~

AX=B
~)I

L>--J (Non- Singular

Matrix)

;;::._)... .J#- ;ij~

(A)

(ji ~

all a21

a12
a22

al~

aln

Xl

b]
b2 , B= bn
.~
i.5JL....:i 'j

a23

a2n

X2

A=

X=
ani

an2

an3
l....ali..

am1
)l,.,

xn

...::..,.;L..S. Ii) (Unique Solution)

w'l..lL...J1 L>-- 4.c. ~I


:;t:.

i.e
~l..-lA

det A

: I~

(A)

oJA.-J1

s (Numerical)

"_;;..l..lr.~J

L,.;\ ~ ~I J_;bll

Q~J=..

4J6.J1 o~

.j ~ ~ ~
J

;;Y:;~I

»-»

J~l_,

0~WI

~L..J ~

~ ;)1 L.,~
oi~ ~'I ~5

J:Jl ;~~ J._>b


J_)bJ\)

,\.c~

~;Si, J~I ..59-

.(~)p:;ll

: Direct Methods ~y!i4-J\ J~\


: Using Inverses u-w~\
J....,L..,.. lJ----c J.,A~I
~\..I.:i..:i.....4 ~I Li:_>h11 o~J ~ U"~I

: ';/J\
-\

~~

t> U--J

:i.3~1

U"~

.l~

.)

: ul ($,1 ,~I}JI
AX=B X=AIB

'-:-l y...'>.

: Gauss - Elimination Method c.>"J1.S.l ub.l\ ~);


~.J---'-"

-"':ol

~_>hll
Xk

oii

u~ Iii

,~wl.)

i~

~J

hI.:; (AI) U"~I

~_;b ul

d..c._,......,...., ~
:~

(k=l, 2, 3, ... , n) J.,AW


u'}.l~"::"'Xi
all x,

)\.:U..JI ui::J\.fo ~~~


X3 =

~
~J

~J
,~I

~ I.e._,.; .uwJ
":''}.lLx.J1

\_.,SJ ~

ub 4..c~

Iii ~ji

al2 X2

+ au

b,

(1)

a21 Xj a31 X I

+ an X2 + an X3 = b2 + a32 X2 + a3~ X3 = b,

(2) (3)
~

: .};

\_.,SJ

(Augmented

Matrix) al1
a2e

;;~Iy..J1 :lj~1

~.J

~J

au
a~.:;
a"~1.)

a" a21

b,

a 31

a..
.L

b. »
-II

b'J
.. ~LlI.. J='
W

L.......Jc. ~ ~ u)l..~
~.'

..

~I.S"""""""""

II

;L.... iic':ll~; d _..

J__,-~

(Forward Elimination)
4__,l.,c ..

r..r~'Jl ui::J~
U":!-' y

..til~J (Upper
~

Triangular
~ ....

Matrix)

1~ .

U~

. c. 1L...:u.. JS_..;;... o..? L.SJ

'.\1·

L~II

Y-""

\._jc. L..u.:i

':11 .' . <.F ~6..J1

: )\.21 ~jlll

.) ~'""

.J.,A~I

.l~'/.

(Back Substitution

.",--..,.Iji (...~y.:i)

. -60-

al2 a

alJ

22

aD
a33

b'l
b2 b,
o.,>"L. YI wi:.J1 Forward Elimination

a32

D
a12
a'22

, an
a" 33

au

b'

0
x3

b~'

b'l

= »:»: 3 J3

x2 = (b;

- a;3 x3)/a;2
a
l2 X2 -

x, = (b
~-,_y..;:,...
J_}il ~I

l-

a xJ/a
13

Back Substitution
ll

........., c~-'

_;\:iJ1 c...i....a.il ),! h

..rLYI

L1i,J1

¥=

jlq.J,/-,

New Row ,

Row , +Row , a21


all

b'2 - b 2 - b 1 a21 all

0~

(a31/all)

---!

~jy..a... JjYI _ybJ1 .......,c_;.6."J ..:J'G.lI_;h...JI

i::..)-J ~

: C _;hll

New Row , =Row , -Row]-

a31 all

b',

_,

b , - b, ~l)_
_' - all

-61-

_;h...J1 "..i..

(~.J

-:.JtJl _;h...J1 h~

e1\j-,(a~~) ~
: (pll ~
2

;lJ_,1~ JWI ubJL,

L~ ~
...,;QI

ufo (a;2/a;2)
_-

ew Row

1=

Row
I

- Row -

a 3')
r

~ ~-'~

a22
-

aJ2 = a32
rr ,

a22
,

a 32 = 0'" . = a , -,-,a3 1 33 an
I

a23
r

a32 , an

b" = b'3 - b'2, a32 3 an


~ ~ .(Upper Triangular Matrix) ~ ~.;J.'i.4:ij~
.)1
ij~

(lh:JI

J~
4..;l..c. i~ e1\j
.till'lll ;lJ.lUI

l>----" ~L;....JI

.JL~J ~

Gp. (Back

Substitution)

~Ijill

~_,.ull

.teL:; .)}ll t'i ~l'll1j


: Pitfalls of Elimination Methods
:

u.kJ\

JJ= ~

~lH\ (i)

~.

1. ~

uhJl

0..F lP ~

··.L "

.-

':11wl·~·1j i.r' ~

·\.:....,1··<·· J .~ ~

: Division by Zero ~
~I ~__;bill
L.:.S .~

~f-1

w)l.,~1

.l=o.i ~

.)1 ~

.ly>C--~

u4:..'x1 ~
J

.} t;.l~
yJl .; ~

......--J

.)c. ~I

lb..:.. ~6..l1 ~

:UWI oiA .}

:l..lWI ~

: <.F 1 JG....l1 "'J


2X2 + Jx, = 8 4x I + 6X2 + Tx-; = - 3 2Xl +X2 + 6x~ = 5

-62-

~\

o~

,y......:,.)c
oi.l. ~ ~

~I

~~

u~
JI

JtlL,j

(all'"

0)

ui b.:,.)lj
I....~

d>_;b LF ~\

,~I

1~ ~_)

W'j,_.,\...._J\,j,5:>

~i

_~.)

.l.h'J y! J~

.;J1J Partial Pivoting)

_;_P.JI jS~1

: Round - Off Errors ",,):u.J:iJ1 ~~r-2

ui u~

,.:t:{~~1
' .. L,

0-> ~

J.aI

J=..

.1!1..iA

ufo

L..llc- y-J:U.i1 I'l.h=..i~i


~11

~
c..lJ.l:o. ~ ~.
>7;; ;2
,_

;;~i_P-..Y""..r~'-? .c . _II L I ,_II

ill l.bJ1

. w U <.illil l......u \ .~~,.. ,J~~~;"S". ~)lJ1

'\:i:JI,

1- .l..ULi

GI _,.hJ1 .)

,,\..b..i

~.J

w.J""

: Ill-conditioned system ~I
J_:JI
___j ~ '-:' - c.~... c wi'.J:!-"-' (.S'II G)l:,...LJ1

4... ,JiiYJ-3
f.,F

.r';u"u, _

wi .J:!-"-' '-? .)''; :i...bJ1 ~l; ~ ~ .- , y ~ . II'

(.b~I~);i
Gly..----iJ JI w)J.J....LJ1.)

296;. _};!----C ~
~I

~i

~I ,

oj____",

'iJ

Jl-...i::! ¥

wly..Ul1 oiA G.li Ll! I~

ill-conditioned
~I

systems

.Well-Conditioned-Systems
: )1.:.;,\1~I

u1J~

J=JI .)

!,l.hilI~.lI

uLS IJ,i ~

x,

+ 2X2= 10
]OA

1,1 x, +2X2=

I~

-- ~. -- J:JI u '\.3

(105) <.S'II (1.1) u-o li.,ik. \ .»'-' (a21 ) , .~ "; .


XI =

I U'"~\

~, .-

Ij\ L...i..u _, I~

X2 = I

: J:JI ~
~I
~

U:!*20'; 1<>11

cbL..i:i ~
J"""

~
~
L_

(x)

_j

J:JI 01 ~ o~U:JI.,4.1 ~~I


.11 U

.. ' L5 i '\.3 .J:!--"-' " U

L., ,i; UL,.I"Y-" . ... _.J


~I '"

Ii f' \..h:i11 ....r ~,,~,: _j

'\..::.u.:...

~ J!,

i.1..j1

~ IJi•.1AJ

,'LLq ,-11 , u-::-.r-"'"

0~ .(3, 2d)

(j\ 'chlii.l\ 4.bii ~ ~


l.F tJ:'+"

JI

t$..l~

U,!'29'j"I.,j1 cY

l?,i ~)-~.) ",

~
c-

L..S • 1.:_

'ii-""'""

o..l.1x.J,','

;;_"".ll.I1 ~I'

uc- L.W

4it.:....., o.:u.l::J1 • \...li;j\

-63-

.1_ J J'""A'"'l

~'

. _ ~t.....1 •_

(ii] II

Technique

For Improving
,11:"\ ~..._ UGJI

Solutions

.Ls..,L.." w...A' Y<.F" ':11 JSL..;:...J\ .

L..J.J.!L..,,\'1 -lL,:;c.1 ~ _. ,'.(

: Pivoting ",~i
_r.-Sl ~
~.J.ij_J ~)I
~I
o~ _Y.:>

jS__,w:JI-1
~

"l;

I..J:!-"'-' _,

II~-

. y....a ~ 1_ ~1~l.·:LI . .

Yo ~

.( .. <.F" ~11:i.1....'\ .. y .)kJ\ ~

...r..r-'"

,(.,':11

.-

~I..:

~ u'J .)k..J1~ Y J:~ ~


_>-hill ~

u! . u'i
~I L.,j t,?.J~ ./'

Y
~

J:~

dE_, ');:_JiiJl ~

~1_,11 j__,....JI 0".!,jh


l.,i.J~1

.)1.>.: t,?jJIJ~I
~I

J_.,h..J Wb J.c;U ~

~.ii_'

(Pivot Element)
~ (,j)u1 J:kill
~.ii

_yk..\'1

o.L-.-=)/I_, w~1
(,l___:;1\ c!ly

",I_?-) ~

(Partial Pivoting) _;yJl jS~1..:


~

jS_;...:i1~

(Pivot Element) J,~ 0'i ~

y,..-..S:1 ~

J_,

'MII

y..o.:i .)ll.py o.l.o.c)/I

L., \.Jj\..j ~I

o~_,

(Complete Pivoting)

.~WI

c-'wyll~)L, .Y.P I~_, (x) ~4.-J1

: Scaling
L.:iJl~ ~ ~ ~_, ~I

{!-:IJ.J:iJI-2

~I

u'i.)h..J1 4..c~
w;bUI ~~

w)l.,~

J,.w ",I_?-) ~

Y.
'-F

~ , " 4:; _, lli.. y..j\.1.. ulj

w')L.t....., Urw U .. . c- ·L...:..)/I· t.>-="-!

~ ol..il.::..u..:.. . ..
j -"'" _,

w...J

~.#. c---"
01 ~
~.J.ii
\~_,

uJ~ _,foL.... J_.:l.., ~

Wl.l.......:>. Yo ~\.L

w~

0-0

W\'!-')lc.

l.,ij).! I~

(nano seconds versus years) .) (micro volts versus kilo volts)


L.)j~ jSy:;Jl

'-.A..l.ic
~L....:lll-!

~y

,o~

LS__.r:.ljo~ ~

('U)

wb

w'i.)t.....,

0fo.)1
~)
~Y-

~)__,h...

~ (,l!J:l1 t-" d..i).iJ1..: o~


I'lh.JI ~~ 0\.5. lJ) ~

U\j y_,11 ~

tl!J'i1

: .)UI

"::"'{j

L:.ic."1 .1.:.· .. .J. :J .r+«

h~l\

;;

t-" ~I.'

~] ~ :~~lr::l=r~~~l l2 r
1 2 -1
.

(round off errors) _);uiiJ\ ,,~1

x]

'I

.s": ~~...r:-

I_

..

'

',,'II

..r'..r-'"

.c

.':11

i'

1~\'"

.. J

: -,;1.

loS .>.:}iiJl

\.b...

~l=. .. ~ )

L..iil'y

l~
')

3 100
133 - 82.6

3.66

105 ]37

J
= 0.94 t# ~

-82.7 = 1.09

t?,i (Scaling)

~.J.lil\

.l.o..!yX,

1.00 .) X2
:~ ~

s X3

lie.)

4:J)L,h,J ~

ySl .)c. _;h...

JS ~

l
: ~\4.c. ~·-Ii

003 0.5 1.00 -0.5

-0.01

O.O~ 1.00 x O.OJ 1.00] 2

l.X'] _[1.05J 102


-

X3

1.00
('\h:i.,_,,\..., .j

1_ .._,.,.... ~

. ' i; .':11 . '-.F_I-7-'1\ jS ..Y""" C" ui=....ll ..__,1i .~

0.50 [

o o

1.00 0.05
0
x,

- 0.50 0.99
- 1.82

. LOOJ . 1.04
1.82 = 1.00,
X3

1.00,

X2

1.00 ~

o~

Ex.] : Find the solution of the following method, set of simultaneous equations, using

the Gauss-Elimination

working to 4 decimal places throughout:

2.37xl + 3.06x2 - 4.28x~ = 1.76 1.46x] -0.78x2 +3.75x~=4.69 -3.69xl + 5.13X2 + ] 06x:; = 5.74
~.~

: 1::& o.l,!lji.c ;U~

JS.,.:; ~ -4.2 3.7<; lOt -65. .

w'1.l'i..L.J1 ('\.1u~)

2.37 [ 146 -369

3.0 -078 5.13

1.761 4.69 5.74

New Row , New Row,

=::

Row , - Row. - Row]


-4.28 6.3865 -5.6040

= Row]

2.37 - 3.69 2.37 ..

1.46

r2~7
0

J06 -2.6650 9.8944

76 1. 3.6058 8.4803 9.8944

l
" ;pY/5_~1
I .':1\
. __':Il, lJ-"":!Y'-".J

New Row, = Row] - Row ,

- 2.6650

l2~7

3.06 - 2.6650
0

-4.28 6.3865
18.1072

176
3.6058 21.8676

..s--

1_,

lJ.'-<=-I

' ..

~.r

x, = 0.9337,

X2

= 1.5412,

X3

= 1.2077

Ex. 2:
Use the Gauss
following

elimination 2x,

method

with partial pivoting to solve the

system of equations:

2x, +2X2 +3X3 +2x~ 4x, -3X2 6x, + x2 -6x; -5x.j

=-2 =6

+ x.j =-7

: iili

-66-

0 2
4 6

2 2
-_}

0 2 -2

"
_}

"'

1 -5
f l~W C!\)I

-7
6
: u1jll i.#1!

-6

: .)c ~

_;h...J,-!

J,'ll _;h...JI J~

6 2

1 2
2

-6 3 0
0

-5 2 1
1

6 -2 -7
0

4 -3

: JJ YI ..J _,.......II JI y..;...'-!J


New Row ,

= Row,

- Row.

"6 "6
Row,
6
4

New Row, = Row] - Row)

New Row.»
6 0 0
1

Row, - Rowj
-6 5
4

o
6

-5
3.6667

1.6667

-4 -11
0
: ~'WIi.#11 Ii JI.1ll.u.'u.J -

0 - 3.6667 2

4.3333 1
.L.l'u

1_ I.S"'""'

J....,..:....; c..JUI

..r'UI ~. L
6 -11 -4
0

1 -3.6667 1.6667
2

-6 4 5
0

-5 4.3333 3.6667
1

o o o

-67-

. 1.6667 New Row, = Row, - Row) _, " " - 3.6667 . New Row, "'"Row, - Row , --- 3.6667 6 -6 4 6.8182 2.1818

-5
4.3333 5.6364 3.3666

6 -11

0 -3.6667 0 0 0 0

-9.0001 -5.9999

: css» ;_;b:;JJ
:
(' I~t.., .

.::..JWI .lJ"'""-'..>-'-"-.j --II Jl '~'l,

New Row

Row

4-

Row , -6.8182 -5

2.1818

: .)c J ,-",,-,,>_j 6 1 -3.6667 0 0

-6
4 6.8182 0

6 -11

0 0 ,0

4.3333 5.6364 l.5600

-9.0001
-3.1199
: ;~Y! ;..#11

: J¥.~l
Xl

r-#.)c J...=._; ~\_j>ll


1.0000,
X3 =

~__,.,.:;ll y_,Li t4i~

= -5.000,

X2 =

0.33325, x, = -1.9999

6l.l.)~

U'" JLS.l

u.bJl

4.:i.:..;b

-----'?-

Gauss-Jordan Elimination Method .)c ~).JI


wh~_;hll
~_,

c~

.} J...=._;

ll;1 ? 4..;.l~ 4k- .;;p;.


J_"..:;:;

'11u-' j1£ wh
dj~

~_;bJ

~L.::...,

~_;hll oiA
dj~

"iA ..)

t'; ~

.)c liI~
J~I~.J

u.... J.l.! o.b.I.J:i-:_;b!


li~

. .l....-..:>.I.J ~1 o_y....:>~

t,$::Jl_j ~)I

WI_,l1 _y....:>1..• .t.I1~

: .)UI.hb...J1 ~ L.S wi.....ll.~

c,cap..t

-68-

al2 a32

au b, a33 b, -,

a~2 a23

°'1
1

[i
Ex. 3: '

0 1 0
Xl

0 0


b' 2 b: ~

X2
x,

=b.} = b:
1

==

b;

(The Solution) J:JI

Solve the following Jordan method:


2Xl Xl 7Xl

set of linear algebraic equations using the Gauss- 4X2 + 6X3 = 5 + 3X2 - 7X3 = 2 + 5x2 + 9x:; = 4 ~ ,..:;;":l~1 : ..

JIJl----.=.1 iA~

~ oJ.;.l_)l.. ij~

4.c.~

~J-!

~.l.,Il1~

.. :~

~[
2
3 5

r:

-4
3 5

-7 9
3

~rRI
25l -R] 2
4 -7RJ +R2 +R2

: J}ll

JyuJl

-7
9

~r~

-2 5
]9

25 - 05
-135 -69-

-10 -12

1/5R2

~l~ l~ ~l~
-2
1 3

-2

-0.1

2.512 1

R, + R, -19R2+R3

19

-12

-135

-1

1 -2

- 23 0.1

26

- 11.6 1/26 R3
2.3 -0.1 - 0.44

0 0

-1

-2

R, +R, 2R3+R2

II
o o

0 0 1 0 0

1.85 - 0.99
- 0.45

j
1

1
J X2 = -

: .r: .' .~;i,_,h:J\


X3

,::..;·l..lL....JI :k. ~ .

J.:JI

U~

.. (.

I.,. ~J

=-

0.45

0.99 _, XI = 1.85

Ex. 4:
Rework example (2) using Gauss-Jordan method:
: I~ D.lJ1
;·:.1\ ~)'\ r.·;c. _.

: ...wi
:ij .:

o
2 4 6

.~

~.

:i...J.....:,)t1

~~y

_.11

.. '

2 2 -3

0 3 0 -6

1 2 1 -5

0 -2 -7 6 : ~JYi ;__~J

..l~1

Jlfo\J

(6) _)c J_,),\ _;bJ1 ~

(j..<.j

Cl1jl_'

J_,)'I _;h..J1 JI.l.ll.,_,,\~

:~
-70-

~J_,'11

Ll6667 0 0 0 1.6667 - 3.6667 2

-1
5 4 0

- 0.83335 3.6667 4.3334 -4

-1 ]
0 : ~llJl i_;b:aJJ

..l,,____.J\ JlfolJ

(-

3.6667) ~
1

~tJl

_>bJ\

~j

6ltJlj

~tJ\

~_;hll

JI~I ~tJl

:.)c ~

0 1 0 0

-1.5000 2.9999 15.000 -5.9998


6ltJI

-1.2000 2.2000 12.400 -3.40000


G'1I~\_

1.4000 -2.4000 -19.800 4.8000 : 4JJllJl i_;b:aJ1

0 0 0
~ '..U".3 (15)

.~

1,.. <..S"'""

.L.\1

--.(

...

,,_L..: ~

11 oiA. ~•

-,I V

: _;L..=1l ~JL...... ~tJl


1 0 0

..l _,.,.,JI.} IS_p.. ':J I .}'-"'t.WI

0040005 -0.27993 0.82667 1.5599

-058000 1.5599 -1.3200 -3.1197 : 1...:1..;11 i~J

010 001 000

..l~1

~~I

J_,9 ~t.W\

~J

(1,5599) ~ 0 0
1

t-!I)I

y,....,J1~. :~ ~

0'11 ~

l~

t-!I)I

1 0 0 0

0 1 0 0

0 0 0

-0.49999 1.0001 0.33326 -1.9999


:~ cWl .)1 If..lJi .iA.
J Xl

X4

=-

1.9999

"x~= 0.33326
-71-

J X2 ==-

1.0001

=-

0.49999

(~J~\
Indirect
o.l J.l.:>...o .l.w ~

(_L~\) oy1~\

J.;kJl : ~t.:l

Methods (Iterative Methods) lU .... ':-'~~ ~I J.;hiJ1 f' ..;JI wi:J1 J_;,b 01 0_,s.l
Off Errors)
y,_,.J:il1 ~I

~ (jl
C,~

...} 4J\..9

~~\..lil

(Round

"lb.l

~j

~I

G'A'.lL.._.,j1

;i"--ul__;:.:;ll J~I
.l~

uli
_,l

Iii '0 ~I

;;.._..bj)u

;;,,;9S ~
Q,ljlj wlj

ufo
ufo J

,;:/jwl
~

GI)-4

j:,J1

.)1

I~.Y-""

Y- J.J:i..i1 "lb.!

...)~1

J.;---hll ~
~y'jI

LJlft)'1 u_~ u4:-~1 v~,,}


,:?iil _b~1

.J91 ~J.J~ ~
j

JI..:il\_,J J91 ~)fo


I.b.,,~

LJl_fo:lI ~

eJli

Iii

'''-:c'fo '} t_S_y.i L;4=--i


: ~I..:ill
~~'I ~

~)fi:.il\
<G.c- Y-"

IJ! ufo.

0.0

la I> ~Ial
IIi ~ _I

1.1

i = 1,2,

"',11

.I:

-75-

U---o "I.........h.il )tJ\ Jli..JI

.} db,..; ;.i ,.)' ~

9 .(Diagollally

Dominant]

~,;h!J1 : ..:.:,,':U__._JI

2 x - lOy + Z -I 1.'i4 lOx - 2 Y - 3 z - 205 2 x + Y - 10 z + 120

'00

0 =0 c_= 0 : _)c. ~ ~ /;/1 jUiJ1........Ji l_ihj


\jIj

10 x - 2 Y - 3 z - 205 ~_0 2 x - ] 0 y + Z -+ ] 54 ~ 0 2x Y - 10 z + 120 = 0


J;hll

~1

j-o

u! .~

~)=.'i.il 4-\1

_by:;
:

.j~ A.h.:,.)W1 ~
~_!l,

I.:.A J
.. )~

lp,ll
.'

0~-..F""

".

L~·. __ ';i\.d._,

I .(~ll

.: Jacob's ~ _;.b ~
~J J

method

'-:-I_;;4-~....J=-1
o:U ~

'-f J-wl J:JI


J:JI .)1

J47. '1 "::"_"h:WI


J_,....",il ~~

_;JI J _;hil ~_;b

J J\ 0-" ~;hll

'C~I

I..~}}~

1_.,h.jSJ_, tl~'l\
:~LS~ji

~+-

: u'lJ~
all XI Xl Xl

...::..,)l;

l;,;J.i ~

a21 a31
J~I

+ al2 X2 + al~ X3 =- bl + a22 X2 + a2e x, = b2


+ a32
X2

+ a3.;

X3

b_,
o)kl;i.,;.bJ1 0-0
w)'JL...JI ~~ oJI..:.! ~

W_)-'-:! ~

Lf}fo

:~
pi XI

L..$_, liSAJ ~WI ;ij..l~1


1 1

_;GlI J~\J

.)_,';!\

:U..l~I0-0

JJ'l1

=
r·l

(b, - a12x2 (b2


-

aux, )iall
I

r
- a2~x~
r

X2

a2l X I

)/an
I

= (b, - a3?1
:;__'~I ;-u.~1

- a,2x2 )ia:;:;
;i~1 ~

Ul3

l_,_:i

(r+ I) ,)J (r=O, 1,2,3,

.\~ ..) u

.. ~

.~.illl

~\

(r)

-76-

(!)

( I)

(I)

(II)

(II)

(III

(x ,

.X~

X"

)
,X,

~J
!/)

(X
12)

X ~1

'

X.) -'

-(0

~,

0 0)

~I~';ll _..

~\.o .

l....,j
~I

.I~.J

(x,
1"

. X;
I

) '-,-'I......,J ~1i.W1
r
r'

#~ ..;=.

;i,_,y-=-JI

:;.l.J.~i

oi.\J
~

. "jf J--.! (x,

-X;

),(X2

-X2, ) (XI

-Xl)
. LJ

U~

.(.:\~ -ff I~

1~

_,lh.J1 _) ¢.l~1
~~.J

~.J11 ~).l

.)\

-ff

J~

,j

: J'Gl1 JS..,;:J~ ~
j

~I
-

w';l.lL....JI l.ro (nxn)

4_.,lL;. ;;)~,

Xr.i1 = --I [b i

a ii

'\" a ii . x I I] L...,
j~l' J~i

Ex. 6 : Solve method:

the

following

set

of linear

equations

USing

Jacob' s

8x 123 x - x X
l

7x + "_.' ""-4 Zx '2.

2Xl+X2+9x~=12

1"'

XI
1"'1

=1+0.]25x2+O.125x,

= 0.57] + 0 143
co

Xl r XI -

+ 0.286 x,
I

x,

r: I

1 333 - 0.222

O. J 11

.~1··

• II I "\ o.l.J...J.:>..J ~.. ~11 '-,-'u..u..:>.

~.~.ill

..

'\

.' \

_ .~(

((J I X

=-

X2

II

-= x.; II = 0)

u.a I'" 'L. .J ~


... )

: .}'Ji

JJ~\

_} ~

LS. (r = I ,2.J,

-77-

.4.:i)G.l1 ~l:;....Jl

.l9 '-;-l).iill :Ul,.

04 ;;..b..:..)L.

.~

l II ][
X r•I
XI

=B-

(L + U) . X r

:~

L.S;;,j~

JS; ~ 0.125

o)k.\ u'J!JI......J1~3

0.125
0.286 0

r-I x, = 0.57 r

0 0.143
- 0.222

0 O. II ] Method

xJ
,I

1.333

xl

'j
-'-:-'

: Gauss-Seidel ~'JI

J~ ~~I.~

(..\o"JlS. ~.;b

u_;-hi!

I_,_:;..:,.I I.·:

,,'!

y._"<;l;..~_;b lJ..o

t _>....J

y:w

a 11 an

X .I Xl

+a +

122

+a

x.r= b 1 ~
X~ = =

an

Xl X2

+ an
~3

b.,

a~I x I + a, I
~_;bll0)p:;l!
r:

+ a~~ X3

b::
U'1jl......Ji .~~

yj....YI
1

C" .)k.i ~I

oJlc! ~ : Jl:ilI._PL,

1"-1

r+l

Xl
r.

=(
I

b2

- al 2X I

- a2~ x~)
1"'

I
1 )/

x,

= ( b. -

a, I X I

1 -

a22

1•

an

X2

a.,

-78-

r
: .}WJI
""t,

.z;

0, I, 2, 3,
.Ju..~!
I

: ,) ~
~_~.:::, ;,)~~

~L.J n

Ie

:.',

'\

~,
I

'.(..

(.

.)' n- n

,.

x. =-[b-'a IlL..,;
ali
,..I rI

r.I

.i

1.1 1

..'x. -'a'x .1 L_;


je i s l

II

1.1

.1

=B-Lx

x
a ..
',I

B=_S_ ,

E'(. 7:

Solve the following Gauss-Seidel method:


5xl
- 2X2

set of linear algebraic equations using the

+ x.~

x I + 4X2 - 2x., = 3 x 123 2x + 4x =17 +


~J

;-----W ~
= =
=

~~

o~

w';i.lL...J1 J=,. ~

J~ -

u"_JS

~_;b

I'\~L,
,~_~l

XI X2

x,

0.8 + 0.4 X2 - 0.2 x~ 0.75 - 0.25 XI + 0.5 X:; 4.25 - 0 25 Xl - 05 X2


: \~ XI

..

... (1) (2) ... (3)


~(_,.~\fo\.-!J

~yk~X2=X3=0

XI

0.8

-I-

0 - 0 = 0.8
~
XI

~~

(_,.~_,.ol\

__j

I,_.:; ~~i

~I

oi.._t;

rl~~,
;ij)~1 ~ X:;

: X2 yl....,.,J

(2)

=0

X2
l,_.:i

0.75 - 0.25 (08) + 0


X2,

= 0.55
~

01.:l:~1

x, ~

~,...:JI

.),'11 ~f_;S.:ii'1 ~\.j


lill

0,),1 X:;

W. .J~,!

x.

4.25 - 0.25(0.8)

- 0 5(0 55) = 3 77~

-79-

~'~I

Xl
X2 X,

= 0,8 0.4(0 55)- 0,2(3 775)= 0,265 = 0,75 - 0,25(0,265)+ 0,5(3,775)= 2,571 = 425 - (0,265)5(2,571)= 2,898

: ';'11 J,~l.}

~ 0P'J.\ ~)'p\ u~

1:&)

0,8 2
,1

0,55 2,571 1,887 2,OOS 2,003


l,9t}1)

3,775
-,

(},265 1.249 O,lJ5G 1,002

V::9l'1
2,1)94 3007 2,998 3,000 3,000

.:I
5

G
7

1. 001
0,999

2,000

: _),

~~

~~

o)lc.\

u;U....Jl~)

~~

1iS.A.,

Xr+1

=B-

UXr 0,8] -

LXT+1

X2

X~:: ]-l
°

O,7S

lO °
0

0.4 0

- 0,) 0~2]

x,'r""l

4 '2 ) -

: )\:iJ\ JLJI

[x~]
x2r xi-

0,75 4,25

0 0 -0,25

o][xr+l] x;+1
0
x;+\
(j:.:

~ J~

- LY,ISJ '7'"sL:;. ~_rb

c:9jJl ~.':;~,

Ex. 8 : Solve the following set oflinear equations using: a) Jacobi's mel hod ~ b) Gauss-Seidel method 5xI + 2x: + x,~ = 12
XI
-j

4\(2

+ 2x~
)X~

= [)
=

.\1

2,,-, -

20 -80-

: ..wI

a) Jacob's method x ,' I =( 12 - 2 x/ - x-') / .'\ x/ I =( 15- x,' - 2 x,') / 4 x,' I =(20 _ x.' - 2 x~') I 5

b) Gauss- Seidel method I "'-( 12 - 2 X2' -x,') / 5 ,·1 X~' .=:( 15- XI 1"1 -2 X.'')/4 x,' 1:-(20 - x ,' 1_2 X2"I) 15

x l'

I.OX

I.<])

3.1

(j

4..iJWL

44 J~ -

t.Y

JLS

~p.

WI,.h:J1

j..li;;.

.)

0_)l1 4..b..)l... ~

. _}\.ll

u-A;.0I1 .,:jb

'-;-'~~

~_>b

: Relaxation
C,'-"llY .~

Method f-'G.J'/\ ~.;b


}:u·:.·.:i ~

-~

(Gauss-Seidel)
o~

J~

- U"."lS
:;fo1l

~~

~_;hil
~I

o~

0r------SJ

~~I

j..,..Jl ~L....\'I

.~...b~1

&ll

~I

,-;-,Ifoi
~~

~r
)4-U-1,

.;,____,,_, .~

.(Corrected

term

~l

_-.".) Oc~) '"'"~

.l.::>...i ~I...:...,

-Sl-

.,

X,

1It.:;'~

Xi

~11ti

-; + r: (\ X_ i-X

111...:''1

..•
1

)hl ) _
-

..,
1',

Xi

11"':\'

(l

Ie.
J~

').

Xi

ol d

C::..l.il.s!jlj

0::; I~::;2

~'+'

-.J,s <'4, ~"

j,..l..>:-

(Ie) ,jI ~

~I

ji..-JI ~

~_..>bll

0< A < 1 0---::-: ( )\~


1__.J.jc. J

...::..w1.S Ij!,

~_,__j L....i:..;b ~

1< A < 2 ~ ufo

(Under Relaxation Method) ~IP\


0 ... ../

..(Over Relaxation Method)


'-?" all Xl

_1

L,.S ../ U'J ;),..2..A ~)i.:i..i


0

~..i, -1...\\ ~ .. ..r- L·'

.r:

.,:j

. .s.....,_,

a21 x I a31 Xl
L...l_""""""":i

+ a12 X2 + ai, x~ = b, + a22 X2 + a2~ X3 = h + a32 X2 + a33 X~ = bC


,!""''''')

.1

." \

~JJ

.. 'I "..
~

t-"

'\1 o~

-I ~ 1 . '\ ..

.. '.1 \ L.JJJ\..x...o..l

'I

X3=X]

1'+1"

,X2

=X2

1+1*

,Xl

=Xl

1'~1*

01 ~
: JUI
.1

"4 ... ..,,a

1\ 441

'"

ui,

r = 0, 1,2, 3,
~l
r~1
1

,_,..k"

0.?i ~\
,

oic-i

f'1..x.i1 ~1,

X'

= --

1[

a ii

bl

".

,L ax
11

11

i I'

-,' L a lJ x J
I 1

= X' + ii, (x ~.1

- X; )

-82-

: .::..9 ~

J5_.;; _)c

}i

x':" = X'
~ j~\

+ A (B - LX"] - UX' -- X')


~
: ~UI
j_.P. J ("~

~)G..

tJ.-o- ~

Ji_..:;:;

4~_pJ1

o~

("\~I

~~

~1,h:JI

t I~~

lA~.l.:W ~ ~

,(11.) ~\

.b.

r---::ill

tJ-o ~ ~
JS_.:JI ~

._)c. J~\

~ (trial & erro r) l..bJ\ J


~5

:u J~1
(A)

dub l.P - i
c-?~I

.(3-3)

LS ~"J
,
I

(n)

)_PI

uly

.l.J.c,

.b...l

No of
ltrations

,,

, ,

~------------------------A
Corrected (J. 3) JS,.;;

Factor

J--.-.-7. _;.b
~~J

u------c (n) )
. ~I ,)1

~I

ul Y' ~I

j.J.c

.9

(A)

~I

0.:-:

.dj)k.

p..:;....w ) - '-:-'

IA~

,(Curve-Fitting)

J..>1.h; Ji (Interpolation)
~I 4_!")wl ~lii

JI~':i1
GI Y'
j.J.c

4:!Jl..uu j 47.k

l.il.....a..::.

) fiji

~=O

dA

.(A) ~\

J-,b ~

c_fo..J ~ j->_5

Ex. 9: Solve the following set of linear equations using over relaxation method with J... = 1.1 l Ox, - X2 + X_; =12 x I + 10'<2 + X:; - 12 XI + X2 ~ 10\~ ~ 12
-83-

~)

0j\

.~\

../-' -:!;.b..9.i'1 ~I~I ~ : ~'u]'1 ~I..J

-:.:..~ L..... .... ~\

:u:..:..)L. ~

":"';;..lL......l1l.>-o ~~I

x. = 1.2 - 0.1
X2 =
X:;

0.1 X, ... (1) 1.2 - 0.1 x, - 0.1 x:;.{2) 12 - 0.1 x, - 0.1 X2 ... (3)
X2 -

: :-;;.1' ~
X~~I'

X2

X3

& ~1ft~j
~y.:; G j_\l..l.; ~

= x~ +A(X~i1 -x~)=

0+1

1(1.2-0)=1.32
4j.:Jl.t...J\ ~

: (x-) '7'L..:....i (2)


X2

= 1.2 - 0.1 (1.32) - 0.1 (0) = 1.068


: ~lil\ :ui)wI..-! L~
oJA.J

X ;+1*
X:;

x;

+ 1\ (X ;+1 -

x;)

=0

+ 1.1 (1.068 - 0) = I .1748


.4"",nJI (X3, X2)
~~j

; (x:;)._)c. ~

(3) 4j..lLd\ ~

= 1.2 - 0.1 (1.32) - 0 1 (L1748) +I\(X~-,] -x~)=O+l.J


:~ ~

= 0.9505
:ij~~ ~

: 4tJ\
X;-I. =X~

X:;

ill j

(0.9505-0)=1.0456
.4-,;-ilJ\ ~) _;S:;ll ~I ..}

0j!

X:;

= 1.04569,

X2

= 1.068, x. = 1.32
: ~\ ~).....:lc\ ~

lillj

Xl =

1.2 - 0.1(1.068 - O.](1.0456)

= 0.9886 =

X;+l'

= x; +).c(X~+l_X~)
X~

= ].32+1.1(0.9886-l.32)
0.9999 ,
X: X:

0.9555

x: = 1.2-0.1(0.9555)-0.1(l.0456)=
,·1'
=
= X1
r X~

1 fl

(1'.1

" \_1'.1'
}X :

= X2

+ -A

(".1 X:

X:

I'

')

1.068 + J.l(O.9999 -1.068)=

0.9931

= 1.2-0.1(0.9555)-01(0.9931)=1.0051 = x ', + A

<'I"
;;'__i:J=i

(X~·1 x~) 1.1(1.0051~ 1.04~6)=1.0011


Cc:,l.......:;.J

=1.0456+
~)P\

ut,~\

j'........:J\

J)~\

..ll___.4.1 ~

-84-

-85-

: Computer Applications ~la.l\

~~\

3.5

4'11 ;;___"~I
t:----!.J
\ ~L,...

w)'.:l~1

~~
d.......,

J:J
l".

'-;-l_,.....,6...l1 !"I~I
jL...i. i$',

.)

U"y.:il\ u.::.yJ

~-.

4li...:i..

_,....., C"" r. C

1 .. 1

1\ ". L~II .. ~I I..J ~ t"'"

Y.F -' -

~I

: ...r-,

PROBLEM 1:
Using Gauss's elimination method to solve the following set of

linear algebraic

equation

with partial pivoting -94-

Xl

+6 3

x2 x2 X2

X,\ x3 X]

7 6

xl~ Xl

+7

cc ]

=10
:_,..p.j}

Consider an accuracy of 0, 0000 1 ?


uh..!1 ~_;b
1\ ~.

lY'J1£l

!,I~lu
~')).P-

,,)l.z.i
-

:uL..Jj C'""li~1 ~

wl_,.b
~-

~
..l\....:icl

...::.;L..:.. . ..:. .11t-" ~ I, ,~

I '~

'iill

J,

(3 5) JS.,:;.

L..,...,;"il I ~ ~b.J1

{rn)

Ifo:ill

wi.>" ..l.ll;.,

(x,

,X2 'Xl)

r:i; ~I

Repeat C times C=l, N-l, I

READ A (N, N+ 1) Rows, Constant, Colurnes


Repeat R ti mes R=C+I, N. 1

Repeat S times
S=C+l, N+I

P=

ARC \

Ace

Repeal Slimes S=R+ 1. N

-95-

P = P-ARS

Xs

81+-· -----1 L-PRlN.----.1.--x-7-----.. T

(3.5) rJ.S..Jj

(Gauss-Elimination Method) U"JW ubJl ~_,.b 0


: ~W\
10 20 30 40 50 60 70 80 90 100 200 210 220 240 250 260 270 280 REM GAUSSIAN ELIMINATION REM *** INPUT DATA **** INPUT "NUMBER OF EQUATIONS"; N DIM A(N,N+l) ,X(N) FOR R~l TO N FOR S~l TO N+l READ A(R,S) PRINT A(R,S) NEXT S NEXT R REM *** ELIMINATION **** FOR C~l TO N-1 W=0230 FOR R~C TO N IF ABS(A(R,C) »W THEN U=R: W= ABS NEXT R IF U=C THEN GOTO 320 FOR S=C TO N+l P=A(U,S)

~w_;.:.l\

4...a..ll! ~

(A(R,C))

-96-

290 300 310 320 330 340 350 360 370 380 400 410 420 430 440 450 460 470 480 700 710

A(U,S)=A (Z,S) A(C,S)=P NEXT S FOR R=C+1 TO N P=A(R,C)!A(C,C) FOR S=C+l TO N~l A(R,S)=A(R,S)-P*A(C,S) NEXT S NEXT R NEXT C REM **** BACK SUBSTITUTION *** FOR R=N TO 1 STEP -1 P=A(R,N+l) IF R=N THEN GO TO 470 FOR S= R+l TO N P=P-A(R,S)*X(S) NEXT S X(R)=P/A(R,R) NEXT R REM *** PRINT RESULTS **** FOR R=l TO N 72 0 PRINT "X ("; ") = "; X (R) 730 NEXT R

: UUlI .'

'\.:i.il\ 1_1, (:-l ..s--- ~

1- . .,\1 r\.h.iil ..s--- <Z:-" liY-" \~ x(l) = 1 , x(2) = x(3) = 3 '

'-_1\

::uu; "

.1hl

PROBLEM 2: using the triangular decomposition method to solve: 2 Xl + 4 x2 + x3 + 2 X4 = 5


4
Xl

+ 14 x2
X2

x3

+6
-

x4 =
X4

11

xI
-4
Xl

+ 5 x3

+2
?

x2 -

6 x3 +

x,

= -2
~

with an accuracy 0.000001


.)_,b-.JI ~li ~

(Partial Pivoting)

_;_?.ll _)~I

",:-,,Li

.)~I

.~;WI wlJ

-97-

10 20 30 40 50 60
70

REM *** TRIANGULAR DECOMPOSITION REM *** INPUT DATA *** INPUT NUMBER OF EQUATION N

***

N=N-1:PRINT DIM A{N, N+1) , X(N) FOR R=1 TO N FOR S=l TO N

90 INPUT A (R,S) 100 NEXT S 110 PRINT: PRINT liB (";R;") 120 130 200 210 400 410 420 430 440 450 460 470 500
510

=";

520 530 540 550 560 590 600


610

620 630 640 650 P=P-A(R,S)*X 660 NEXT S

INPUT A(R, N+1) PRINT:PRINT:NEXT R REM *** FACTORISATION *** FOR R=l TO N FOR S=l TO R-1 P=A (R, S) IF S=l THEN GOTO 460 FOR T=l TO S-1 P=P-A(R,T)*A(T,S) NEXT T A(R,S)= P/A(S,S) NEXT S FOR S=R TO N+1 P= A(R,S) FOR T=l TO R-1 P=P-A(R,T)*A(T,S) NEXT T A(R,S)=P NEXT S NEXT R REM *** BACK SUBSTITUTION *** FOR R=N TO 1 STEP -1 P=A(R,N+l) IF R=N THEN GOTO 670 FOR S=R+l TO N
(S)

-98-

670 X(R)=PjA(R,R) 680 NEXT R 700 REM *** PRINT


710

RESULTS

***

FOR R=l TO

720

PRINT IX(ljRj")="jX(R) R

730 NEXT

: ~~l

<?

xCI) = -3; x(2) = 1; x(3) ~ 3; x(4) = 2


U~~ (i)
10 REM
.A_j~ ~ ~

(Partial Pivoting) .; _?..II ).~\

JG..J,I ~

: J; L..£ -' ,,~i ~~


*** TRIANGULAR DECOMP08ITION~PARTIAL

yll .)] -\!lGlI .)_,h.JI PIVOTING ***

(ii)
150 DIM C (N) 160 FOR S=1 TO N 170 CiS) =8 180 NEXT S

(iii)
220 230 240 250 260 270 280 290 300 310 320

Z=R-1 ; W=l FOR S=Z TO N IF ABS(A(Z,S)>W THEN V=S:W=ABS(A(Z,S)) NEXT S IF V=S THEN GOTO 400 FOR S=1 TO N P=A (8,V) A(S,V)=A(S,Z) A(S,V)=P NEXT S P=C(V) :C(V)=C(Z) :C(Z)=P

(i11)
650 P=P-A(R,8)*X(C(S)) 670 X(C(R))=PjA(R,R)

,. ~_p,..)~

-~

.,

UJ

.l._o

. ··IJ C"" L.....i .r...~

UL:.. ~ . __j .,_;i ..b..:..)l; ..::.u,.. ~

: ~GlI ,::.t:/Jk..JI ~ ~

(Partial Pivoting)

-99-

x+ x+ 2x+3y+ x(1)= -9.34559666E-03,


~.r."

y+2z=9 y+3z=12 z=11

: ufi=
, ,_ 1\ J~ . _ .~II ~ .-

~L.\\ 0U
c. L..l...
_.

x(2)= 3.0093458, x(3) =2.999999


.~
! .

··11 c---'" C:"'"L._j .r. f' \~L

Ii '.

U~

: ):! LS
x(l)=0.999993, x(2)=2.000001, x(3)=3
. w':U...J 1.)1 J=JI ~ ~ y.,J

PROBLEM 3 :.
Using Gauss Seidel-over/under
xl

relaxation

method to solve:

+6x2
x2

-2

x3

=7

xl-3x2+7x3=16

5 xl +
Consider an accuracy

+
?

x3

= 10

of 0.000001

~
~i.....A. f' I~L
.

·.11 c::-" l__; .r. ::uii:i

4..i, .L c-:- (3.6)··1(' _f" •. ~~I ~

~ ~;;I.hh;._J1 .,

_
: ~_;b}1

INPUT NO. of EQUATIONN


READ Rows & Columes, R = 0 TNITJATE X

'----CS=======---@
PRINT X
1 -100-

Save old X in Y
R=R+[

Nc,> Convergence
over 50

J=l, I-I SUM = SUM + A (1,1) * X (J) K=l, N, 1

I,

SSUM = SSUM + A '(J,N)

X (K)

XCI) = XCI) + W *(A (I, N+ l)-SUM-SSUM)/A(I,J)

IfABS (YCI) -XCI»~ <Q

Yes

PRINT Converges XCI)

(3.6) ~ -101-

10 20 30

REM

NO. OF QUATION

iN

DIM X (N) ,A(N, N+1) ,yIN) Q=l E-05 40 FOR 1=1 TO N 50 X(I)=O 60 FOR J=l TO N+1 70 READ A(I, J) 80 NEXT J 90 NEXT I 100 R=O 110 INPUT "Gauss Seidel.>l 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 over.<l under" iW

FOR 1=1 TO N Y(I)=X(I) : REM Save old X(I) NEXT I R=R+l IF R>50 THEN 370 REM Computations of formulas FOR 1=1 TO N SUM=O FOR J=l TO 1-1 SUM=SUM+A(I,J)*X(J) NEXT J SSUM=O FOR K=I TO N SSUM=SSUM+A (I,K) *X (K) NEXT K X(I)=X(I)+W/A(I,I)*(A(I, N+l)-SUM-SSUM) NEXT I FOR M=l TO N IF ABS(Y(M)-X(M»>Q THEN 130 NEXT N reached;"; 410

320 PRINT "AT w="; 'Convergence W; 3:3 PRINT R;"itera t ions needed" 0 340 350 360 370

PRINT:PRINT ' the final values are:":GOSUB END REM PRINT "at W= ' ;w ; " No convergence"

380 PRINT "over 50 iterations" are .: 390 GOSUB 410

:PRINT "last values

used

-102-

400 END 410 REM PRINTING 420 FOR L=l TON

SUBROUTINE
;

X 430 PRINT .. 435 NEXT L


440 PRINT" 450 RETURN

(';L;')' =

X(L)

: ~ll,j,ll

(f

_._. (W) (_~ _~ll ) (Gauss

! k., l...""

W "

1j

o~1

I, .1"'H"'-

J .~ II ..--

':1\ cr ~'I.:;_;jl ~I. W "

Seidel)

W=l

(Under

relaxation)

W<l

UjL.__S. Ij! ~

.(Over relaxation) W> I

W 0.2
0.4

Net 35

X(J)
YJ lU
('~~~

X(2)

X(J)

0.6 0.9 1.1


1.2

22
12
9

1.5

7 8 16
(y> .l.1c

1.00025 1.000116 1,00029 1.0000253 0.9999 ] .000014 1.000034

J .99972 1.99988 1.99997 1.99998 1.9999 1.9999 1.99996

2.999725 2.99989 2.999981 2.99999 3 2.999945 ..,


_)

(Net) w'1 jl.::...J1

J!1 ~

r;J1

(W)_j ~

~i 01 b;l..;

~\:;jl

o- J 1.1 ~

.(Net = 7) ..:;1 ~

PROBLEM 4
Solve the following set of non linear equation: x! + 2 x 2 + X 3 + 4 x 4 ::::: 20.7 x~+ 2 x1 x; +x;
X2

+X~

:::::

15.88

+X4:::::

21.218

3 x~ +X] x4 ::::: 1.1 2

10 REM *** THIS PROGRAM FINDS THE ROOTS TO A SET OF NONLINEAR, SIMULTANEOUS, ALGEBRAIC EQUATIONS USING THE METHOD OF NEWTON ITERATION. ****

-103-

20 30 40 50 60 65 67 70 80 90 100 110 120 130 150 160 170 180 200 210 220 230 240 250 260 270 280 290 300 310 320
330

DIM A (5,6), B (5,6), X (5), G$ (5) NCOL=5 : NROW=4 REM *** SET INITIAL GUESSES *** X(1)=1:X(2)=1:X(3)=1:X(4)=1 PRINT' - ---- --- --- -- - -------- - ----PRINT' X (1)";TAB (13) ;'X(2)" ;TAB (23)
;"X (3)

";TAB

( 3 3) ;·X (4 ) "

PRINT" -- -- ------- -- -- ------- -----GOSUB 780 REM *** ITERATION FOR SOLUTION *** FOR IA=l TO 50 A(1,1)=1:A(1,2)=2:A(1,3)=1:A(1,4)=4:A(2,3)=0 A(3,2)=0:A(3,4)=1:A(4,1)=0:A(4,2)=3 A(2,l)=2*X(I)+2*X(2) A(2,2)=2*X(I) A(3,1)=3*X(1)A2 A(3,3)=2*X(3) A (4,3) =X (4) : (4,.4) (3) A =X A(I,5)=-1*X(1) -2*X(2) -X(3) -4*X(4)+20_7 A(3,5)=21.218-X(1)A3-X(3)A2-X(4) A(4,5)=-3*X(2)-X(3)*X(4)+21_1 FOR IJ=1 TO 4 IF ABS(A(IJ,J))>O_OOOOI THEN GOTO 260 NEXT IJ GOTO 350 GOSUB 370 REM *** UPDATE X VALUES *** FOR IJ=l TO 4 X(IJ)=X(IJ)+A(IJ,5) NEXT IJ GOSUB 780 NEXT IA No convergence after 50 iterations"

140 A(2,4)=3*X(4)A2

190 A(2,5)=15_88-X(1)A2-2*X(1)*X(2)-X(4)A3

PRINT 340 END

350 PRINT convergence obtained 360 END 370 REM *** ---------------------------------*** 380 REM *THIS SUBROUTINE APPLIES THE METHOD OF GAUSSJORDAN ELIMINATION TO A MATRIX USING PARTIAL PIVOTING 390 REM *A - THE ORIGINAL AUGMENTED MATRIX *

-104-

400 REM *B ~ A WORKING 410 REM *NROW~THE

MATRIX

OF SIZE SIMILAR

TO 'A' * ""

NUMBER

OF ROWS

IN THE 'A"MATRIX

420 REM *NCOL-THE NUMBER OF COLUMNS IN THEA" MATRIX"" 430 REM ""**------------------------------* 440 REM **DO THE PROBLEM IN STAGES** 450 FOR K=l TO NROW 460 REM **F1ND LARGEST PIVOT** 470 P1VOT=A{K,K} :IL=K , 480 FOR L=K+l TO NROW 490 IF ABS(A{L,K)}<ABS(PIVOT}THEN GOTO 520 500 PIVOT=A(L,K) 510 IL=L 520 NEXT L 530 REM **TRADE ROWS TO GET LARGEST PIVOT** 540 FOR LL=1 TO NCOL 550 TEMP=A(IK,LL) 560 A(K,LL)=A(IL,LL} 570 A(IL,LL)=TEMP 580 NEXT LL 590 REM **NORMALIZE PIVOT ROW** 600 FOR J=l TO NCOL 610 B(K,J)=A{K,J)/PIVOT 620 NEXT J 630 REM **DO GUASS-JORDAN EL1MINAT10N** 640 FOR 1=1 TO NROW 650 IF I=K GOTO 690 660 FOR J=l TO NCOL 670 B(I,J}=A(I,J}-A(I,K)*B(K,J) 680 NEXT J 690 NEXT I 700 REM **UPDATE "A"MATRIX WITH "B"MATRIX** 710 FOR I=1 TO NROW 720 FOR J=l TO NCOL 730 A (1,J)=B{I,J) 740 NEXT J 750 NEXT I 760 NEXT K 770 RETURN 780 REM **THIS SUBROUTINE PRINTS THE RESULTS** 790 GOSUB 820 800 PRINT G$(l) ;TAB(ll) ;G$(2} ;TAB(21) ;G$(3) ;TAB (31) ;G$ (4) 810 RETURN

-105-

820 REM **THIS SUBROUTINE SORTS SCIENTIFIC PRINT CLAR1TY** 830 FOR 1",1 TO 4 840 IF ABS{X(I))>O.Ol THEN GOTO 870 850 G${I)=LEFT${STR$(X(1)) ,4) 860 GOTO 890 870 G$(1)",STR$(X(1)) 880 G$(1)=LEFT$(G$(1) ,8) 890 NEXT I 900 RETURN

NOTATION

FOR

2·750367
1.344849

4.676298 5.297124

7·895793 5.949349

0·]753103 0.7028880

1.2

5.6

4·3

0.999999

Convergence obtained.

Qr) Use Gauss-Elimination to solve :3x) - O.lx2 - O.2x3 O.Ix[ + 7x2 -O.3xj

= 7.85
=-19.3

O.3x) - O.2x2 + 1OX3= 71.4

proceed your calculations correct to four decimal places. Qi) Given the system :4xj +Sx2 -6x3 2xJ
-

=28

7x3=29

= 714
Use Gauss-Elimination pivoting. to
-106-

find the roots. Employ partial

Q;) ~,uppose

that a team of three parachutists are connected by a weightless cord while lree-falling (It a velocity of 5 Ill/sec. Using Gauss-Elimination method calculate the tension in each section of chord and the acceleration of the team, given the following information :_, _Mass,l(g(m)_,
-

~ --_ Parachutist _
--

--

_-

--

Dra Coefficient k s (c)


10

--

70 2 .oW

1+
17

Hint

The equation of motion call be determined second law (L: F= 111 a). mig - T -, cl V = m I a
1112g -

from Newton's

T - c2v

= 1112a

la

1TI.1g-T-c3v=m3a

Q~) Use the Gauss-Seidel

method to solve: xl + 7x2 - 3x3 =-51 4xI -4x2 +9x~ =61

xl + 7x2 +Jx3 =8 Also, use Jacobi-method and compare it with the above one work to five decimal places
Q:;)

Given the following set of equation .x I - 3 x 2 I 2 x" = I 0


.J.

5x1 -12x2 Solve usinga. Gauss-Elimination b. Jacobia method c. Gauss-Seidel.

-I

2x, = -33

-103

with partial pivoting.

d Over-lei axat io 11 met hod with (\\


-107 -

.~/

"

e.Under-relaxation method with (w= 0.9) Compare vour calculations according to the above Work to four decimal places.
Qr,) The equilibrium

methods

103308[
19108) 4348[ -17368)

of a certain frame work requires the equation +191082 + 43483 ~173684 ~ 1778=0
~

:-

+ 1006982
~ 173682 +69482

17368.1 ~694e4
~9284 +151988..J

+8.89=0 +10.50=0

+ 1571883 ~9283

-23.10=0

To be satisfied 'Working to (6) decimal places find by using Gauss-Seidel method.


Q7)

Solve the following set of equations by using Gaussian elimination method with partial pivoting. Using four decimal places for accuracy. -2xJ+4'<2+3x3=5
3x)

+ 2x

2-

4x) :.:::. 7 =4

4x, +3x2 Q8)

+5x3

Solve the following system of linear equations elimination method with partial pivoting.
x,+x2T2x1+3x~=-1 2x,.1..3x2
x) -

using Gauss's

-xJ 2x
3-

-x~
X4

=-1

=6

x,+2x2+3x3-x4=3 Q9) Solve the system of equations

by choleski method

1 3

2 -1

2 -2

-I

:.lrX'.J-l~l
.)

x2

.)

x,

-10S-

QIU) Solve

the

following
2 4 I 2

syst em of equations 2
3
]

by Gauss-J ondon

method. ..,
z
-r

.)

-- 3 2

-1
2

P w
k

-I

-1

6 ]0
to converge. Apply

Q II) What

IS the condition

Gauss-Seidel

for Jacobi iteration to the system.


x + lOy x

method

lOx + Y + z = 6 +z=6
6

+ y + I Oz=

Starting from (L, 1,1).


Qn)

Employ equations:

Jacobi -

method,

apply three iteration


=

to the set of

16.4

]OX2

+8x_, +4x..j =-3.8 + l Ox, + 2x'l = 36.9 +6x]+IOx..j=30.9

2x[
xI

QlJ) Determine

the coefficients of the polynomial: y = Ax 3 + Bx 2 + ex 0


T

which passes through the points (1, 10), (2,26), (-1,2) and has a slope of (1 0) at the point (1,10).
QI~) Consider

the system shown in the fig. below, where three blocks are attached by a weightless cord and rest on a smooth plane inclined at 45° with horizontal. The coefficient of friction between the plane and the (100 kg ) mass is 0.2\ and between the (50 & 20) kg it is (0375) For this system calculate the acceleration (a) as will as the tension bet ween the blocks
-109-

Q1S)

An engineer super vises the production of three types of automobiles. Three kind of material-metal, plastic and rubber are required for production the amounts needed to produce each car are :-

~_C~!__L __Meta_I __
____ II _

1PI_as~b/c~
_;' __ 25
]]

JIb/ear)

'

!!_u_bb~ (Ib/ear)

]500
2
.i
-i

loa

1700 1900

~2

120 160

If totals of (106, 2.17 and 8.2) tons (ton = 2000 lb) of metal, plastic and rubber respectively are available each day how many automobiles can be produced per day. Q IG) Compute the temperature distribution in a rod that is heated at both ends as depicted in the following figure. Use over relaxation method with (w= 11) given thatTi+1 -

2Tj + T1-1

=0

Where Ti represents Perform your calculation (T=O) as an initial guess.

the temperature at any nodal point. correct to five decimal places, and use

To=50°C

Tl

T2


-110-

T3

T4

J Tj~200°C

~X

Q 17)

A thin square plate has it s si des II iainiained at temperatures (-10°e. 50°C, 100°C and 75°(") a-. shown in figure below' Assuming the steady state temper ature distribution T(x,Y) satisfies Laplace's equation, assume also a unit depth. Determine :1) the temperature distribution of each node. 2) the effect of relaxation method to acceleration the solution assume (:A=1.2). y

100°C
y~

50°C

Y2
YI

75°C

yo

Xo

x,

.io-c

Xl

Q1S) An engineer

and course three pits composition

requires (4800,5810, 5690) m~ of sand, fine gravel gravel respectively for a building project. There are from which these materials can be obtained, the of these pits is :

How many cubic meters must be handle from each pit in order to . meet the engineer's needs?
Q19) Find the two intersections x2 +
X- /

nearest the origin of the curves: = 1 and y - sin (x 2) = 0

Use the method of iteration.

-I I 1-

Q20) Solve the system :-

x-+y--z-=9
x - v· z:::: I x
...,

')

+ y - z:

=0

by iteration to obtain the solution near (2.5, 0.2, ] .6).


Q21) Solve

by using Newton's

method :-

x3+3y2=21
x2 + 2y
Make sketches the intersection.

=0
values of

of the graphs to locate approximate

Q») Solve the _following set of non-linear


Raphson T echniques :

equations

use Newton

f(x,y)=x2 g(x,y)=x2
Take (xo

+y2 -1=0 +9/ -4x+1Sy+9=O

= 1)

; (Yo

= -1/2).

-112-

Vous aimerez peut-être aussi