Académique Documents
Professionnel Documents
Culture Documents
:&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_...,..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\
<.fi.....J1-- 'i'lz. ~ u
~I
~'-?~
L......, ~I _ ,J _
w~
fo
~I
I,..,_A... =.
uIJlp.'.JI ~ J~
) ,tJ_;£l1 ~I
4lJ_)~1
wL_,.1;..iJ L¥J:il1u'.J~
w)k.liilJ
~l:Jl
t=.""~ J,h ~
~liill _
0i ~
_ _,....,
' .. ~ ._,-
6\ ..._, '"'I
jl .~I
,;) _>----=>-JIJl.....i:iJ1
_;;;b
.h
L.u.J ~~
=;
~}
pJl
d",",")J 0!jji ~
t1x
=;
t1y ~
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
4 U I~J = 0
~
~ /\.4
\"".r-
(ul'
2'
3' ~ , ..
U).liJ' 9
_~~C _A.
~
j\
: ~~l
-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,'.l\
L.J-O
ll..:ill,;tie
Y.J~ ~l
"ltii ~
o- ~\Jli ~i ~
w\j ~~I
J..\...:ill
1,...
04 J_,ill
U:?- ~
.0
~l1'"~l
0»
ulj o~
If
~.J?':>
01\
;1_S )
.l.b.y
JIAill 1.lA ~
-= ~_::...; ~
LAJh,
"1:' u '-,
\;t\')'"
rtiJ'il <Ya ~
~4 (Matrix)
UAA~
~ya ~
eLL
----..:.~
~.;9i.n4
>";h'
'-$i
01J .~_,Q".a.J\
~~)r1 u}
tP. A.A,.
J.lc.
L;'I~""
J' (n •
=,
0~ ~
(aij)
j.. j
"I~ Y1 o~
.J~I .)1
(n) lij~
~l
),,.b...Jl
0)
~I
(i)
jJl~
-48~
11
21 ..
• •
A=
a
.a
.
12
•••
• • II
a a
a
~
- ,1m
• •
22 •
•
II
• • •
. 2m ..
a
.l\
un
III
n2
H'U
...
~
run
~
.~ .t1 ~ J' €a ~
r-:i.: 4j JA
.)1_;:
~
~'J_J
J~
~..s
Ie.
iq~."06
t yoj-O
~_,l_,l\
~t)o...:
• ~ _,qa.o
....,
JII
~~
.....:-
: ~ ~ .u_Jiw=aJ\
'"
y fo Li _)S:
A=
,
z,
...,
6
7
2
..
..
.A
'I
_' •
4
0
) «QxP)
"
;';'JL.i:J
uts i<
: ~l!Ji~.Al\ c)i:t.J ~
l_,z:
.:
...
~) uJ:ul
• .u4' ~_,i
...o.J1
t.S..?-i
..
:~
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
~~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
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
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
0.).1 w'J-lL.....J\
J.:,..
.lp,.j
~ ~lj
~)I1
G')..lL....J1
C:!""~
;;.l~
.l~,/
1#-~1
~.;;11 ~I
d
J.k;.
: J\.:JI
Y. L.S_-, ~I
_,....J\
~I
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
L1_,~ f...:-l._,L...l
~.~
o.lh.J\ .l:!~
a21
a31
•
•
• .. •
a22
332
• • •
• ..
,.
a23
833
,.
....
,.
...
III
.
..
II
..
•
•
• • " • ...
• •
.. ..
..
..
• ..
.. '"
ann
,.
;,1
i·,g
~1 ~
i.
@.,o
~i ~
i.~11(j J~
y~
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>
••
a,~
............
. ...
n ·1 ann
-52-
j,lc.
~\
.l_'.b.J\ ~
L.
J:! ~~'J::'
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
3 -}'
Row,
: 1~
A. " • l"3~ ~
~=
0 0
-3
-6
J\ ~
-6 -19
.),)=::.
: 1:lSA ~~,
Jya=.ll
w~\
y, .~.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-
.j~.1
..lJ.:.....J.l ~..il~ ..
. \ U.J-'"'J . _(\
,~\
~
w'J'..lLz...J1 ~ ~
~.J:!
..
'1J (Singular)
04 JI.¥
-1...wLi.
(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 ~
-I
=..
(a,
x cofactor aj).
Det (A)
WI.:il\ ~I~)
~_rhll..~ 4.i~'J'1
~
~
dj~
.)c ~
4j~\ ...,.,~
~it, ~
0-0-, :;.b.yll
01_J o.b.J:ij~
(A) ~
u~
dj~\
;;.b.yl\dj~
l?,1 ~
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
+ Tx, = 3
...L
8X2
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))
.~\
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
-O~55 -2.77
-0.01 -0.17
--1.31
0 0
1
I -lf44
0
1
a33 :
•
~
Ullil\ o,JldrJ\
0
0
-0636
o o
New
New
ROWt =
-0 .. 7 1
:
0406
O~48 0.04
ROW3
Row) -
'New
•
III
ROW2
· 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
•
.;..
..
· ~~.J Xl
3 3
2
-4 -
X= x2 - 0.52
X3
0.48
~O404 -0.36
-56-
Yo
$,1 ~
:\.9_,i ,JI
u
~.,.l=I.~_,
J.oi.!
:~
o
-8
-5
6
A=
-6 7
.. ~k;.n ~'j\
."
4..:~
...
~'iJ\I..l\
Ja. 3.3
.
Jil w\1~\.....J\
~.:lc
u\.S
1~~ ,~l?h
JI
.l.lC ~
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
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
r~1
w'jJ~
_j
~JA'~
w'JJWI
u-o (n)
Jb-4 j.::J1 ~
'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
.."l._,.h.W1
w'l.:L_x...J1 (,L_bl ~J ~ )l_j
J,.. ~
J:'
'1 "'-.jlj
J,..
~J:'
"'-.jlj ~~I
..l.lC.(j\S Ij)
L..i
(Singular) ~
('\..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
--+---------
(d)
,__)--------J-A.._
;, ,- ,J,liiil
~
0:';'_)
•
U_'LJ:;"'-""
'I
F- .;.;.
,lll)..;a...,
~JI....::..(3.2
a) JS,..::JI U:!-:':! .:
'-l
6.,.:,.
~lcoJl
Q~
cF J
_.
'I".P-" u,., .~
·::I_)........ G.. ~
, -~
.IL
,II J=JI
,J.'
·_'.L' .. ~~.. ~I
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 ~
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
~4--J1
= 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 ~
AX=B
~)I
Matrix)
(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
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
,\.c~
.(~)p:;ll
: ';/J\
-\
~~
t> U--J
:i.3~1
U"~
.l~
.)
: ul ($,1 ,~I}JI
AX=B X=AIB
'-:-l y...'>.
-"':ol
~_>hll
Xk
oii
u~ Iii
,~wl.)
i~
~J
~_;b ul
d..c._,......,...., ~
:~
~
~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
J__,-~
(Forward Elimination)
4__,l.,c ..
r..r~'Jl ui::J~
U":!-' y
..til~J (Upper
~
Triangular
~ ....
Matrix)
1~ .
U~
'.\1·
L~II
Y-""
\._jc. L..u.:i
: )\.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~-'
..rLYI
L1i,J1
¥=
jlq.J,/-,
New Row ,
0~
(a31/all)
---!
i::..)-J ~
: C _;hll
a31 all
b',
_,
b , - b, ~l)_
_' - all
-61-
_;h...J1 "..i..
(~.J
-:.JtJl _;h...J1 h~
e1\j-,(a~~) ~
: (pll ~
2
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
(lh:JI
J~
4..;l..c. i~ e1\j
.till'lll ;lJ.lUI
l>----" ~L;....JI
.JL~J ~
Gp. (Back
Substitution)
~Ijill
~_,.ull
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 ~
-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~
_;_P.JI jS~1
ui u~
,.:t:{~~1
' .. L,
0-> ~
J.aI
J=..
.1!1..iA
ufo
~
c..lJ.l:o. ~ ~.
>7;; ;2
,_
ill l.bJ1
'\: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, _
(.b~I~);i
Gly..----iJ JI w)J.J....LJ1.)
296;. _};!----C ~
~I
~i
~I ,
oj____",
'iJ
Jl-...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
I U'"~\
~, .-
Ij\ L...i..u _, I~
X2 = I
: J:JI ~
~I
~
U:!*20'; 1<>11
cbL..i:i ~
J"""
~
~
L_
(x)
_j
'\..::.u.:...
~ J!,
i.1..j1
~ IJi•.1AJ
0~ .(3, 2d)
JI
t$..l~
U,!'29'j"I.,j1 cY
~
c-
L..S • 1.:_
'ii-""'""
o..l.1x.J,','
;;_"".ll.I1 ~I'
uc- L.W
-63-
.1_ J J'""A'"'l
~'
. _ ~t.....1 •_
(ii] II
Technique
For Improving
,11:"\ ~..._ UGJI
Solutions
: 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 ~
...r..r-'"
,(.,':11
.-
~I..:
u! . u'i
~I L.,j t,?.J~ ./'
Y
~
J:~
dE_, ');:_JiiJl ~
.)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_?-) ~
jS_;...:i1~
y,..-..S:1 ~
J_,
'MII
L., \.Jj\..j ~I
o~_,
(Complete Pivoting)
.~WI
: Scaling
L.:iJl~ ~ ~ ~_, ~I
{!-:IJ.J:iJI-2
~I
u'i.)h..J1 4..c~
w;bUI ~~
w)l.,~
J,.w ",I_?-) ~
Y.
'-F
~ ol..il.::..u..:.. . ..
j -"'" _,
w...J
~.#. c---"
01 ~
~.J.ii
\~_,
Wl.l.......:>. Yo ~\.L
w~
0-0
W\'!-')lc.
l.,ij).! I~
'-.A..l.ic
~L....:lll-!
~y
,o~
LS__.r:.ljo~ ~
('U)
wb
w'i.)t.....,
0fo.)1
~)
~Y-
~)__,h...
U\j y_,11 ~
tl!J'i1
: .)UI
"::"'{j
h~l\
;;
t-" ~I.'
~] ~ :~~lr::l=r~~~l l2 r
1 2 -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 ~
JS ~
l
: ~\4.c. ~·-Ii
-0.01
X3
1.00
('\h:i.,_,,\..., .j
1_ .._,.,.... ~
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
2.37xl + 3.06x2 - 4.28x~ = 1.76 1.46x] -0.78x2 +3.75x~=4.69 -3.69xl + 5.13X2 + ] 06x:; = 5.74
~.~
w'1.l'i..L.J1 ('\.1u~)
=::
= Row]
1.46
r2~7
0
l
" ;pY/5_~1
I .':1\
. __':Il, lJ-"":!Y'-".J
- 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
system of equations:
=-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
= Row,
- Row.
"6 "6
Row,
6
4
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.., .
New Row
Row
4-
Row , -6.8182 -5
2.1818
-6
4 6.8182 0
6 -11
0 0 ,0
-9.0001
-3.1199
: ;~Y! ;..#11
: J¥.~l
Xl
= -5.000,
X2 =
0.33325, x, = -1.9999
6l.l.)~
U'" JLS.l
u.bJl
4.:i.:..;b
-----'?-
c~
.} J...=._;
'11u-' j1£ wh
dj~
~_;bJ
~L.::...,
~_;hll oiA
dj~
"iA ..)
t'; ~
.)c liI~
J~I~.J
. .l....-..:>.I.J ~1 o_y....:>~
t,$::Jl_j ~)I
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·
b' 2 b: ~
X2
x,
.»
=b.} = b:
1
==
b;
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 = -
,::..;·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
(j..<.j
Cl1jl_'
:~
-70-
~J_,'11
-1
5 4 0
-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
0 0 0
~ '..U".3 (15)
.~
1,.. <..S"'""
.L.\1
--.(
...
,,_L..: ~
11 oiA. ~•
-,I V
..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
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
.J91 ~J.J~ ~
j
LJl_fo:lI ~
eJli
Iii
~)fi:.il\
<G.c- Y-"
IJ! ufo.
0.0
la I> ~Ial
IIi ~ _I
1.1
i = 1,2,
"',11
.I:
-75-
9 .(Diagollally
Dominant]
~,;h!J1 : ..:.:,,':U__._JI
'00
~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 ~
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
+ a3.;
X3
b_,
o)kl;i.,;.bJ1 0-0
w)'JL...JI ~~ oJI..:.! ~
W_)-'-:! ~
Lf}fo
:~
pi XI
_;GlI J~\J
.)_,';!\
:U..l~I0-0
JJ'l1
=
r·l
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
.\~ ..) 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
~
-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
-
4_.,lL;. ;;)~,
Xr.i1 = --I [b i
a ii
'\" a ii . x I I] L...,
j~l' J~i
the
following
set
of linear
equations
USing
Jacob' s
8x 123 x - x X
l
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··
~.~.ill
..
'\
.' \
_ .~(
((J I X
=-
X2
II
-= x.; II = 0)
: .}'Ji
JJ~\
_} ~
LS. (r = I ,2.J,
-77-
.4.:i)G.l1 ~l:;....Jl
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
II
1.1
.1
=B-Lx
x
a ..
',I
B=_S_ ,
E'(. 7:
+ x.~
;-----W ~
= =
=
~~
o~
w';i.lL...J1 J=,. ~
J~ -
u"_JS
~_;b
I'\~L,
,~_~l
XI X2
x,
..
~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.55
~
01.:l:~1
x, ~
~,...:JI
0,),1 X:;
W. .J~,!
x.
4.25 - 0.25(0.8)
-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
3,775
-,
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~
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 .~
-~
(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
.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,..l..>:-
(Ie) ,jI ~
~I
ji..-JI ~
~_..>bll
...::..w1.S Ij!,
~_,__j L....i:..;b ~
_1
.r:
.,:j
. .s.....,_,
a21 x I a31 Xl
L...l_""""""":i
.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
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; )
-82-
: .::..9 ~
J5_.;; _)c
}i
x':" = X'
~ 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~\
: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\
.~\
: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 ;+1*
X:;
x;
+ 1\ (X ;+1 -
x;)
=0
; (x:;)._)c. ~
(3) 4j..lLd\ ~
= 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 =
= 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'
')
0.9931
= 1.2-0.1(0.9555)-01(0.9931)=1.0051 = x ', + A
<'I"
;;'__i:J=i
=1.0456+
~)P\
ut,~\
j'........:J\
J)~\
..ll___.4.1 ~
-84-
-85-
~~\
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
Y.F -' -
~I
: ...r-,
PROBLEM 1:
Using Gauss's elimination method to solve the following set of
linear algebraic
equation
Xl
+6 3
x2 x2 X2
X,\ x3 X]
7 6
xl~ Xl
+7
cc ]
=10
:_,..p.j}
lY'J1£l
!,I~lu
~')).P-
,,)l.z.i
-
:uL..Jj C'""li~1 ~
wl_,.b
~-
~
..l\....:icl
I '~
'iill
J,
(3 5) JS.,:;.
L..,...,;"il I ~ ~b.J1
{rn)
Ifo:ill
wi.>" ..l.ll;.,
(x,
,X2 'Xl)
r:i; ~I
Repeat S times
S=C+l, N+I
P=
ARC \
Ace
-95-
P = P-ARS
Xs
(3.5) rJ.S..Jj
~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 .'
'-_1\
::uu; "
.1hl
+ 14 x2
X2
x3
+6
-
x4 =
X4
11
xI
-4
Xl
+ 5 x3
+2
?
x2 -
6 x3 +
x,
= -2
~
(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
***
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
=";
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-
RESULTS
***
FOR R=l TO
720
PRINT IX(ljRj")="jX(R) R
730 NEXT
: ~~l
<?
JG..J,I ~
(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
: ~GlI ,::.t:/Jk..JI ~ ~
(Partial Pivoting)
-99-
: ufi=
, ,_ 1\ J~ . _ .~II ~ .-
~L.\\ 0U
c. L..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
.
~ ~;;I.hh;._J1 .,
_
: ~_;b}1
'----CS=======---@
PRINT X
1 -100-
Save old X in Y
R=R+[
Nc,> Convergence
over 50
I,
X (K)
Yes
(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"
used
-102-
SUBROUTINE
;
(';L;')' =
X(L)
: ~ll,j,ll
(f
! k., l...""
W "
1j
o~1
I, .1"'H"'-
J .~ II ..--
Seidel)
W=l
(Under
relaxation)
W<l
UjL.__S. Ij! ~
W 0.2
0.4
Net 35
X(J)
YJ lU
('~~~
X(2)
X(J)
22
12
9
1.5
7 8 16
(y> .l.1c
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
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
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-
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
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-
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 _
--
--
_-
--
--
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
xl + 7x2 +Jx3 =8 Also, use Jacobi-method and compare it with the above one work to five decimal places
Q:;)
-I
2x, = -33
-103
.~/
"
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
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
+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
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
method
lOx + Y + z = 6 +z=6
6
+ y + I Oz=
Employ equations:
Jacobi -
method,
to the set of
16.4
]OX2
2x[
xI
QlJ) Determine
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
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
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- /
-I I 1-
x-+y--z-=9
x - v· z:::: I x
...,
')
+ y - z:
=0
by using Newton's
method :-
x3+3y2=21
x2 + 2y
Make sketches the intersection.
=0
values of
equations
use Newton
f(x,y)=x2 g(x,y)=x2
Take (xo
= 1)
; (Yo
= -1/2).
-112-