X G (X) Techniques Used in The First Chapter To Solve Nonlinear Equations. Initially, We Will Apply

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

1

SOLVING SIMULTANEOUS EQUATIONS BY MATRIX ITERATION



In the previous chapter we studied direct matrix methods. Such methods employ a series of
algebraic operations (row transformations, row multiplications) that lead more or less directly to
an exact solution to the system of equations.

In this chapter we will examine iterative matrix methods. Such methods are based on starting with
initial guesses for the x values, and performing a sequence of algebraic operations to improve the
values. After many repetitions (iterations) of the algebraic operations the solution hopefully
converges to correct values for x. As will be seen, iterative approaches to the solution of a system
of equations are consistent with the
x = g(x) techniques used in the first chapter to solve nonlinear equations. Initially, we will apply
the iterative approach to systems of linear equations; however, we will see how they can also be
applied to systems of nonlinear equations.

A SIMPLE EXAMPLE

Consider the system of three equations in three unknowns:

'

+ +
+
+ +
2 3
3
6 2
3 2 1
3 2 1
3 2 1
x x x
x x x
x x x


We can solve the first equation for x
1
in terms of x
2
and x
3
; we can solve the second equation for
x
2
in terms of x
1
and x
3
; and we can solve the third equation for x
3
in terms of x
1
and x
2
:

'


+
+
3
2
2 3
1
1 3
1
3
3 1 2
2
6
3 2
1
2 2
1
1
3
x x x
x x x
x x x


Now we can guess initial values, say x
1
= 0, x
2
= 0, and x
3
= 0. Putting the guesses for x
2
and x
3

into the right hand side of the first equation leads to a new value of x
1
= 3. Putting the guesses for
x
1
and x
3
into the second equation leads to a new value of x
2
= -3. Finally, putting the guesses for
x
1
and x
2
into the third equation leads to a new value of x
3
= -2/3.

This process can be repeated for several iterations to arrive at x
1
= 8.5, x
2
= -11.25, and
x
3
= 0.25:


ITERATION
x
1
x
2
x
3

0 0 0 0
1 3.000 -3.000 -0.667
2 4.833 -6.667 -0.677
3 6.667 -8.500 -0.056
4 7.278 -9.722 -0.056
5 7.889 -10.333 0.148

30 8.500 -11.250 0.250

2
The connection with the x = g(x) method bears some examination. The first equation written
above is an x
1
= g
1
(x
1
, x
2
, x
3
) equation in the sense that an x
1
term is kept on the left hand side, and
all other terms are pulled to the right hand side. Because the equation is linear in x
1
, there were no
terms involving x
1
pulled to the right hand side in forming g
1
(x). Had the first equation been
nonlinear in x
1
, then x
1
would have appeared on both sides. Similar arguments can be made for
the other two equations.

ITERATIVE MATRIX TECHNIQUES THE JACOBI METHOD

A system of linear equations can be written in the form

[A]{x} = {b}

For the three equations that we have been considering,

[ ] { } { }

'

1
1
1
]
1


1
1
1
]
1


3
2
1
2
3
6
b
3 1 1
1 1 1
1 1 2
A
x
x
x
x

Now [A] can be decomposed (broken up) into two components:

[A] = [L + U] + [D]

where

[ ] [ ]
1
1
1
]
1

1
1
1
]
1

+
3 0 0
0 1 0
0 0 2
0 1 1
1 0 1
1 1 0
U L D

[L + U] contains a combination of the upper and lower off-diagonal terms, and [D] contains the
diagonal terms. The process of separating the [A] matrix into two components is called LU
decomposition.


After LU decomposition, the original system of equations can be written

[A]{x} [L + U]{x} + [D]{x} = {b}

Or, rearranging terms

[D]{x} = -[L + U]{x} + {b}

Notice that this equation is very close to being in an x = g(x) form. Specifically, because [D] is a
diagonal matrix, each x value is represented once and only once on the left hand side of the
system of equations. Moreover, [L + U] and {b} drag everything else to the right hand side.


3
For our system of equations this becomes

'

'

1
1
1
]
1

'

1
1
1
]
1

2
3
6
0 1 11
1 0 1
1 1 0
3 0 0
0 1 0
0 0 2
3
2
1
3
2
1
x
x
x
x
x
x


If the [D] matrix were just the identity matrix, [I], then we would have an x = g(x) setup.

Because [D][D
-1
] [I], we can arrange for the left hand side to be multiplied by the identity
matrix if we multiply the entire system through by [D
-1
]:

[D
-1
]{D]{x} = -[D
-1
][L + U]{x} + [D
-1
]{b}

or

{x} = -[D
-1
][L + U]{x} + [D
-1
]{b}

Furthermore, [D
-1
] is easy to obtain because, for any diagonal matrix, the inverse matrix is just a
diagonal matrix made up of the inverse of each diagonal term:


1
1
1
]
1

1
1
1
]
1

33
22
11
1
1
1
33
22
11
0 0
0 0
0 0 1
0 0
0 0
0 0
a
a
a
a
a
a


or, for our system of equations


1
1
1
]
1

1
1
1
]
1


3
1
2
1
0 0
0 1 0
0 0
3 0 0
0 1 0
0 0 2 1


We can simplify our notation by defining two new matrices:

[B] -[D
-1
][L + U] and {b} [D
-1
]{b}

For our system of equations

[ ]
1
1
1
]
1

1
1
1
]
1

1
1
1
]
1


0
1 0 1
0
0 1 1
1 0 1
1 1 0
0 0
0 1 0
0 0
3
1
3
1
2
1
2
1
3
1
2
1
B


4
{ }

'

'

1
1
1
]
1

3
2
3
1
2
1
'
3
3
2
3
6
0 0
0 1 0
0 0
b

The final x = g(x) equation becomes

{x} = [B]{x} + {b}

The iterative procedure would be performed by guessing values of x = x
n
to use on the right hand
side and computing new values of x = x
n+1
by solving the above equation. Thus

{x
n+1
} = [B]{x
n
} + {b}

For the first iteration for our system of equation we use guess values for x
n
and get:

{ }

'

'

'

1
1
1
]
1

+
3
2
3
2
3
1
3
1
2
1
2
1
1
3
3
3
3
0
0
0
0
1 0 1
0
n
x

which is what we got when we implemented this process by hand at the beginning of the chapter.

Repeated iteration leads to a series of values for the xs which can be seen to agree with the
values that we obtained in the hand process as shown in the table above.

You might also like