A Solution Of Simultaneous Equations - Sharp MZ-80A Owner's Manual

Hide thumbs Also See for MZ-80A:
Table of Contents

Advertisement

96
A
solution
of simultaneous equation
Introduction
to
methodological study of programming
[1 ]
Solution of
systems
of simultaneous linear
equations is a basic data processing
problem associated with all
science
and
engineering
problems. In this
section,
we will
try to construct
a basic subroutine which is
used
to
solve
systems
of
simultaneous linear equations in n unknowns.
Although there are a
number of algorithms for solving
simultaneous linear equations, we
here employ the elimina¬
tion method which
is
familiar
to
you from your
school
days.
Approach
to
the problem
Consider the problem of solving the
system
of simultaneous linear equations shown
in
(
l
)
below.
an
JTI
a
12x2
-t-
U2IX1
f-
022X2
+
'
+
Ol.X.
=
b
l
'
*
a2mX
bi
,
a»ixi
+
a.2X2
+-
-
a..x.
-
b.
Multiplying both sides
of the
second equation in (1) by
<z,,/a2
,
and subtracting the
result
from the first equation,
we obtain
/
an
\
(
an
A
,
,
/
<m
\
t
an
ai2_
a22 -
X2
+ÿ
Iai3
023
-
X3
+
.........
+
(
a
i
>
az.
-
I x»
b\—
02
\
021
/
\
021
/
\
021
/
021
(2)
This means
that
we obtain an equation in which
JCJ
is
eliminated. Performing this process
up through
the
nth equa¬
tion,
we obtain a
set
of simultaneous Unear equations
in
which
JC,
is
not
included,
that is. one unknown
is
eliminated.
Rewriting the coefficients of
all
equations as
022. a2n-
and
so
on,
we obtain
a
11x1
*
a
12x2
+-
+
OlnX»
=
Ai
.
022X2
+
+
02.
Xn
bl
.
a»2X2-t-
a..x.
=
b.
(3)
The process of
creating
the
set
of equations in
(3) from the
set
of equations
in (1) is
called elimination
using
the
first row and column as a pivot.
Performing the elimination process on the
set
of equations
in
(3)
using
the second row and column as a
pivot, we
find a
system
of
simultaneous linear equations
whose third
to
nth
equations
do
not
contain
the
term
xÿ.
Repeating the
elimination process by
pivoting
n
-
1
times,
we obtain
anxi
-f
ai2X2
+
+
ai.x-
=
ai«»i
.
022X2-1-
02.1.
=
02.
1
.
(Inn
Jn
flnn» 1
The value of
xn
is obtained by the
nth
equation
in (4),
then
the
value of
xn
i
is obtained from the (n-l)th equation,
and so
on.
Although this method seems
simple, if you
solve by hand,
it
wiU take a lot of
labor and scratch
paper
if
5 or 6
unknowns
are involved. You will lose
interest in
solving the problem by
hand if
the number of
unknowns
is 10 or 20.
It is best
to
use a
computer to
perform repetitions of such
simple
operations.
The
computer
can eliminate
obstacles
in
a
lump
and
give
us the
correct
answer immediately.

Advertisement

Table of Contents
loading

Table of Contents